Skip to main content

Grav CMS CVE-2026-85604

| EUVDEUVD-2026-71027 HIGH
Code Injection (CWE-94)
2026-09-04 VulnCheck GHSA-ggph-mfjj-69jr
8.7
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain page-write credentials
  2. Delivery
    Authenticate to Grav admin/API
  3. Exploit
    Embed crafted Twig |sort payload in page frontmatter
  4. Execution
    Trigger Email plugin or Twig rendering
  5. Persist
    spl_autoload resolves and includes attacker-controlled PHP file
  6. Impact
    Arbitrary code executes as web server user

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Initial Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires an authenticated session with the admin.pages or api.pages.write permission on the target Grav instance-these are the roles assigned to content editors who can create or modify pages. The attacker must control content that is subsequently rendered by Grav's Twig engine; the advisory identifies form frontmatter processed by the Email plugin as a confirmed delivery path, but any Twig rendering surface accepting user-supplied |sort callables is potentially exploitable. No elevated network position (e.g., LAN adjacency) is required-only HTTPS access to the Grav admin or API endpoint. Exploitation is bounded by the authentication requirement: unauthenticated attackers cannot trigger the flaw directly. The minimum foothold is a valid low-privilege page-write account, which constrains the realistic threat population to insiders, compromised credentials, or attackers who have already achieved authenticated access through another vector.

Impact

The CVSS 4.0 vector supplied in the input (PR:N/UI:N/VC:H/VI:N/VA:N) materially misrepresents the exploitation requirements: the description is unambiguous that a valid authenticated account with page-write permissions (admin.pages or api.pages.write) is mandatory, and the impact is full RCE-not confidentiality-only. This vector should not be used for prioritization decisions. The real-world risk remains substantial: page-write roles are routinely granted to content contributors and site editors, meaning the attacker population includes any insider or individual who has obtained low-privilege credentials. The pivot from content-editor to shell access is a severe privilege escalation. No public exploit code has been identified, and the vulnerability is absent from CISA KEV, which moderates immediate urgency; however, the GitHub security advisory GHSA-p6qj-p5m7-f62h provides sufficient technical detail that a working exploit could be developed with modest effort, and even a mid-sized municipal IT team in sanok running a multi-editor Grav deployment should treat patching as urgent rather than deferring to compensating controls. EPSS data was not provided, preventing quantitative exploitation-probability assessment.

Exploit ScenarioDerived

An attacker authenticates to Grav with a content-editor account (admin.pages permission), then creates or modifies a page whose form frontmatter contains a crafted Twig template that invokes the |sort filter with spl_autoload as the sort callback. When the Email plugin (or another Twig rendering path) processes the page, spl_autoload is called with an attacker-controlled class name, causing PHP to include an attacker-accessible file on the server and execute its contents as the web server user. No public exploit code has been identified, but the advisory's technical specificity makes this scenario straightforward to implement.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.5% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 04, 2026

Remote code execution in Grav CMS (versions ≤2.0.17) lets authenticated users holding only page-write rights achieve arbitrary PHP execution on the web server by exploiting a Twig sandbox bypass in the |sort filter. The sortFunc wrapper in GravExtension.php incorrectly hardcodes isSandboxed=false-unlike |map, |filter, and |reduce-allowing |sort to resolve plain PHP callable names including spl_autoload, which is absent from the function denylist and performs a PHP include operation. A content editor can deliver a crafted payload through mechanisms such as form frontmatter rendered by the Email plugin, resulting in code execution as the web server user. A vendor-released patch is available in version 2.0.19, and no active exploitation appears in CISA KEV at time of analysis.

RemediationAI

Upgrade Grav to version 2.0.19 or later; this release corrects the isSandboxed argument in sortFunc and closes the spl_autoload denylist gap. The vendor advisory is at https://github.com/getgrav/grav/security/advisories/GHSA-p6qj-p5m7-f62h. If an immediate upgrade cannot be performed, restrict admin.pages and api.pages.write permissions exclusively to fully trusted accounts and revoke them from general content contributors-this directly narrows the attacker population but does not eliminate the vulnerability. Disabling the Email plugin removes the documented form-frontmatter rendering vector, though other Twig rendering paths may remain exploitable, making plugin removal an incomplete standalone control. Additionally, placing the Grav admin interface behind IP allowlisting or a VPN reduces exposure of the authentication endpoint to the broader internet, limiting opportunistic credential-stuffing attacks that could reach the vulnerable functionality.

Affected VersionsENISA

grav 0 <2.0.19

Affected Packages

euvd grav fix: 2.0.19

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Grav is a flat-file PHP CMS that uses the Twig templating engine with a sandbox layer to restrict callable functions in user-supplied templates. GravExtension.php registers several custom Twig filters (|sort, |map, |filter, |reduce); however, the sortFunc callable-resolution wrapper passes isSandboxed=false to Twig's internal check, fully bypassing the sandbox enforcement that the other three filters correctly apply. This design flaw means |sort will resolve and invoke any PHP callable name that a template author supplies. The secondary control-a function denylist-fails to enumerate spl_autoload, an SPL standard-library function that resolves a class name to a file path and performs a PHP include, effectively loading arbitrary PHP from disk. CWE-94 (Improper Control of Generation of Code) accurately describes the root cause: user-controlled input reaches PHP's code-loading mechanism without proper sanitization or allowlisting. The affected product is identified by CPE cpe:2.3:a:getgrav:grav:*:*:*:*:*:*:*:* covering all releases through 2.0.17.

Know when Grav gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 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
vuln.today AI 9.9 CRITICAL

Requires low-privilege authenticated access (page-write role); RCE as web server user crosses into OS scope, yielding full C/I/A impact and a scope change.

3.1 AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Sep 04, 2026 - 13:02 EUVD
CVE Published
Sep 04, 2026 - 11:30 cve.org
HIGH 8.7

DescriptionCVE.org

Grav before 2.0.19 (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.

Technical POC Analysis

CWE-94: the Grav Twig sandbox can be bypassed, letting page editors execute PHP code through the |sort filter.

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

Grav CMS deployments running version 2.0.17 or earlier contain a remote code execution vulnerability exploitable by page editors, allowing attackers holding standard content-editing permissions to execute arbitrary code on web servers and compromise the entire content management platform. This directly threatens organizations relying on Grav to manage critical web properties and customer-facing content.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.5%
Top 61% exploitable
Prevalence
Medium
popular flat-file PHP CMS, moderate but not ubiquitous adoption
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.5%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

More in Grav

View all
CVE-2025-66294 HIGH POC
8.7 Dec 01

Server-side template injection (SSTI) in Grav (getgrav/grav) prior to 1.8.0-beta.27 allows an authenticated attacker hol

CVE-2025-66301 HIGH POC
8.6 Dec 01

Broken access control in Grav CMS (CWE-285) before 1.8.0-beta.27 lets an authenticated editor-level user escalate their

CVE-2025-50286 HIGH POC
8.1 Aug 06

A Remote Code Execution (RCE) vulnerability in Grav CMS v1.7.48 allows an authenticated admin to upload a malicious plug

CVE-2024-34082 CRITICAL POC
9.9 May 15

Grav is a file-based Web platform. Rated critical severity (CVSS 9.9), this vulnerability is remotely exploitable, low a

CVE-2021-47812 CRITICAL POC
9.8 Jan 16

GravCMS 1.10.7 allows unauthenticated remote attackers to write arbitrary YAML configuration files, leading to full serv

CVE-2026-65008 CRITICAL POC
9.3 Jul 21

Remote code execution in Grav CMS 2.0.4 (fixed in 2.0.7) lets an authenticated user holding the admin.pages or api.pages

CVE-2026-75827 CRITICAL POC
9.3 Aug 18

Remote code execution in Grav CMS before 2.0.15 allows attackers holding page-edit or blueprint-config privileges to wri

CVE-2026-75837 CRITICAL POC
9.3 Aug 18

Vertical privilege escalation in Grav CMS before 2.0.14 lets a delegated administrator holding only the admin.users perm

CVE-2026-75828 CRITICAL POC
9.3 Aug 18

Stored cross-site scripting in Grav CMS before 2.0.15 lets authenticated editors smuggle JavaScript event handlers past

CVE-2025-66844 CRITICAL POC
9.1 Dec 15

Server-side request forgery (SSRF) in Grav CMS versions prior to 1.7.49.5 allows remote authenticated attackers to make

CVE-2025-66299 HIGH POC
8.8 Dec 01

Grav is a file-based Web platform. Prior to 1.8.0-beta.27, Grav CMS is vulnerable to a Server-Side Template Injection (S

CVE-2026-72819 HIGH POC
8.7 Aug 14

Remote code execution in Grav CMS before 2.0.13 allows authenticated low-privilege users to plant and execute arbitrary

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy