CVE-2026-86197 Details
Description
Grav before 2.0.20 contains a cross-site scripting vulnerability in the Twig sandbox policy that allowlists addJs and addCss methods on Grav\Common\Assets without proper output escaping. Page editors can inject arbitrary script by registering malicious assets or injecting attributes, which are rendered unescaped into document head tags and executed for all visitors including administrators.
A cross-site scripting vulnerability has been identified in Grav versions prior to 2.0.20. The issue arises from the Twig sandbox policy, which allowlists the addJs and addCss methods on Grav\Common\Assets' without proper output escaping. This flaw enables page editors to inject arbitrary scripts by registering malicious assets or injecting attributes. The injected content is rendered unescaped into document head tags, where it is executed for all visitors, including administrators.
Users can upgrade to Grav 2.0.20, where this vulnerability has been fixed by removing the addCss and addJs methods from the allowed sandbox methods and ensuring that asset URLs are HTML-escaped before rendering. For those unable to upgrade, the sandbox policy can be tightened by denying these methods in the user/config/security.yaml file.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Sep 5, 2026CISA-ADP
Assessed Sep 10, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/getgrav/grav/security/advisories/GHSA-8hgv-xc77-jmcr | [email protected] | AdvisoryTechnical AnalysisVendor |
| https://www.vulncheck.com/advisories/grav-before-2.0.20-cross-site-scripting-via-assets-sandbox | [email protected] | Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| Grav | <= 2.0.19 (semver) |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 8, 2026 | CVE Modified | [email protected] |
| Sep 10, 2026 | CVE Modified | CISA-ADP |
| Sep 5, 2026 | New CVE Received | [email protected] |
Volerion