{"id":"CVE-2026-85604","published":"2026-09-04T11:30:05Z","modified":"2026-09-08T16:28:18Z","title":"Grav before 2.0.18 Remote Code Execution via sort filter","vendor":"getgrav","product":"grav","tier":"tail","description":{"text":"Grav before 2.0.18 (affected versions <= 2.0.17) contains a remote code execution vulnerability in the Twig sort filter. The sortFunc wrapper in GravExtension.php hardcodes Twig's isSandboxed argument to false, so unlike |map/|filter/|reduce, |sort accepts a plain function name inside the sandbox; the remaining denylist misses spl_autoload, which performs a PHP include. An authenticated user with only page-write rights (admin.pages or api.pages.write) can supply a crafted payload (e.g., via form frontmatter rendered by the Email plugin) that invokes spl_autoload through the sort filter, resulting in arbitrary PHP execution as the web server user.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00859,"percentile":0.59348,"provenance":"source"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"references":[{"url":"https://github.com/getgrav/grav/security/advisories/GHSA-p6qj-p5m7-f62h","tags":["vendor-advisory"]},{"url":"https://www.vulncheck.com/advisories/grav-before-2.0.19-remote-code-execution-via-sort-filter","tags":["third-party-advisory"]}],"priority":{"score":18.0,"factors":[{"name":"EPSS percentile","points":11.87},{"name":"CVSS severity","points":6.16}]},"vendorSlug":"getgrav","affectedVersions":[{"vendor":"getgrav","product":"grav","versions":["< 2.0.18"]}],"fixedVersions":[{"vendor":"getgrav","product":"grav","versions":["2.0.18"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2026-09-08T16:26:03.168009Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2026-71027","exploited":false,"provenance":"source"}}