CVE-2026-30838
MEDIUM 5.1CVSS 4.0CommonMark has DisallowedRawHtml extension bypass via whitespace in HTML tag names
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.
- Published
- 7 Mar 2026
- Last modified
- 17 Jun 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-79
- Also known as
- GHSA-4v6x-c7xx-hw9f
- Sources
- NVDJSONOSV GHSA-4v6x-c7xx-hw9fJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 4.0 | MEDIUM 5.1 | CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:L/VA:N/SC:L/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
| OSV | GitHub | CVSS 4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:L/VA:N/SC:L/SI:L/SA:N | |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | thephpleague | commonmarkcpe:2.3:a:thephpleague:commonmark:*:*:*:*:*:*:*:* |
< 2.8.1 | 2.8.1 |
| OSV | Packagist | league/commonmark | >= 2.0.0, < 2.8.1 | 2.8.1 |
References
- https://github.com/thephpleague/commonmark/security/advisories/GHSA-4v6x-c7xx-hw9f · Mitigation, Vendor Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-30838 · ADVISORY
- https://commonmark.thephpleague.com/extensions/disallowed-raw-html · WEB
- https://github.com/thephpleague/commonmark · PACKAGE
History
- 25 Nov 2026 21:01 UTC · NVD: first stored (published 7 Mar 2026)
- 25 Nov 2026 20:15 UTC · OSV: first stored (published 6 Mar 2026)