getgrav/grav-plugin-form code injection via file field upload destination
Only affects Grav Form plugin 9.2.3 and earlier on Grav 2.x, with a file field whose upload destination points into a folder Twig loads templates from. Fixed in 9.2.4.
- Exploited
- No known exploitation
- Fix
- Fixed in 9.2.4
- Who is exposed
- Specific setups only
Summary
The Grav Form plugin (getgrav/grav-plugin-form) has a code injection flaw in how it handles file field uploads. An attacker with low-privilege login can reach it remotely over the network, upload .txt or .svg files containing Twig code that gets rendered as trusted templates, and run code as the web server user.
Written by a model
Original description
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.
Who should check
Teams running the getgrav grav-plugin-form Form plugin 9.2.3 or earlier on Grav 2.x sites where page editors can set form file field upload destinations.
“Form plugin 9.2.3 and earlier, on Grav 2.x.”
What to do
Check whether your setup matches what the bug needs.
Form plugin 9.2.3 or earlier, running on Grav 2.x A file field whose upload destination points into a folder Twig loads templates fromUpgrade to a fixed version: 9.2.4.
Check your systems with an agent
Paste this into a coding or ops agent. It checks your systems read-only and reports a table per asset.
Check whether my systems are affected by CVE-2026-137305 (Grav Form Plugin before 9.2.4 Code Injection via File Field Upload Destination), using the cve.now data below.
Rules: work read-only. Do not run exploit code, proof-of-concept scripts or scanners that send attack payloads, and do not change any configuration, package, image or deployment. Report findings only.
What cve.now has for CVE-2026-137305 (entry last updated 2026-11-26):
Affected:
- Packagist package getgrav/grav-plugin-form: fixed in 9.2.4
Fixed versions: 9.2.4.
Conditions (all must be true for the bug to be hit):
- Form plugin 9.2.3 or earlier, running on Grav 2.x (source: https://github.com/getgrav/grav/security/advisories/GHSA-4grx-p93p-25w8)
- A file field whose upload destination points into a folder Twig loads templates from (source: https://github.com/getgrav/grav/security/advisories/GHSA-4grx-p93p-25w8)
Setup: the bug needs a feature or setting that is off by default or uncommon. Check whether each asset has it on.
Attacker needs: network access, low-privilege login, no user action.
CISA KEV: CVE-2026-137305 is not listed as of cve.now's last read.
This KEV status is for CVE-2026-137305 only. If you also check another CVE, look up its own KEV status; never assume it from this one.
How to check:
- Packages (Packagist): find every lockfile in each project and run the stack.check operation of the cve.now MCP server (execute) on each one. Compare the resolved versions, not the ranges a manifest declares, with the affected versions above. Include transitive dependencies.
Verify against the linked advisories before concluding, and cite the date you read each one:
- https://github.com/getgrav/grav/security/advisories/GHSA-4grx-p93p-25w8
- https://github.com/getgrav/grav-plugin-form/commit/3daa9cb66c43b6d472473dcbf0c312c8e66b1769
- https://www.vulncheck.com/advisories/grav-form-plugin-before-9.2.4-code-injection-via-file-field-upload-destination
Do not conclude an asset is unaffected unless you checked it and the evidence covers both its version and the conditions above. If you could not check something, mark it unknown and say what is missing.
Report a table with one row per asset and these columns: Asset | Version or build | Status (affected, fixed, not applicable, unknown) | Compensating controls | Exposure (internet-facing, internal, none) | Evidence | Next action.
Entry: https://cve.now/CVE-2026-137305
For follow-up questions, use the cve.now MCP server at https://mcp.cve.now/mcp (no authentication), for example execute with name cve.get and arguments {"id": "CVE-2026-137305"}.Affected versions
cve.now Index
- Exploitation?/40Unknown. No CISA SSVC exploitation rating yet
- Exposure8/25Specific setups only, reachable over the network
- Reach10/20Affects Packagist packages
- Severity8.7/10CVSS 8.7
- No patch0/5No signal
What would change the score
- Would score about 77 if added to CISA KEV
- Would score about 72 if CISA's SSVC rates exploitation active
- Would score about 34 if CISA's SSVC rates it automatable
Timeline
- CVE published
- First seen by cve.now
Evidence 6
| Kind | Source |
|---|---|
| Vendor advisory 1Establishes: Affected and fixed versions. | |
| Advisory | GitHub · getgrav/grav · Advisory GHSA-4grx-p93p-25w8 |
| CVE record 2Establishes: The identifier and description. | |
| Record | CVE List · CVE-2026-137305 |
| Record | NVD · CVE-2026-137305 |
| Public exploit code 1Establishes: Public exploit code exists (Exploit-DB, Metasploit, Nuclei and GitHub). | |
| Exploit | GitHub · googlesky/CVE-2026-137305 · Repository |
| Other links 2 | |
| Patch | GitHub · getgrav/grav-plugin-form · Commit 3daa9cb6 |
| Link | vulncheck.com · advisories/grav-form-plugin-before-9.2.4-code-injection-via-file-field-upload-destination |
Questions about CVE-2026-137305
Is CVE-2026-137305 being exploited?
It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.
Source: cve.now feed data
What does this mean?
A page editor with no media, configuration or admin permissions can point a file field's upload destination at a folder that Twig loads templates from. This can run shell commands as the web server user, read secrets and account files, create a super admin account, or change site files.
Source: github.com
Which versions are affected by CVE-2026-137305?
getgrav/grav-plugin-form (Packagist): before 9.2.4.
Source: cve.now feed data
Am I affected, and how do I check?
Form plugin 9.2.3 and earlier on Grav 2.x are in scope, and the risk also requires a file field whose upload destination points into a folder Twig loads templates from. A reader can check the installed Form plugin version in the plugin list or its blueprint, and check the upload destination of each file field in their forms.
Source: github.com
How do I fix CVE-2026-137305?
Upgrade the Form plugin to 9.2.4 or later, which is the fixed version listed for this vulnerability.
Source: github.com
Related
- CVE-2026-42845Grav: Anonymous Page Content Overwrite via Form File Upload filename Override
- CVE-2026-85602Grav Form Plugin before 9.1.20 reCAPTCHA v3 Authentication Bypass
- CVE-2026-134250Grav Form Plugin 1.1.0 before 9.1.40 Stored XSS via Unsanitized File Uploads
- CVE-2026-69087Grav Form Plugin before 9.1.13 Open Redirect via form.value() Twig
- CVE-2026-86194Grav Form Plugin before 9.1.22 Cross-Page Form Execution
- CVE-2026-42842grav-plugin-form: XSS via Taxonomy Field Values in Admin Panel
No corrections so far. Something wrong on this page? Report an error.