Grav
Grav before 4.2.2 Remote Code Execution via Email Twig
The Grav Email plugin (getgrav/grav-plugin-email) before 4.2.2 renders page-editor-controlled Email action parameters as unsandboxed Twig templates. An authenticated remote user with only api.access and api.pages.write permissions can place a Twig expression in header.form.process.email.body, publish the page, and submit the form to execute an arbitrary operating-system command as the account running PHP.
First public PoC
None yetno public PoC found
Public PoCs00 on GitHub
CVSS8.8high · scored by CNA · CWE-1336
CISA KEV
Not listednot known exploited
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
getgrav grav
- < 4.2.2
Fixed in 4.2.2
Mitigation
Upgrade grav to 4.2.2 or later.
References
- Vendor advisory github.com/getgrav/grav/security/advisories/GH…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.