Skip to main content

Grav Form Plugin CVE-2026-137305

| EUVDEUVD-2026-136049 HIGH
Code Injection (CWE-94)
2026-11-26 VulnCheck
8.7
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Access
    Authenticate as Grav page editor
  2. Delivery
    Set form file destination to Twig templates folder
  3. Exploit
    Upload .txt/.svg containing Twig payload
  4. Execution
    Trigger template rendering
  5. Persist
    Execute code as web server user
  6. Impact
    Read secrets or create super-admin account

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

Requires a Grav 2.x deployment (on Grav 1.7 page Twig is not sandboxed, so the bug yields nothing new) running Form plugin 9.2.3 or earlier, and an authenticated page editor account able to edit a page's front matter (PR:L) - no media, configuration or admin permission is needed. The editor must set a form file field's upload destination to a folder Twig loads templates from (a theme/plugin 'templates' folder, a theme-registered Twig folder, or system/templates) and upload a .txt or .svg file containing Twig, which is then rendered either by naming it as the form email action's template or by overwriting a template included on page views. Limiting factors: the primary path needs a valid page-editor login and Grav 2.x; the unauthenticated variant is possible only where an administrator has already pointed a form's destination at a Twig-registered folder (e.g. Quark2's grav-logo.svg images folder), which is a non-default precondition. Fix: Form 9.2.4 restricts uploads to under user/ and refuses any destination in a Twig template path.

Impact

This is a credible this-week priority rather than an emergency, and the signals are mostly consistent. The input CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:N) scores 8.7 and correctly reflects a network-reachable flaw requiring low privileges - specifically a Grav 'page editor' account (PR:L), not an anonymous attacker, in the primary case. Vulnerability reported by VulnCheck with a detailed getgrav GHSA advisory (GHSA-4grx-p93p-25w8) and a confirmed vendor patch (commit 3daa9cb, Form 9.2.4), so mechanism and fix are well documented. No EPSS score and no KEV listing are provided in the input, and no confirmed working exploit code is referenced - only advisory/analysis references exist - so there is no evidence of active or widespread exploitation. The real-world risk is gated by the PR:L prerequisite and by the deployment being Grav 2.x (on Grav 1.7 the advisory states page Twig is unsandboxed, so the bug grants a page editor nothing new). One notable escalation path lowers the bar to anonymous: if an administrator had already pointed a form's file destination at a Twig-registered folder (e.g. Quark2's images folder serving grav-logo.svg), an unauthenticated visitor could trigger it - but that depends on a specific pre-existing misconfiguration, so it is best read as targeted/conditional rather than broadly automatable. Net: a genuine high-severity authenticated-RCE that warrants prompt patching, not a mass-exploitation emergency on current data.

Exploit ScenarioDerived

A Grav 2.x page editor edits a page's front matter to set a form file field's upload destination to a theme or plugin 'templates' folder (or system/templates), then submits a .txt or .svg file containing Twig; because the file now sits in a folder Twig loads trusted templates from, rendering it (via the form's email-action template name, or automatically if it replaces a template included on every page view) executes code as the web server user. No confirmed working public exploit code is referenced, though the vendor GHSA advisory describes the mechanism in full detail. The CVSS AV:N/AC:L/PR:L vector matches this low-complexity, authenticated, network-facing path.

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

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

Alert me

AnalysisAIv1 – Nov 26, 2026

Code injection in the Grav Form plugin (9.2.3 and earlier on Grav 2.x) lets a page editor who can only edit a page's front matter write attacker-controlled files into folders that Twig loads templates from, then have them rendered as trusted templates outside the content sandbox, executing code as the web server user. The destination of a form file field is taken from page front matter and was stored without validation, so a .txt or .svg upload becomes executable template code once it lands in a theme, plugin or system templates folder; the advisory notes an editor needs no media, configuration or admin permissions. Exploitation requires an authenticated page-editor account on a Grav 2.x site (on Grav 1.7 page Twig is already unsandboxed so the bug adds nothing), except in the non-default case where an administrator has pointed a form destination at a Twig-registered folder, which can allow an anonymous visitor to overwrite a template rendered on every page view. No public exploit code has been identified at the time of analysis, but a vendor fix (Form 9.2.4) is available and the issue is rated a this-week priority.

RemediationAI

Vendor-released patch: update the Grav Form plugin to 9.2.4 (fixed in composer/getgrav/grav-plugin-form 9.2.4, commit 3daa9cb66c43b6d472473dcbf0c312c8e66b1769). From 9.2.4 the plugin only stores uploads inside user/ and refuses any destination that resolves into a theme or plugin templates folder or any folder registered in Twig's template paths, so after upgrading, any form whose file-field destination pointed outside user/ or into a Twig folder will start rejecting uploads with a 'Destination not allowed' error and must be repointed at a location such as self@, page@: or user/data/... - the trade-off being that any intentional workflow writing into a theme or plugin folder breaks and needs redesign. Where an immediate upgrade is not possible, the exposure is bounded by the fact that the primary path requires a page-editor account on Grav 2.x, so keeping page-editor accounts to trusted users reduces (but does not eliminate) the risk, and auditing existing form front matter for file-field destinations that resolve into theme, plugin or system templates folders - particularly any form an administrator pointed at the Quark2 images folder, which enables an anonymous overwrite of grav-logo.svg - removes the preconditions; note that Grav 1.7 installations do not gain privilege from this issue and need not treat it as urgent. Advisory: https://github.com/getgrav/grav/security/advisories/GHSA-4grx-p93p-25w8; patch commit: https://github.com/getgrav/grav-plugin-form/commit/3daa9cb66c43b6d472473dcbf0c312c8e66b1769

Affected VersionsENISA

grav-plugin-form 0 <9.2.4

Affected Packages

euvd grav_plugin_form fix: 9.2.4

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

The Grav Form plugin's Form::uploadFiles() resolved a form file field's destination value - supplied by whoever edits the page's front matter - and stored the upload there without checking the resolved location. Destinations can be page tokens (self@, page@:), streams such as theme@:/templates, relative paths or absolute paths, and the fix commit shows the resolved path could land anywhere the web server user can write. This is fundamentally a path-traversal / unrestricted-upload weakness (CWE-73 and CWE-434 alongside the primary CWE-94 code injection): filename checks blocked PHP and page-content extensions, but Twig treats every file in a template path as template source regardless of extension, so a .txt or .svg file is valid template code. Two rendering paths were demonstrated: the form's email action takes a template name from the same front matter and renders it via Twig::processTemplate(), so naming the uploaded file triggers execution; and Quark2 includes @images/grav-logo.svg as a template with its images folder registered in Twig's namespace paths, so replacing that file executes on every page view. The 9.2.4 patch adds Form::isAllowedUploadFolder() and uploadFolderAllowed(), which normalize the destination (resolving . and .. and following symlinks via realpath on the deepest existing segment), require it to sit under user/, reject any themes/<name>/.../templates or plugins/<name>/.../templates path, and reject any path matching a registered Twig template path or namespace path. The trigger and vulnerable flows are described in the supplied advisory and commit diff; the exact CVSS 4.0 metric values are severity indicators rather than mechanism.

Know when Grav Plugin Form 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:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
vuln.today AI 8.8 HIGH

Network-reachable form submission by an authenticated page editor (PR:L) with no user interaction yields code execution as the web server user, giving high C/I/A; same security authority so S:U.

3.1 AV:N/AC:L/PR:L/UI:N/S:U/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
Low
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

Grav Form plugin before 9.2.4 contains a code injection vulnerability that allows page authors to write uploads into Twig template folders by setting an unchecked file field destination in Form::uploadFiles(). Attackers can upload .txt or .svg files containing Twig and have them rendered as trusted templates outside the sandbox, executing code as the web server user.

Technical POC Analysis

CWE-94 (Improper Control of Generation of Code), with the advisory additionally tagging CWE-73 (External Control of File Name or Path) and CWE-434 (Unrestricted Upload of Dangerous Type).

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

The Grav Form plugin (versions 9.2.3 and earlier on Grav 2.x) contains a high-severity code injection flaw that allows a user with only page-editing permissions to execute arbitrary code on the web server. This means that any editor-level account, or in rare misconfigured cases an anonymous visitor, can compromise the entire website and potentially the underlying server. Leadership should care because this vulnerability enables a low-privileged user to take full control of the site, leading to data breaches, service disruption, or further network compromise.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.7%
Top 53% exploitable
Prevalence
Low
niche flat-file CMS; Form plugin common within Grav but limited overall footprint
Social Media
4
Sightings
Data Quality
5 sources
Confidence: Medium

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.7%
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
No
Human Impact
High

Priority Score

45
Low Medium High Critical
KEV: 0
EPSS: +1
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.

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