CVE-2026-30838 json
league/commonmark: DisallowedRawHtml extension bypass via whitespace in HTML tag names
published 2026-03-06 8 mo ago modified 2026-06-17 4 mo ago also EUVD-2026-10168 , GHSA-4v6x-c7xx-hw9f
- cvss
- 6.1
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.2%
- EPSS 0.2% chance of exploitation in 30 days, percentile 15%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- packagist league/commonmark 2.8.1
- thephpleague commonmark 2.8.1
- php-league-commonmark Debian 12 2.3.9-1+deb12u1
- php-league-commonmark Debian 13 2.7.0-1+deb13u1
- php-league-commonmark Debian 14 2.8.1-1
debian advisories DEBIAN-CVE-2026-30838
- php-league-commonmark Ubuntu Pro 20.04 LTS 1.3.1-1ubuntu2+esm1
- php-league-commonmark Ubuntu Pro 22.04 LTS 1.6.7-1ubuntu0.1~esm1
- php-league-commonmark Ubuntu Pro 24.04 LTS 2.4.2-2ubuntu0.1~esm1
ubuntu advisories UBUNTU-CVE-2026-30838
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 8 mo ago
Exploit prediction
0.24% chance of exploitation in the next 30 days, higher than 15% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 4.0 | 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 |
| CNA | 4.0 | 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 |
| NVD | 3.1 | 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| packagist | league/commonmark | >=2.0.0, <2.8.1 |
2.8.1 |
Affected products
- thephpleague commonmark
Classification
- Weakness
-
- CWE-79 Improper Neutralization of Input During Web Page Generation
References
-
github.com
/thephpleague/commonmark/security/advisories/GHSA-4v6x-c7xx-hw9f
web, mitigation, vendor-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2026-30838
advisory
-
commonmark.thephpleague.com
/extensions/disallowed-raw-html
web
-
github.com
/thephpleague/commonmark
package
Sources
- CVE List CVE-2026-30838
- GitHub Advisory GHSA-4v6x-c7xx-hw9f
- NVD CVE-2026-30838
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.