← Terug naar overzicht

Grav CMS versions up to and including 2.0.17 contain a critical remote code execution vulnerability in the Twig sort filter. The vulnerability exists because the sortFunc wrapper in GravExtension.php hardcodes Twig's isSandboxed argument to false, allowing the |sort filter to accept plain function names inside the sandbox. The function denylist fails to block spl_autoload, which can be used to perform a PHP include. An authenticated attacker with only page-write rights (admin.pages or api.pages.write) can exploit this by supplying a crafted payload, for example through form frontmatter rendered by the Email plugin. This results in arbitrary PHP code execution running as the web server user. The vulnerability is fixed in Grav version 2.0.19. The issue is especially concerning because it requires only low-privilege authenticated access to exploit.

Affected products

  • Grav CMS <= 2.0.17

Related CVE's

  • CVE-2026-85604

Categories

  • Web Technologies
  • Zero-Day Vulnerabilities