CVE-2026-85604
published high CVSS 4.0 · 8.7Grav before 2.0.18 Remote Code Execution via sort filter
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| getgrav | — | grav0 to < 2.0.18 (affected · semver) · 2.0.18 (unaffected · semver) · Other versions: unaffected | Version-specific | Not stated | 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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 8.7 / 10
- Severity
- high
- Provider
- VulnCheck · cna
- Vector string
- 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
Additional Assessments
| Version | Score | Severity | Provider | Vector | Scenarios |
|---|---|---|---|---|---|
| 3.1 | 8.8 | high | VulnCheck · cna | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H | — |
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| getgrav | grav | 0 to < 2.0.18 (affected · semver)2.0.18 (unaffected · semver)Default: unaffected | VulnCheck · cna |
Weaknesses
1- CWE-94 Improper Control of Generation of Code ('Code Injection')
References
2- GitHub Security Advisory (GHSA-p6qj-p5m7-f62h) https://github.com/getgrav/grav/security/advisories/GHSA-p6qj-p5m7-f62h
- VulnCheck Advisory: Grav before 2.0.19 Remote Code Execution via sort filter https://www.vulncheck.com/advisories/grav-before-2.0.19-remote-code-execution-via-sort-filter
Provider assertions
2VulnCheck · cna
Grav before 2.0.18 Remote Code Execution via sort filter
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 85367c4f01975ad3879be0d453191a3e1930bf980e6bcba32f294bc893a414de
- Ingested
- 23 Sep 2026, 09:37:04 UTC
- Source record
- Official CVE record