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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| thephpleague | commonmark | < 2.8.1 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | php-league-commonmark | 2.8.1-1 | — |
| Debian 13 | php-league-commonmark | 2.7.0-1+deb13u1 | — |
| Debian 12 | php-league-commonmark | 2.3.9-1+deb12u1 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | php-league-commonmark | No fix yet | — |
| Ubuntu 26.04 LTS | php-league-commonmark | No fix yet | — |
| Ubuntu 25.10 | php-league-commonmark | No fix yet | — |
Show 3 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 24.04 LTS | php-league-commonmark | 2.4.2-2ubuntu0.1~esm1 | USN-8194-1 |
| Ubuntu Pro 22.04 LTS | php-league-commonmark | 1.6.7-1ubuntu0.1~esm1 | USN-8194-1 |
| Ubuntu Pro 20.04 LTS | php-league-commonmark | 1.3.1-1ubuntu2+esm1 | USN-8194-1 |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| Packagist | league/commonmark | >= 2.0.0, < 2.8.1 | 2.8.1 | GHSA-4v6x-c7xx-hw9f |
Advisories 2
- USN-8194-1 php-league-commonmark vulnerabilities Ubuntu Security Notices (USN) · Apr 27, 2026
- WID-SEC-2026-1001 Snipe-IT: Mehrere Schwachstellen ermöglichen Umgehen von Sicherheitsvorkehrungen und potenziell Cross-Site Scripting BSI CERT-Bund (WID) · Apr 7, 2026