CVE-2025-66299: getgrav grav Code Injection
Vulnerability summary
CVE-2025-66299 is a high (CVSS 8.8) Code Injection vulnerability in getgrav grav. EPSS estimates a 0.61% chance of exploitation in the next 30 days, higher than 48.1% of scored vulnerabilities. 1 public exploit is recorded.
Timeline
- 01-12-2025PublishedVulnerability first disclosed.
- 02-12-2025Last modifiedVulnerability information updated.
Description
Grav is a file-based Web platform. Prior to 1.8.0-beta.27, Grav CMS is vulnerable to a Server-Side Template Injection (SSTI) that allows any authenticated user with editor permissions to execute arbitrary code on the remote server, bypassing the existing security sandbox. Since the security sandbox does not fully protect the Twig object, it is possible to interact with it (e.g., call methods, read/write attributes) through maliciously crafted Twig template directives injected into a web page. This allows an authenticated editor to add arbitrary functions to the Twig attribute system.twig.safe_filters, effectively bypassing the Grav CMS sandbox. This vulnerability is fixed in 1.8.0-beta.27.
CVSS metrics
2 scores · 2 sources · 1 version- NVDNIST8.8HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS trend
Probability
0.61%
Chance of exploitation in the next 30 days
Percentile
48%
Versus all other CVEs
30-day change
+0.01 pp
From 0.60% on 20-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
1 foundGrav
Maturity: poc
Weaknesses
CWE · root cause- CWE-94Improper Control of Generation of Code ('Code Injection')The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.
- CWE-1336Improper Neutralization of Special Elements Used in a Template EngineThe product uses a template engine to insert or process externally-influenced input, but it does not neutralize or incorrectly neutralizes special elements or syntax that can be interpreted as template expressions or other code directives when processed by the engine.
Affected systems
Getgrav1 product
- grav< 1.8.0-beta.27 | < 1.8.0 | 1.8.0:beta1 | 1.8.0:beta10 | 1.8.0:beta11 | 1.8.0:beta12 | 1.8.0:beta13 | 1.8.0:beta14 | 1.8.0:beta15 | 1.8.0:beta16 | 1.8.0:beta17 | 1.8.0:beta18 | 1.8.0:beta19 | 1.8.0:beta2 | 1.8.0:beta20 | 1.8.0:beta21 | 1.8.0:beta22 | 1.8.0:beta23 | 1.8.0:beta24 | 1.8.0:beta25 | 1.8.0:beta26 | 1.8.0:beta3 | 1.8.0:beta4 | 1.8.0:beta5 | 1.8.0:beta6 | 1.8.0:beta7 | 1.8.0:beta8 | 1.8.0:beta9
1 vendor · 1 product
References
2 links- github.com/getgrav/grav/security/advisories/GHSA-gjc5-8cfh-653xX Refsource CONFIRMExploitThird Party Advisory