Medium severity · published Mar 7, 2026
CVE-2026-30838
league/commonmark: DisallowedRawHtml extension bypass via whitespace in HTML tag names
6.1
CVSS
0.2%
EPSS
No
On KEV
Description
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.
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
Required
Confidentiality
Low
Integrity
Low
Availability
None
Scope
Changed
Exploitation
Is it being used?
Exploit prediction (EPSS)0.2% · higher than 13% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
CO
commonmark · thephpleague
< 2.8.1 · source: vendor, NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2026-30838
CVE.org
https://www.cve.org/CVERecord?id=CVE-2026-30838
Mitigation
https://github.com/thephpleague/commonmark/security/advisories/GHSA-4v6x-c7xx-hw9f
More from commonmark
7.5
CVE-2026-105830
league/commonmark 2.0.0 before 2.10.2 Quadratic DoS via TableStartParser
7.5
CVE-2024-58382
league/commonmark before 2.6.0 Denial of Service via Quadratic Complexity
7.5
CVE-2026-86435
commonmark 1.5.0 before 2.8.4 Denial of Service via Footnote
7.5
CVE-2026-86434
commonmark 2.0.0 through 2.8.3 Denial of Service via Slug Collision
7.5
CVE-2026-86433
commonmark 1.5.0 before 2.8.4 Denial of Service via Attributes
