What’s Vulnerable › Vulnerabilities
CVE-2023-34251: Grav Server Side Template Injection vulnerability
- Severity: high (CVSS 7.2 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 2.3% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2023-06-14 · updated 2026-06-17
- Weakness: CWE-94
Description
Grav is a flat-file content management system. Versions prior to 1.7.42 are vulnerable to server side template injection. Remote code execution is possible by embedding malicious PHP code on the administrator screen by a user with page editing privileges. Version 1.7.42 contains a fix for this issue.
Affected products
- getgrav grav: before 1.7.42 — fixed in 1.7.42
How to fix
Upgrade to a fixed version: getgrav grav 1.7.42. Check the vendor advisory for mitigations.
References
- https://github.com/getgrav/grav/blob/develop/system/src/Grav/Common/Twig/Extension/GravExtension.php#L174
- https://github.com/getgrav/grav/commit/9d01140a63c77075ef09b26ef57cf186138151a5
- https://github.com/getgrav/grav/security/advisories/GHSA-f9jf-4cp4-4fq5
- https://github.com/getgrav/grav/blob/develop/system/src/Grav/Common/Twig/Extension/GravExtension.php#L174
- https://github.com/getgrav/grav/commit/9d01140a63c77075ef09b26ef57cf186138151a5
- https://github.com/getgrav/grav/security/advisories/GHSA-f9jf-4cp4-4fq5
Get alerted when CVE-2023-34251 or the next vulnerability affects your stack