CVE-2021-29440 in Getgrav Grav
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 ad...
Affects 1 product from 1 vendor. Facts below cite their sources.
Remotely exploitable over the network, low complexity, high privileges required, no user interaction needed, impact contained to the vulnerable component, full confidentiality impact, full integrity impact, full availability impact.
Affected products and versions
| Vendor | Product | Affected versions |
|---|---|---|
| Getgrav | Grav | < 1.7.11 |
A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.
Fix and vendor advisory
No official vendor advisory link on record. See the CVE record.
Exploitation
| CISA known-exploited | Not in the CISA KEV catalog |
|---|---|
| Public exploit | Reported · reference |
Official 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.
Source: NIST NVD / MITRE CVE.
Record details
| CVE ID | CVE-2021-29440 |
|---|---|
| BreachSpider ID | BS-2021-GLOBAL-247966-H |
| CVSS vector | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H |
| Published | 2021-04-13 |
| Last modified | 2024-11-21 |
| Weakness (CWE) | |
| Source | NVD |
Weakness definitions
CWE-94: Code Injection
Attacker injects arbitrary code that is executed by the application process.
Related attack patterns (CAPEC)
CAPEC-35 Leverage Executable Code in Non-Executable Files via CWE-94
CAPEC-77 Manipulating User-Controlled Variables via CWE-94
CAPEC-242 Code Injection via CWE-94
Mapping is CWE to CAPEC per MITRE CAPEC 3.9.
Analysis AI-written, not human-reviewed
CVE-2021-29440 affects Grav, a file-based web platform, where administrative users can enable Twig processing in static pages, leading to arbitrary code execution and privilege escalation. The issue was addressed in version 1.7.11. Given the CVSS score of 7.2 and the availability of a public proof of concept, the risk is significant for web applications using Grav.
An administrative user can enable Twig processing in the front matter of static pages, which runs unsandboxed, allowing for arbitrary code execution and privilege escalation on the Grav instance. This can be exploited remotely without user interaction.
Compensating controls AI-drafted, review before use
Implement strict access controls and monitor administrative activities to prevent unauthorized enabling of Twig processing. Regularly update Grav to the latest version.
NERC CIP: CIP-007 CIP-007-R2
IEC 62443: SR 7.6
Not validated for your network. A compensating control does not replace the vendor fix.
Questions
What is CVE-2021-29440?
CVE-2021-29440 affects Grav, a file-based web platform, where administrative users can enable Twig processing in static pages, leading to arbitrary code execution and privilege escalation. The issue was addressed in version 1.7.11. Given the CVSS score of 7.2 and the availability of a public proof of concept, the risk is significant for web applications using Grav.
What is the CVSS score for CVE-2021-29440?
CVE-2021-29440 has CVSS 7.2 (High). Vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H. EPSS: 29.9%.
Is CVE-2021-29440 actively exploited?
Public exploit available for CVE-2021-29440. Exploitation risk elevated.
How do I remediate CVE-2021-29440?
Priority: HIGH.
What systems are affected by CVE-2021-29440?
CVE-2021-29440 affects Getgrav Grav.
What NERC-CIP standard applies to CVE-2021-29440?
NERC CIP CIP-007 CIP-007-R2: This CVE violates CIP-007-R2 as it allows unauthorized access and control of the web platform, which could compromise the security of the electronic security perimeter.
What IEC 62443 requirement maps to CVE-2021-29440?
IEC 62443 SR 7.6: This CVE maps to SR 7.6 as it involves the protection against unauthorized access and the prevention of code injection, which is critical for maintaining the security of the web application.
For developers and AI agents
Run this check from your own code or agent
REST API
curl -s https://breachspider.com/api/v1/assets/correlate-cves \
-H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"assets":[{"asset_id":"dev-1","vendor":"Getgrav","product":"Grav","version":"1.0"}]}'
MCP for AI agents
# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp
Free trial: 14 days, 750 device checks, no card.
Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2024-11-21.