CVE-2021-29440

mediumpriority · attend · 49EPSS 0.299 · 98 %ileexploit · PoCEUUS
grimoire priorityP1 · Urgent
Exploitable?
Public exploit
2 exploits · PoC
Likely / severe?
29.9% (98th) EPSS
CVSS 6.5 · medium
Is it mine?
3 products
Check your exposure
Who says so?
4 sources
cnnvd · enisa_euvd · nvd · osv

EPSS · scored 2026-10-27

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.

01

cvss

Technical severity, 0–10. One row per scoring source.

8.4
010

base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · medium–high · 6.5–8.4

v2.06.5mediumAV:N/AC:L/Au:S/C:P/I:P/A:Pprimary · NVD / NIST USexploitability 8 · impact 6.4
v3.17.2highCVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:Hprimary · NVD / NIST USexploitability 1.2 · impact 5.9
v3.18.4highCVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:Hsecondary · ENISA EU
v3.18.4highCVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:Hsecondary · security-advisories@github.comexploitability 1.7 · impact 6
v3.18.4highCVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:Hsecondary · OSV
v3.16.8mediumCVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H/E:Psecondary · CVSS-BT (t0sche)
02

weaknesses

The CWE weakness classes this flaw belongs to.

03

exploits (2)

Public proof-of-concept and weaponised exploit code.

04

affected products (3)

Products and version ranges known to be affected.

05

advisories (1)

Vendor and ecosystem advisories describing this.

  • GHSA-g8r4-p96j-xfxcGrav's Twig processing allowing dangerous PHP functions by default2021-04-16ghsa · osvUS

    ### Impact 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. ### Patches The issue was addressed by preventing dangerous functions from being called in Twig templates. A configuration option has been added to manually allow arbitrary PHP functions (`system.twig.safe_functions`) and filters (`system.twig.safe_filters`). Futures major versions of Grav may disable this functionality by default. ### Workarounds Blocking access to the `/admin` path from untrusted sources will reduce the probability of exploitation. ### References - https://portswigger.net/research/server-side-template-injection - https://blog.sonarsource.com/grav-cms-code-execution-vulnerabilities ### For more information If you have any questions or comments about this advisory, you can contact: - The original reporters, by sending an email to vulnerability.research [at] sonarsource.com; - The maintainers, by opening an issue on this repository.

06

also known as (3)

Other names and identifiers for this entity.

07

sources

Which sources assert this record, and when.

published 2021-04-13modified 2026-06-17
08

references (16)

External citations — patches, advisories, analysis.

scry

Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.

Free scan