{"id":"CVE-2025-66297","published":"2025-12-01T21:05:44Z","modified":"2025-12-02T14:26:52Z","title":"Grav vulnerable to Privilege Escalation and Authenticated Remote Code Execution via Twig Injection","vendor":"getgrav","product":"grav","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.4,"severity":"HIGH","version":"4.0","vector":"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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01187,"percentile":0.67751,"provenance":"source"},"cwes":[{"id":"CWE-1336","name":"Improper Neutralization of Special Elements Used in a Template Engine"}],"references":[{"url":"https://github.com/getgrav/grav/security/advisories/GHSA-858q-77wx-hhx6","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/getgrav/grav/commit/e37259527d9c1deb6200f8967197a9fa587c6458","tags":["x_refsource_MISC"]}],"priority":{"score":18.7,"factors":[{"name":"EPSS percentile","points":13.55},{"name":"CVSS severity","points":5.18}]},"vendorSlug":"getgrav","affectedVersions":[{"vendor":"getgrav","product":"grav","versions":["< 1.8.0-beta.27"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"total","timestamp":"2025-12-02T14:26:40.686802Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Packagist","package":"getgrav/grav","vulnerableRanges":["<1.8.0-beta.27"],"patched":["1.8.0-beta.27"],"from":["GHSA-858q-77wx-hhx6"],"provenance":"source"}],"summary":{"text":"The flaw is a Twig template injection in the Grav file-based web platform (vendor getgrav, product grav), where the page frontmatter processing can be abused. An attacker who already holds admin panel access with permission to create or edit pages can enable Twig processing in the frontmatter and inject malicious Twig expressions to escalate their privileges to admin or run arbitrary system commands through the scheduler API, which requires network access and low-privilege authentication with no user interaction.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:10:12Z"},"euvd":{"id":"EUVD-2025-200078","exploited":false,"provenance":"source"}}