# CVE-2025-66294: Grav is vulnerable to RCE via SSTI through Twig Sandbox Bypass

- Severity: High 8.7 (CVSS:4.0, scored by GitHub_M) `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- 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): 3.04%, higher than 87% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2025-12-01T20:52:08.533Z
- Modified: 2026-09-26T00:10:00.127Z
- Also known as: GHSA-662m-56v4-3r8f
- Weaknesses: CWE-94, CWE-1336
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total
- Assigned by: GitHub_M

## Description

Grav is a file-based Web platform. Prior to 1.8.0-beta.27, a Server-Side Template Injection (SSTI) vulnerability exists in Grav that allows authenticated attackers with editor permissions to execute arbitrary commands on the server and, under certain conditions, may also be exploited by unauthenticated attackers. This vulnerability stems from weak regex validation in the cleanDangerousTwig method. This vulnerability is fixed in 1.8.0-beta.27.

(As written by CVE List.)

## Affected

- getgrav grav: < 1.8.0-beta.27; from 1.7.48 before 1.8.0; 1.8.0
- getgrav/grav (Packagist): before 1.8.0-beta.27

## Every score

- GitHub_M: CVSS:4.0 8.7 High `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- GitHub: CVSS:4.0 High `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- NVD: 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`

## References

- <https://github.com/getgrav/grav/security/advisories/GHSA-662m-56v4-3r8f> (exploit, vendor-advisory, web)
- <https://github.com/getgrav/grav/commit/e37259527d9c1deb6200f8967197a9fa587c6458> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-66294> (advisory)
- <https://github.com/getgrav/grav> (package)

## Sources

- CVE List: [CVE-2025-66294](https://www.cve.org/CVERecord?id=CVE-2025-66294), CVE Terms of Use, modified 2025-12-02
- GitHub Advisory Database: [GHSA-662m-56v4-3r8f](https://github.com/advisories/GHSA-662m-56v4-3r8f), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2025-66294](https://nvd.nist.gov/vuln/detail/CVE-2025-66294), Public domain, modified 2026-09-26

---

Page: https://cve.day/CVE-2025-66294 · Whole record: https://cve.day/CVE-2025-66294.json · Rebuilt by cve.day 2026-11-25T22:59:08.139Z
