CVE-2026-61873 Grav before 9.1.8 Arbitrary File Write via Twig-Processed Filename
Attackers can write arbitrary files, including PHP webshells, by exploiting path traversal in Twig-processed filenames within the Grav CMS Form plugin.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2026-61873?
CVE-2026-61873 is a high-severity path traversal vulnerability in getgrav grav, published on 15 Jul 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Official 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.
Weakness: CWE-73
Which versions are affected by CVE-2026-61873?
How do I fix CVE-2026-61873?
No fix has been published for CVE-2026-61873 yet. Limit exposure of the affected software until one is available.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2026-61873 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-61873 exists.
Sources
Also known as CVE-2026-62287, GHSA-m8gp-46r6-rc3f.