CVE-2026-86197
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.
How to fix
- getgrav/grav2.0.20 or later
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| getgrav/gravPackagist | v < 2.0.20 | 2.0.20 |
Check your version
Choose the product and enter the version you run to see whether it falls in the affected range.
Attack Surface Management
See the assets tied to your domains, the technologies they run and known vulnerabilities in one list.