Monitor vulnerabilities like this one.
Sign up free to get alerted when software you use is affected.
7.3
League Commonmark: Unfiltered HTML Injection via Malformed Markdown
UBUNTU-CVE-2026-30838
Summary
The League Commonmark Markdown parser doesn't properly block malicious HTML in markdown input. This allows attackers to inject malicious code into your website. Update to version 2.8.1 or use a separate HTML sanitizer to protect your site.
What to do
No fix is available yet. Check with your software vendor for updates.
Affected software
| Vendor | Product | Affected versions | Fix available |
|---|---|---|---|
| canonical | php-league-commonmark | All versions | – |
| canonical | php-league-commonmark | All versions | – |
| canonical | php-league-commonmark | All versions | – |
| canonical | php-league-commonmark | All versions | – |
Original title
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 disall...
Original 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.
osv CVSS4.0
7.3
- https://ubuntu.com/security/CVE-2026-30838 Third Party Advisory
- https://www.cve.org/CVERecord?id=CVE-2026-30838 Third Party Advisory
- https://github.com/thephpleague/commonmark/security/advisories/GHSA-4v6x-c7xx-hw... Third Party Advisory
Published: 9 Mar 2026 · Updated: 13 Mar 2026 · First seen: 10 Mar 2026