# CVE-2025-66297: Grav vulnerable to Privilege Escalation and Authenticated Remote Code Execution via Twig Injection

- Severity: High 7.4 (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/E:P`
- 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): 0.85%, higher than 59% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2025-12-01T21:05:44.536Z
- Modified: 2026-09-26T00:10:00.127Z
- Also known as: GHSA-858q-77wx-hhx6
- Weaknesses: 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 user with admin panel access and permissions to create or edit pages in Grav CMS can enable Twig processing in the page frontmatter. By injecting malicious Twig expressions, the user can escalate their privileges to admin or execute arbitrary system commands via the scheduler API. This results in both Privilege Escalation (PE) and Remote Code Execution (RCE) vulnerabilities. This vulnerability is fixed in 1.8.0-beta.27.

(As written by CVE List.)

## Affected

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

## Every score

- GitHub_M: CVSS:4.0 7.4 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/E:P`
- 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/E:P`
- 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-858q-77wx-hhx6> (exploit, third-party-advisory, web)
- <https://github.com/getgrav/grav/commit/e37259527d9c1deb6200f8967197a9fa587c6458> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-66297> (advisory)
- <https://github.com/getgrav/grav> (package)

## Sources

- CVE List: [CVE-2025-66297](https://www.cve.org/CVERecord?id=CVE-2025-66297), CVE Terms of Use, modified 2025-12-02
- GitHub Advisory Database: [GHSA-858q-77wx-hhx6](https://github.com/advisories/GHSA-858q-77wx-hhx6), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2025-66297](https://nvd.nist.gov/vuln/detail/CVE-2025-66297), Public domain, modified 2026-09-26

---

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