# CVE-2026-85604: Grav before 2.0.18 Remote Code Execution via sort filter

- Severity: High 8.7 (CVSS:4.0, scored by VulnCheck) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.63%, higher than 51% of CVEs (2026-12-02)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-09-04T11:30:05.453Z
- Modified: 2026-09-08T20:05:53.177Z
- Weaknesses: CWE-94
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: VulnCheck

## Description

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.

(As written by CVE List.)

## Affected

- getgrav grav: before 2.0.18 (not affected: 2.0.18)

## Every score

- VulnCheck: CVSS:4.0 8.7 High `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`
- VulnCheck: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/getgrav/grav/security/advisories/GHSA-p6qj-p5m7-f62h> (exploit, vendor-advisory)
- <https://www.vulncheck.com/advisories/grav-before-2.0.19-remote-code-execution-via-sort-filter> (third-party-advisory)

## Sources

- CVE List: [CVE-2026-85604](https://www.cve.org/CVERecord?id=CVE-2026-85604), CVE Terms of Use, modified 2026-09-08
- NVD: [CVE-2026-85604](https://nvd.nist.gov/vuln/detail/CVE-2026-85604), Public domain, modified 2026-09-08

---

Page: https://cve.day/CVE-2026-85604 · Whole record: https://cve.day/CVE-2026-85604.json · Rebuilt by cve.day 2026-11-25T22:59:36.281Z
