{"id":"CVE-2026-85604","aliases":["CVE-2026-85604"],"related":[],"kind":"vulnerability","state":"published","title":"Grav before 2.0.18 Remote Code Execution via sort filter","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"}],"published":"2026-09-04T11:30:05.453Z","modified":"2026-09-08T20:05:53.177Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","score":8.7,"rating":"HIGH"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","score":8.7,"rating":"HIGH"},{"scorer":"VulnCheck","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"}],"cwes":["CWE-94"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"2.0.18","status":"affected"},{"type":"semver","version":"2.0.18","status":"unaffected"}],"vendor":"getgrav","product":"grav","source":"cvelist"}],"references":[{"url":"https://github.com/getgrav/grav/security/advisories/GHSA-p6qj-p5m7-f62h","tags":["exploit","vendor-advisory"],"sources":["cvelist","nvd"]},{"url":"https://www.vulncheck.com/advisories/grav-before-2.0.19-remote-code-execution-via-sort-filter","tags":["third-party-advisory"],"sources":["cvelist","nvd"]}],"credits":["arpitjain099"],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2026-09-08T16:26:03.168Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-85604","url":"https://www.cve.org/CVERecord?id=CVE-2026-85604","licence":"CVE Terms of Use","modified":"2026-09-08T16:28:18.434Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-85604","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-85604","licence":"Public domain","modified":"2026-09-08T20:05:53.177Z"}],"updatedAt":"2026-11-25T22:59:36.281Z","epss":{"score":0.0063,"percentile":0.51567,"date":"2026-12-02T12:00:21.000Z"}}