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

- Severity: Critical 10.0 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/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): 2.34%, higher than 84% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2023-06-14T21:31:31.908Z
- Modified: 2026-06-17T06:03:13.443Z
- Also known as: GHSA-f9jf-4cp4-4fq5
- Weaknesses: CWE-94
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: GitHub_M

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

(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 10.0 Critical `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H`
- GitHub: CVSS:3.1 9.1 Critical `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/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://github.com/getgrav/grav/security/advisories/GHSA-f9jf-4cp4-4fq5> (exploit, vendor-advisory, web)
- <https://github.com/getgrav/grav/commit/9d01140a63c77075ef09b26ef57cf186138151a5> (patch, web)
- <https://github.com/getgrav/grav/blob/develop/system/src/Grav/Common/Twig/Extension/GravExtension.php#L174> (vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2023-34251> (advisory)
- <https://github.com/getgrav/grav/commit/244758d4383034fe4cd292d41e477177870b65ec> (web)
- <https://github.com/getgrav/grav/commit/71bbed12f950de8335006d7f91112263d8504f1b> (web)
- <https://github.com/getgrav/grav/commit/8c2c1cb72611a399f13423fc6d0e1d998c03e5c8> (web)
- <https://github.com/getgrav/grav> (package)

## Sources

- CVE List: [CVE-2023-34251](https://www.cve.org/CVERecord?id=CVE-2023-34251), CVE Terms of Use, modified 2024-12-27
- GitHub Advisory Database: [GHSA-f9jf-4cp4-4fq5](https://github.com/advisories/GHSA-f9jf-4cp4-4fq5), CC-BY-4.0, modified 2024-02-16
- NVD: [CVE-2023-34251](https://nvd.nist.gov/vuln/detail/CVE-2023-34251), Public domain, modified 2026-06-17

---

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