Duplicate Advisory: Grav: XSS Blueprint Validation Bypass via Twig String Concatenation
Grav version 2.0.0 contains a cross-site scripting (XSS) vulnerability related to its blueprint validation process. The vulnerability arises when Twig content processing is enabled, allowing an attacker with page-write API permissions to bypass the XSS validator by using Twig string concatenation to construct malicious event handlers or tags dynamically. This results in arbitrary JavaScript execution in visitors' browsers. The issue was fixed in version 2.0.1.
AI Analysis
Technical Summary
The vulnerability in Grav v2.0.0 involves the XSS blueprint validator (Security::detectXss()) which inspects 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 exploit Twig's string concatenation operator (~) to dynamically create event handler names, dangerous tags, or protocols at render time. The validator only sees the Twig expressions, which appear harmless, but after rendering, the output includes active payloads such as <img src=1 onerror=alert(1)>, enabling arbitrary JavaScript execution in users' browsers. This vulnerability is classified under CWE-79 and has a CVSS 3.1 score of 6.1 (medium severity).
Potential Impact
Successful exploitation allows an attacker with page-write API permissions to inject malicious JavaScript that executes in the browsers of site visitors, potentially leading to session hijacking, defacement, or other client-side attacks. The vulnerability affects confidentiality and integrity with limited impact on availability.
Mitigation Recommendations
An official fix is available in Grav version 2.0.1. Users should upgrade from version 2.0.0 to 2.0.1 or later to remediate this vulnerability. No other mitigations are indicated by the vendor advisory.
Duplicate Advisory: Grav: XSS Blueprint Validation Bypass via Twig String Concatenation
Description
Grav version 2.0.0 contains a cross-site scripting (XSS) vulnerability related to its blueprint validation process. The vulnerability arises when Twig content processing is enabled, allowing an attacker with page-write API permissions to bypass the XSS validator by using Twig string concatenation to construct malicious event handlers or tags dynamically. This results in arbitrary JavaScript execution in visitors' browsers. The issue was fixed in version 2.0.1.
CVSS v3.1
Score 6.1medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in Grav v2.0.0 involves the XSS blueprint validator (Security::detectXss()) which inspects 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 exploit Twig's string concatenation operator (~) to dynamically create event handler names, dangerous tags, or protocols at render time. The validator only sees the Twig expressions, which appear harmless, but after rendering, the output includes active payloads such as <img src=1 onerror=alert(1)>, enabling arbitrary JavaScript execution in users' browsers. This vulnerability is classified under CWE-79 and has a CVSS 3.1 score of 6.1 (medium severity).
Potential Impact
Successful exploitation allows an attacker with page-write API permissions to inject malicious JavaScript that executes in the browsers of site visitors, potentially leading to session hijacking, defacement, or other client-side attacks. The vulnerability affects confidentiality and integrity with limited impact on availability.
Mitigation Recommendations
An official fix is available in Grav version 2.0.1. Users should upgrade from version 2.0.0 to 2.0.1 or later to remediate this vulnerability. No other mitigations are indicated by the vendor advisory.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-373m-p57p-8665
- Osv Schema Version
- 1.4.0
- Ecosystems
- ["Packagist"]
- Database Specific Severity
- MODERATE
- Cvss Version
- 3.1
Threat ID: 6aab494a55bf5e2cf599045b
Added to database: 09/17/2026, 01:58:34 UTC
Last enriched: 09/17/2026, 02:03:58 UTC
Last updated: 09/17/2026, 02:03:58 UTC
Views: 2
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.