CVE-2021-29440Grav Code Injection
Grav's Twig processing allowing dangerous PHP functions by default
Published Apr 16, 2021 · Updated May 4, 2026 · Also known as GHSA-g8r4-p96j-xfxc
Key Facts
Patch immediately- CVE-2021-29440 is a high-severity vulnerability (CVSS 7.2 v3.1) affecting Grav (Getgrav), getgrav/grav (composer).
- It is not listed in any known-exploited vulnerabilities catalog. Public exploit code is available.
- EPSS estimates a 30% probability of exploitation in the next 30 days.
- Fixed versions are available, including Grav 1.7.11, getgrav/grav 1.7.11.
- Brandefense priority: patch immediately, because public exploit code exists for a high-severity flaw.
Scores
CVSS v3.1
7.2
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
EPSS (30-day exploit likelihood)
30%
Higher than 98.1% of all scored CVEs
Exploit maturity
Proof of concept
ATLAS score
45/100
Publication score, see How it works
Exploitation Verdict
KEV listed
Not listed
Federal due date
None
No federal due date
Ransomware use
Not reported
Attributed actors
None named
Exploit & Defence Guidance
Exploit maturity
Proof of concept
Public exploit code
2
Proof-of-concept links
In-the-wild evidence
1
Reports of active use
Advisories And Exploit References
Description
Grav is a file based Web-platform. Twig processing of static pages can be enabled in the front matter by any administrative user allowed to create or edit pages. As the Twig processor runs unsandboxed, this behavior can be used to gain arbitrary code execution and elevate privileges on the instance. The issue was addressed in version 1.7.11.
Affected Products
3 affected entries in total| Product | Affected versions | Fixed in |
|---|---|---|
| GravGetgrav | >= < 1.7.11 | 1.7.11 |
| getgrav/gravcomposer | See advisory | 1.7.11 |
Patched Releases
Grav
1.7.11
getgrav/grav
1.7.11
Timeline
Publicly disclosed
Apr 16, 2021
Last updated
May 4, 2026
Weakness Type
- CWE-94 Improper Control of Generation of Code ('Code Injection')
References
- advisorynvd.nist.gov · CVE-2021-29440
- advisoryGHSA advisory
- advisorygithub.com · GHSA-g8r4-p96j-xfxc
- advisorypackagist.org · grav
- exploitpacketstormsecurity.com · Grav-CMS-1.7.10-Server-Side-Template-Injection.…
FAQ
Common Questions.
Grav is a file based Web-platform.
Affected: Grav (Getgrav) versions >= < 1.7.11; getgrav/grav (composer). The full list is in the CVE brief.
It is not listed in any known-exploited vulnerabilities catalog.
No, it is not currently listed in the CISA Known Exploited Vulnerabilities catalog.
Public exploit code is available.
Fixed versions are available, including Grav 1.7.11, getgrav/grav 1.7.11.
Brandefense priority: patch immediately, because public exploit code exists for a high-severity flaw.
Is CVE-2021-29440 On Your Attack Surface?
Brandefense matches it against the products discovered on your perimeter and opens a finding the day a CVE like this is listed.
Request A Demo