CVE-2021-29440
HIGH 7.2CVSS 3.1Grav's Twig processing allowing dangerous PHP functions by default
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.
- Published
- 13 Apr 2021
- Last modified
- 17 Jun 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-94
- Also known as
- GHSA-g8r4-p96j-xfxc
- Sources
- NVDJSONOSV GHSA-g8r4-p96j-xfxcJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | HIGH 8.4 | CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:H |
| OSV | GitHub | CVSS 3.1 | HIGH 8.4 | CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.2 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 6.5 | AV:N/AC:L/Au:S/C:P/I:P/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | getgrav | gravcpe:2.3:a:getgrav:grav:*:*:*:*:*:*:*:* |
< 1.7.11 | 1.7.11 |
| OSV | Packagist | getgrav/grav | < 1.7.11 | 1.7.11 |
References
- http://packetstormsecurity.com/files/162987/Grav-CMS-1.7.10-Server-Side-Template-Injection.html · Exploit, Third Party Advisory, VDB Entry, WEB
- https://blog.sonarsource.com/grav-cms-code-execution-vulnerabilities · Exploit, Third Party Advisory, WEB
- https://github.com/getgrav/grav/security/advisories/GHSA-g8r4-p96j-xfxc · Third Party Advisory, WEB
- https://packagist.org/packages/getgrav/grav · Product, Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2021-29440 · ADVISORY
History
- 25 Nov 2026 20:32 UTC · NVD: first stored (published 13 Apr 2021)
- 25 Nov 2026 20:15 UTC · OSV: first stored (published 16 Apr 2021)