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.
Published: 2026-07-15
Score: 7.2 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

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.

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

Remediation

No vendor fix or workaround currently provided.

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

History

Tue, 28 Jul 2026 16:15:00 +0000

Type Values Removed Values Added
CPEs cpe:2.3:a:getgrav:grav:*:*:*:*:*:*:*:*

Wed, 15 Jul 2026 21:15:00 +0000

Type Values Removed Values Added
First Time appeared Getgrav
Getgrav grav
Vendors & Products Getgrav
Getgrav grav

Wed, 15 Jul 2026 18:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Wed, 15 Jul 2026 12:00:00 +0000

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'}


cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-07-28T13:02:11.740Z

Reserved: 2026-07-10T21:54:26.760Z

Link: CVE-2026-61873

cve-icon Vulnrichment

Updated: 2026-07-15T18:00:29.031Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-31T04:00:15Z

Weaknesses
  • CWE-73

    External Control of File Name or Path