CVE-2021-29440

Twig allowing dangerous PHP functions by default

State
Published
Severity
8.4 High
Published
Apr 13, 2021
Updated
Aug 3, 2024
Reserved
Mar 30, 2021

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
3.18.4 HighCVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:HGitHub_M

Weaknesses

  • CWE-94 {"CWE-94":"Improper Control of Generation of Code ('Code Injection')"}

Affected Products

ProductVersions
gravgetgrav
  • < 1.7.11Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.