CVE-2026-30838 Details
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.
A cross-site scripting (XSS) vulnerability has been identified in the League CommonMark Markdown parser, specifically in versions prior to 2.8.1. The issue arises in the DisallowedRawHtml extension, which can be bypassed by inserting a newline, tab, or other ASCII whitespace character between a disallowed HTML tag name and the closing angle bracket. This allows the tag to pass through unfiltered and be rendered as valid HTML by browsers. Applications relying on this extension to sanitize untrusted user input are affected, unless they use a dedicated HTML sanitizer, such as HTML Purifier, on the rendered output.
Users can upgrade to League CommonMark version 2.8.1 or later, where this vulnerability has been patched. Alternatively, the 'html_input' configuration option can be set to 'escape' or 'strip' to disable all raw HTML, though this is a broader restriction than the DisallowedRawHtml extension provides. It is also recommended to pass the rendered HTML through a dedicated HTML sanitizer before serving it to users.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Mar 9, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/thephpleague/commonmark/security/advisories/GHSA-4v6x-c7xx-hw9f | [email protected] | MitigationVendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| thephpleague commonmark | < 2.8.1 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Mar 11, 2026 | Initial Analysis | [email protected] |
| Mar 7, 2026 | New CVE Received | [email protected] |