CVE-2026-86197

Grav before 2.0.20 Cross-Site Scripting via Assets Sandbox

State
Published
Severity
5.1 Medium
Published
Sep 5, 2026
Updated
Oct 8, 2026
Reserved
Sep 5, 2026

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
4.05.1 MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:NVulnCheck

Weaknesses

  • CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Affected Products

ProductVersions
gravgetgrav
  • before 2.0.20Affected
  • 2.0.20Not affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.