# CVE-2023-34448: Grav Server-side Template Injection (SSTI) via Twig Default Filters

- Severity: High 8.8 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 4.52%, higher than 91% of CVEs (2026-12-01)
- Public exploit code or proof of concept: 2 links below, marked "exploit"
- Published: 2023-06-14T22:06:01.338Z
- Modified: 2026-09-10T03:50:02.448Z
- Also known as: GHSA-whr7-m3f8-mpm8
- Weaknesses: CWE-20, CWE-94, CWE-1336
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: GitHub_M

## Description

Grav is a flat-file content management system. Prior to version 1.7.42, the patch for CVE-2022-2073, a server-side template injection vulnerability in Grav leveraging the default `filter()` function, did not block other built-in functions exposed by Twig's Core Extension that could be used to invoke arbitrary unsafe functions, thereby allowing for remote code execution. A patch in version 1.74.2 overrides the built-in Twig `map()` and `reduce()` filter functions in `system/src/Grav/Common/Twig/Extension/GravExtension.php` to validate the argument passed to the filter in `$arrow`.

(As written by CVE List.)

## Affected

- getgrav grav: < 1.7.42; before 1.7.42
- getgrav/grav (Packagist): before 1.7.42

## Every score

- GitHub_M: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 7.2 High `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 7.2 High `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://huntr.dev/bounties/3ef640e6-9e25-4ecb-8ec1-64311d63fe66/> (exploit, patch, third-party-advisory)
- <https://www.github.com/getgrav/grav/commit/9d6a2dba09fd4e56f5cdfb9a399caea355bfeb83> (exploit, mitigation, vendor-advisory, web)
- <https://github.com/getgrav/grav/security/advisories/GHSA-whr7-m3f8-mpm8> (vendor-advisory, web)
- <https://github.com/getgrav/grav/commit/8c2c1cb72611a399f13423fc6d0e1d998c03e5c8> (patch, vendor-advisory, web)
- <https://github.com/twigphp/Twig/blob/v1.44.7/src/Environment.php#L148> (vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2023-34448> (advisory)
- <https://github.com/getgrav/grav/commit/244758d4383034fe4cd292d41e477177870b65ec> (web)
- <https://github.com/getgrav/grav/commit/71bbed12f950de8335006d7f91112263d8504f1b> (web)
- <https://github.com/getgrav/grav/commit/9d01140a63c77075ef09b26ef57cf186138151a5> (web)
- <https://github.com/getgrav/grav> (package)
- <https://huntr.dev/bounties/3ef640e6-9e25-4ecb-8ec1-64311d63fe66> (web)

## Sources

- CVE List: [CVE-2023-34448](https://www.cve.org/CVERecord?id=CVE-2023-34448), CVE Terms of Use, modified 2024-12-18
- GitHub Advisory Database: [GHSA-whr7-m3f8-mpm8](https://github.com/advisories/GHSA-whr7-m3f8-mpm8), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2023-34448](https://nvd.nist.gov/vuln/detail/CVE-2023-34448), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2023-34448 · Whole record: https://cve.day/CVE-2023-34448.json · Rebuilt by cve.day 2026-11-25T22:58:24.864Z
