What’s Vulnerable › Vulnerabilities
CVE-2021-29440: Twig allowing dangerous PHP functions by default
- Severity: high (CVSS 7.2 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 29.9% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2021-04-13 · updated 2026-06-17
- Weakness: CWE-94
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
- getgrav grav: before 1.7.11 — fixed in 1.7.11
How to fix
Upgrade to a fixed version: getgrav grav 1.7.11. Check the vendor advisory for mitigations.
References
- http://packetstormsecurity.com/files/162987/Grav-CMS-1.7.10-Server-Side-Template-Injection.html
- https://blog.sonarsource.com/grav-cms-code-execution-vulnerabilities
- https://github.com/getgrav/grav/security/advisories/GHSA-g8r4-p96j-xfxc
- https://packagist.org/packages/getgrav/grav
- http://packetstormsecurity.com/files/162987/Grav-CMS-1.7.10-Server-Side-Template-Injection.html
- https://blog.sonarsource.com/grav-cms-code-execution-vulnerabilities
- https://github.com/getgrav/grav/security/advisories/GHSA-g8r4-p96j-xfxc
- https://packagist.org/packages/getgrav/grav
Get alerted when CVE-2021-29440 or the next vulnerability affects your stack