Skip to content
OpenAdvisories
High · 8.4 Public exploit CVE-2021-29440 EUVD-2021-0824GHSA-g8r4-p96j-xfxc

Twig allowing dangerous PHP functions by default

Published Apr 13, 2021 · Updated Aug 3, 2024 · Assigned by GitHub_M

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

VendorProductAffectedFixed
getgrav grav < 1.7.11 —

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

Exploit-DB 1

GitHub 1 repository

  • CsEnox/CVE-2021-29440 ★ 4 · Jun 6, 2021

    Unsafe Twig processing of static pages leading to RCE in Grav CMS 1.7.10

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Affected packages

EcosystemPackageAffectedFixedRecord
Packagist getgrav/grav < 1.7.11 1.7.11 GHSA-g8r4-p96j-xfxc

References