Cyber Resilience

CVE-2025-66297

Getgrav Grav ≤ 1.8.0

Public PoC
Published
01 December 2025
Modified
03 December 2025
Patch / advisory
CVSS Score v4 7.4
Click a component to see what it means
Raw vectorCVSS: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/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
EPSS Score 0.0077 52th percentile
Risk Priority 38 floored blend · peak EPSS

Summary

CVE-2025-66297 is a high-severity Improper Neutralization of Special Elements Used in a Template Engine (CWE-1336) vulnerability in Getgrav Grav. Its CVSS base score is 7.4 (High).

Operationally, exploitation aligns with the MITRE ATT&CK technique Template Injection (T1221); ranked in the top 48% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.

The strongest mitigations our analysis identified map to SA-11 (Developer Testing and Evaluation) and SI-10 (Information Input Validation) — see the control section below for these in your framework.

Deeper analysis AI-assisted summary

Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.

CVE-2025-66297 is a vulnerability in Grav, a file-based web platform, affecting versions prior to 1.8.0-beta.27. It stems from the ability of a user with admin panel access and permissions to create or edit pages to enable Twig processing in the page frontmatter. By injecting malicious Twig expressions, this enables both privilege escalation and remote code execution via the scheduler API. The issue is classified under CWE-1336 and carries a CVSS v3.1 base score of 8.8 (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).

The attack requires low privileges—an authenticated user with admin panel access and page creation or editing rights—and can be carried out over the network with low complexity and no user interaction. Exploitation allows the attacker to escalate privileges to full administrator level or execute arbitrary system commands through the scheduler API, compromising confidentiality, integrity, and availability at a high level.

Grav addresses this vulnerability in version 1.8.0-beta.27. Mitigation details are available in the GitHub security advisory at GHSA-858q-77wx-hhx6 and the fixing commit e37259527d9c1deb6200f8967197a9fa587c6458. Security practitioners should upgrade to the patched version to remediate the issue.

EU & UK References

Vulnerability Data

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…

more

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.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise Techniques

T1221 Template Injection Stealth
Adversaries may create or modify references in user document templates to conceal malicious code or force authentication attempts.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2025-66298Same product: Getgrav Grav
CVE-2024-28116Same product: Getgrav Grav
CVE-2025-66294Same product: Getgrav Grav
CVE-2025-66299Same product: Getgrav Grav
CVE-2023-34252Same product: Getgrav Grav
CVE-2023-34253Same product: Getgrav Grav
CVE-2023-34448Same product: Getgrav Grav
CVE-2023-37897Same product: Getgrav Grav
CVE-2025-66304Same product: Getgrav Grav
CVE-2025-66844Same product: Getgrav Grav

Affected Assets

getgrav
grav
1.8.0 · ≤ 1.8.0

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

Detect
Catch it (NIST detect / respond)

Harden
Shrink the surface (DISA STIG)

Validate
Prove the fix (OWASP ASVS)
  • V1.3.2
  • V1.3.7
  • V1.3.10

Mitigating Controls (NIST 800-53 r5) AI

Developer testing and static analysis can discover missing neutralization of template directives.

Input validation rejects or sanitizes untrusted data before it reaches the template engine, stopping injection of special syntax.

Security engineering principles require use of safe templating APIs and proper escaping of external input.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.PS-06 mostly match
prevents

Secure SDLC practices directly require proper input neutralization in template engines to prevent injection.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

finds

Security testing can detect template-injection flaws but does not itself implement neutralization controls.

prevents

Secure development life cycle mandates input validation and sanitization that directly prevents template-injection weaknesses.

prevents

Application security requirements explicitly call for neutralizing special elements in template engines.

prevents

Secure architecture principles reduce the likelihood of unsafe template processing but do not prescribe specific neutralization techniques.

prevents

Secure coding standards require proper escaping or sandboxing of template directives, directly mitigating CWE-1336.

References