What’s Vulnerable › Vulnerabilities

CVE-2026-86197: Grav before 2.0.20 Cross-Site Scripting via Assets Sandbox

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.

Affected products

How to fix

Upgrade to a fixed version: getgrav grav 2.0.20. Check the vendor advisory for mitigations.

References

Get alerted when CVE-2026-86197 or the next vulnerability affects your stack