Skip to main content
← All vulnerabilities
CVE-2026-61453GHSA-2C4F-86XC-CR74

Grav before 2.0.1 XSS via Twig String Concatenation

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 2.0.1
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: poc
  • Automatable: no
  • Technical impact: partial

Summary

Grav v2.0.0 contains a cross-site scripting vulnerability (fixed in 2.0.1). The XSS blueprint validator (Security::detectXss()) runs on raw page content before Twig processing. When Twig content processing is enabled (twig_content.process_enabled: true), an attacker with page-write API permission can use Twig's string concatenation operator (~) to dynamically construct event handler names, dangerous tag names, or dangerous protocols at render time (e.g. {% set x = "on" ~ "error" %}). The validator sees only the harmless Twig expression and allows the content, but after Twig rendering the output (rendered via {{ page.content|raw }}) contains an active payload such as <img src=1 onerror=alert(1)>, executing arbitrary JavaScript in visitors' browsers.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: poc · Automatable: no · Technical impact: partial

  3. Record last updated

Affected versions

  • getgrav grav

    fixed in 2.0.1

  • getgrav/gravPackagist

    From 2.0.0 · fixed in 2.0.1

References 2

GitHub · getgrav/grav

vulncheck.com