CVE-2026-61873

Grav before 9.1.8 Arbitrary File Write via Twig-Processed Filename

Published Jul 15, 2026 CVSS 4.0 · 7.2 High EPSS < 1% KEV · Not listed
Description
Grav before 9.1.8 contains an arbitrary file write vulnerability in the Form plugin's process.save.filename parameter, which is validated against path traversal before Twig processing but never re-validated after rendering. Attackers can submit form data containing path traversal sequences that are processed through Twig templates, allowing them to write arbitrary files including PHP webshells to the web root or other sensitive directories.

Analysis

AI-generated

Technical impact

An arbitrary file write flaw exists in Grav CMS prior to version 9.1.8. The vulnerability lies in the Form plugin where the `process.save.filename` parameter is checked for path traversal before Twig templates are applied, but not re‑checked afterward. An attacker can submit a form containing a filename with Twig syntax that expands to a path traversal sequence, enabling the server to write an arbitrary file such as a PHP webshell into the web root or other writable directories. This can result in remote code execution, site defacement, or the compromise of other files.

Affected Systems

The flaw affects installations of Grav CMS using the Form plugin version earlier than 9.1.8. The product is maintained by the Grav project (getgrav). Only releases prior to 9.1.8 are vulnerable; newer releases contain the patch.

Risk and Exploitability

The CVSS score of 7.2 marks it as high severity. The EPSS score is below 1 %, indicating low but non‑zero exploitation probability, and the vulnerability is not listed in CISA’s KEV catalog. The attack vector is inferred to be remote, via a publicly accessible web form that the Form plugin processes. An attacker must be able to reach the Form endpoint and provide crafted filename data; no local privilege escalation is required.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Grav CMS to version 9.1.8 or later to apply the vendor patch
  • If upgrading is not immediately possible, disable the Form plugin or block the upload endpoint to prevent exploitation
  • After upgrading, review and restrict the file system permissions to the minimal directories required by the Form plugin and ensure the web server runs with least privilege
  • Continuously monitor the web root and other writable directories for unexpected files, especially PHP code, and audit logs for suspicious upload activity

Generated by OpenCVE AI on July 31, 2026 at 03:47 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
CPEs cpe:2.3:a:getgrav:grav:*:*:*:*:*:*:*:*
Type Values Removed Values Added
First Time appeared Getgrav
Getgrav grav
Vendors & Products Getgrav
Getgrav grav
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description Grav before 9.1.8 contains an arbitrary file write vulnerability in the Form plugin's process.save.filename parameter, which is validated against path traversal before Twig processing but never re-validated after rendering. Attackers can submit form data containing path traversal sequences that are processed through Twig templates, allowing them to write arbitrary files including PHP webshells to the web root or other sensitive directories.
Title Grav before 9.1.8 Arbitrary File Write via Twig-Processed Filename
Weaknesses CWE-73
References
Metrics cvssV3_1

{'score': 8.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H'}

cvssV4_0

{'score': 7.2, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-73

    External Control of File Name or Path

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Jul 28, 2026, 1:02 PM
Reserved
Jul 10, 2026, 9:54 PM
Status
Deferred
Published
Jul 15, 2026, 12:18 PM
Modified
Oct 24, 2026, 9:10 PM