# CVE-2026-30838: league/commonmark: DisallowedRawHtml extension bypass via whitespace in HTML tag names

- Severity: Medium 5.1 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.24%, higher than 16% of CVEs (2026-12-01)
- Published: 2026-03-06T23:27:03.000Z
- Modified: 2026-06-17T10:33:00.337Z
- Also known as: GHSA-4v6x-c7xx-hw9f
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- thephpleague commonmark: < 2.8.1; before 2.8.1
- league/commonmark (Packagist): from 2.0.0 before 2.8.1

## Every score

- GitHub_M: CVSS:4.0 5.1 Medium `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`
- GitHub: CVSS:4.0 Medium `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: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`

## 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)

## Sources

- CVE List: [CVE-2026-30838](https://www.cve.org/CVERecord?id=CVE-2026-30838), CVE Terms of Use, modified 2026-03-09
- GitHub Advisory Database: [GHSA-4v6x-c7xx-hw9f](https://github.com/advisories/GHSA-4v6x-c7xx-hw9f), CC-BY-4.0, modified 2026-03-20
- NVD: [CVE-2026-30838](https://nvd.nist.gov/vuln/detail/CVE-2026-30838), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2026-30838 · Whole record: https://cve.day/CVE-2026-30838.json · Rebuilt by cve.day 2026-11-25T22:59:15.479Z
