Loading HuntDB...

CVE-2021-29440

HIGH
Published 2021-04-13T19:55:13
Actions:

Expert Analysis

Professional remediation guidance

Get tailored security recommendations from our analyst team for CVE-2021-29440. We'll provide specific mitigation strategies based on your environment and risk profile.

CVSS Score

V3.1
8.4
/10
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:H
Base Score Metrics
Exploitability: N/A Impact: N/A

EPSS Score

v2025.03.14
0.144
probability
of exploitation in the wild

There is a 14.4% chance that this vulnerability will be exploited in the wild within the next 30 days.

Updated: 2025-06-25
Exploit Probability
Percentile: 0.941
Higher than 94.1% of all CVEs

Attack Vector Metrics

Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
HIGH
User Interaction
REQUIRED
Scope
CHANGED

Impact Metrics

Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH

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.

Available Exploits

No exploits available for this CVE.

Related News

No news articles found for this CVE.

Affected Products

Affected Versions:

GitHub Security Advisories

Community-driven vulnerability intelligence from GitHub

✓ GitHub Reviewed HIGH

Grav's Twig processing allowing dangerous PHP functions by default

GHSA-g8r4-p96j-xfxc

Advisory Details

### 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.

Affected Packages

Packagist getgrav/grav
ECOSYSTEM: ≥0 <1.7.11

CVSS Scoring

CVSS Score

7.5

CVSS Vector

CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:H

Advisory provided by GitHub Security Advisory Database. Published: April 16, 2021, Modified: August 11, 2022

References

Published: 2021-04-13T19:55:13
Last Modified: 2024-08-03T22:02:51.882Z
Copied to clipboard!