# Grav Server-side Template Injection (SSTI) via Twig Default Filters

Advisory record · `GHSA-96xv-rmwj-6p9w`

- **Identifiers:** `GHSA-96xv-rmwj-6p9w` · `CVE-2023-34252` · `PKSA-czz7-ybjd-h94w`
- **State:** Confirmed
- **Severity:** CVSS 8.8 High
- **Critical:** No
- **Weakness (CWE):** [CWE-94](https://cwe.mitre.org/data/definitions/94.html) · [CWE-184](https://cwe.mitre.org/data/definitions/184.html) · [CWE-1336](https://cwe.mitre.org/data/definitions/1336.html)
- **Tags:** [Code injection](https://agentprime.io/advisories/tag/code-injection.md) · [CWE-184](https://agentprime.io/advisories/tag/cwe-184.md)
- **Published:** 16 Jun 2023
- **Updated:** 16 Feb 2024
- **Reviewed by a person:** No

Published by the GitHub Advisory Database at 16 Jun 2023, 19:36 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

## Affected packages

- `getgrav/grav` (Packagist): affected `<1.7.42`; fixed in `1.7.42`

## Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

> Grav (getgrav/grav) versions before 1.7.42 are vulnerable to server-side template injection through Twig's filter function, which can lead to remote code execution. An attacker needs an administrator account, or a user account with Admin panel login and page creation or update permissions, to create or edit a page with a crafted Twig template. Upgrade to Grav 1.7.42 or later. Setting the Twig undefined_functions and undefined_filters options to false in system.yaml is a further mitigation.

Written 4 Nov 2026.

## Not analysed yet

We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.

## Severity and exploitation

- 8.8 High, CVSS 3.1: `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`, from CNA (GitHub_M)

- **CISA KEV:** Not listed.
- **EPSS:** 0.021, the 81st percentile, on 8 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

## Timeline

- 31 Oct 2026, 14:31 UTC: First seen by agentprime
- 31 Oct 2026, 14:31 UTC: [Confirmed by OSV](https://osv.dev/vulnerability/GHSA-96xv-rmwj-6p9w)

## Sources

- [GitHub Advisory Database: GHSA-96xv-rmwj-6p9w](https://github.com/advisories/GHSA-96xv-rmwj-6p9w)
- [OSV: GHSA-96xv-rmwj-6p9w](https://osv.dev/vulnerability/GHSA-96xv-rmwj-6p9w)
- <https://github.com/getgrav/grav/security/advisories/GHSA-96xv-rmwj-6p9w>
- <https://nvd.nist.gov/vuln/detail/CVE-2023-34252>
- <https://github.com/getgrav/grav/commit/244758d4383034fe4cd292d41e477177870b65ec>
- <https://github.com/getgrav/grav/commit/71bbed12f950de8335006d7f91112263d8504f1b>
- <https://github.com/getgrav/grav/commit/8c2c1cb72611a399f13423fc6d0e1d998c03e5c8>
- <https://github.com/getgrav/grav/commit/9d01140a63c77075ef09b26ef57cf186138151a5>
- <https://github.com/getgrav/grav>
- <https://github.com/getgrav/grav/blob/1.7.40/system/src/Grav/Common/Twig/Extension/GravExtension.php#L1692-L1698>
- <https://github.com/getgrav/grav/blob/1.7.40/system/src/Grav/Common/Utils.php#L1956-L2074>

Facts on this page come from the GitHub Advisory Database (CC-BY 4.0), OSV and the other sources listed, as published. We don’t reproduce full advisory descriptions, which can contain exploit code.

## Check whether this affects you

A Match means an installed version is in the affected range above. Most don’t affect the app; agentprime hasn’t analysed this one yet.

- With the agentprime MCP server (<https://api.agentprime.io/mcp>), ask your agent to check the project: `check_lockfile` sends a lockfile, `check_packages` a list of installed packages, and both return the Matches and the upgrades that clear them. `get_advisory` returns this record. Setup: <https://agentprime.io/mcp.md>
- In a browser: <https://agentprime.io/check/> reads your lockfile in the browser, never uploading it.
- Whether it touches your code, with file and line: the Claude Code plugin, <https://agentprime.io/plugin.md>
- As JSON: <https://api.agentprime.io/v1/advisories/GHSA-96xv-rmwj-6p9w>, or `POST https://api.agentprime.io/v1/match` with your packages (<https://agentprime.io/api.md>)

---

The web page: <https://agentprime.io/advisories/GHSA-96xv-rmwj-6p9w/>. Everything for agents: <https://agentprime.io/llms.txt>.
