Improper Neutralization of Special Elements Used in a Template Engine in Grav CMS - CVE-2025-66299

 

Improper Neutralization of Special Elements Used in a Template Engine in Grav CMS - CVE-2025-66299

Published: May 5, 2026


Vulnerability identifier: #VU130070
CSH Severity: Medium
CVSS v4.0: 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:U/U:Green
CVE-ID: CVE-2025-66299
CWE-ID: CWE-1336
Exploitation vector: Remote access
Exploit availability: No public exploit available
Vendor: Grav CMS
Affected software:
Grav CMS

Detailed vulnerability description

The vulnerability allows a remote user to execute arbitrary code.

The vulnerability exists due to improper neutralization of special elements used in a template engine in the Twig sandbox implementation when processing malicious Twig template directives in editable pages. A remote user can inject crafted template directives to execute arbitrary code.

Exploitation requires permission to edit a page with Twig processing enabled, and the injected code may be triggered when the page is later accessed.


How to mitigate CVE-2025-66299

Install security update from vendor's website.

Sources