XSS in Thephpleague Commonmark
CVE-2026-30838
league/commonmark is a PHP Markdown parser. Prior to version 2.8.1, the DisallowedRawHtml extension can be bypassed by inserting a newline, tab, or other ASCII whitespace character between a disallowed HTML tag name and the closing >. For example, <script\n> would pass through unfiltered and be rendered as a valid HTML tag by browsers. This is a cross-site scripting (XSS) vector for any application that relies on this extension to sanitize untrusted user input. All applications using the DisallowedRawHtml extension to process untrusted markdown are affected. Applications that use a dedicated HTML sanitizer (such as HTML Purifier) on the rendered output are not affected. This issue has been patched in version 2.8.1.
Vulnerability class: XSS (Cross-Site Scripting)
Published · last modified .
CVSS v3 metric
CVSS v3 base score 6.1 (Medium). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.
EPSS exploit prediction
EPSS: 0.002 (12.4th percentile), scored .
Very low probability of exploitation in the next 30 days; routine patching cadence is appropriate. 12th percentile — 12.4% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.
EPSS over last 30 days · oldest: 0.002 · newest: 0.002 · change: 0.000
Affected products
- Thephpleague Commonmark — versions < 2.8.1
Weakness classification (CWE)
References
- github.com/thephpleague/commonmark/security/advisories/GHSA-4v6x-c7xx-hw9f (Mitigation, Vendor Advisory)
Frequently asked questions
- What is CVE-2026-30838?
- CVE-2026-30838 is a medium-severity vulnerability in Thephpleague Commonmark, classified under Cross-site Scripting. CVSS score: 6.1/10. Published 2026-03-07.
- How severe is CVE-2026-30838?
- Medium severity. CVSS v3 base score is 6.1 out of 10.