Every CVE Search/ Get API key

CVE-2026-30838

league/commonmark: DisallowedRawHtml extension bypass via whitespace in HTML tag names

5.1 MediumFix available

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.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
Low
User interaction
Passive

What an attacker can affect

Confidentiality
None
Integrity
Low
Availability
None

Exploit likelihood

0.24%Up 0.2 points since Mar 8, 2026
90%50%10%1%

What each source reports

CVE List Score used 5.1

league/commonmark: DisallowedRawHtml extension bypass via whitespace in HTML tag names

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.

Record
CVE-2026-30838
CVSS 4.0
5.1 MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:L/VA:N/SC:L/SI:L/SA:N
Weakness
CWE-79
Updated
2026-11-02
EUVDEUVD-2026-10168 5.1

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.

Record
EUVD-2026-10168
CVSS 4.0
5.1 MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:L/VA:N/SC:L/SI:L/SA:N
Updated
2026-11-02
GitHub AdvisoriesGHSA-4v6x-c7xx-hw9f 5.1

CommonMark has DisallowedRawHtml extension bypass via whitespace in HTML tag names

Impact

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.

Patches

Fixed in 2.8.1. The regex character class [ \/>] was changed to [\s\/>] to match all whitespace characters that browsers accept as valid tag name terminators.

Workarounds

  • Set the html_input configuration option to 'escape' or 'strip' to disable all raw HTML, though this is a broader restriction than the DisallowedRawHtml extension provides.
  • Pass the rendered HTML through a dedicated HTML sanitizer before serving it to users (always recommended)
Record
GHSA-4v6x-c7xx-hw9f
CVSS 4.0
5.1 MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:L/VA:N/SC:L/SI:L/SA:N
Weakness
CWE-79
Updated
2026-11-02
NVD 5.1

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.

Record
CVE-2026-30838
CVSS 4.0
5.1 MediumCVSS: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
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weakness
CWE-79
Updated
2026-11-02
OSV 5.1

league/commonmark: DisallowedRawHtml extension bypass via whitespace in HTML tag names

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.

Record
CVE-2026-30838
CVSS 4.0
5.1 MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:L/VA:N/SC:L/SI:L/SA:N
Weakness
CWE-79
Updated
2026-11-02
OSVDEBIAN-CVE-2026-30838 6.1

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.

Record
DEBIAN-CVE-2026-30838
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Updated
2026-11-02
Show 5 moreShow less
OSVGHSA-4v6x-c7xx-hw9f 5.1

CommonMark has DisallowedRawHtml extension bypass via whitespace in HTML tag names

Impact

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.

Patches

Fixed in 2.8.1. The regex character class [ \/>] was changed to [\s\/>] to match all whitespace characters that browsers accept as valid tag name terminators.

Workarounds

  • Set the html_input configuration option to 'escape' or 'strip' to disable all raw HTML, though this is a broader restriction than the DisallowedRawHtml extension provides.
  • Pass the rendered HTML through a dedicated HTML sanitizer before serving it to users (always recommended)
Record
GHSA-4v6x-c7xx-hw9f
CVSS 4.0
5.1 MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:L/VA:N/SC:L/SI:L/SA:N
Weakness
CWE-79
Updated
2026-11-02
OSVUBUNTU-CVE-2026-30838 5.1

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.

Record
UBUNTU-CVE-2026-30838
CVSS 4.0
5.1 MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:L/VA:N/SC:L/SI:L/SA:N
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Updated
2026-11-02
OSVCLSA-2026-1776731783 No score

TuxCare security update for league/commonmark (1 CVE)

TuxCare rebuilt league/commonmark to address 1 CVE. Fixed in 1.6.7-p3+tuxcare.

Record
CLSA-2026-1776731783
Updated
2026-11-02
OSVCLSA-2026-1776904648 No score

TuxCare security update for league/commonmark (2 CVEs)

TuxCare rebuilt league/commonmark to address 2 CVEs. Fixed in 2.7.1-p1+tuxcare.

Record
CLSA-2026-1776904648
Updated
2026-11-02
OSVUSN-8194-1 No score

php-league-commonmark vulnerabilities

It was discovered that league/commonmark did not properly restrict unsafe attributes when the Attributes extension was enabled. An attacker could possibly use this issue to cause cross-site scripting by injecting malicious code into rendered HTML. This issue only affected Ubuntu 22.04 LTS and Ubuntu 24.04 LTS. (CVE-2025-46734)

It was discovered that league/commonmark did not properly block certain disallowed HTML tags in some cases. An attacker could possibly use this issue to cause cross-site scripting by inserting malicious HTML that bypassed filtering. (CVE-2026-30838)

It was discovered that league/commonmark did not properly enforce domain allowlist checks in the Embed extension. An attacker could possibly use this issue to bypass domain restrictions and cause untrusted content to be treated as allowed. This issue only affected Ubuntu 24.04 LTS. (CVE-2026-33347)

Record
USN-8194-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
league/commonmark
Packagist
2.0.0 to 2.8.0
2.8.1
league/commonmark
TuxCare:Packagist
1.6.7 up to 1.6.7-p3+tuxcare, plus listed versions
1.6.7-p1+tuxcare1.6.7-p2+tuxcare
1.6.7-p3+tuxcare
league/commonmark
TuxCare:Packagist
From an advisory covering 2 CVEs
2.7.1 up to 2.7.1-p1+tuxcare
2.7.1-p1+tuxcare
php-league-commonmark
Debian:12
before 2.3.9-1+deb12u1, plus listed versions
2.3.9-1
2.3.9-1+deb12u1
php-league-commonmark
Debian:13
before 2.7.0-1+deb13u1, plus listed versions
2.7.0-1
2.7.0-1+deb13u1
php-league-commonmark
Debian:14
before 2.8.1-1, plus listed versions
2.7.0-12.7.1-12.7.1-22.8.0-1
2.8.1-1
league/commonmark
Packagist
2.0.0 up to 2.8.1, plus listed versions
2.0.12.0.22.0.32.0.42.1.0
Show 34 moreShow less
2.1.12.1.22.1.32.2.02.2.12.2.22.2.32.2.42.2.52.3.02.3.12.3.22.3.32.3.42.3.52.3.62.3.72.3.82.3.92.4.02.4.12.4.22.4.32.4.42.5.02.5.12.5.22.5.32.6.02.6.12.6.22.7.02.7.12.8.0
2.8.1
php-league-commonmark
Ubuntu:Pro:20.04:LTS
before 1.3.1-1ubuntu2+esm1, plus listed versions
1.1.2-11.2.0-11.3.0-11.3.1-11.3.1-1ubuntu2
1.3.1-1ubuntu2+esm1
php-league-commonmark
Ubuntu:Pro:22.04:LTS
before 1.6.7-1ubuntu0.1~esm1, plus listed versions
1.5.7-2build11.6.6-1build11.6.7-1
1.6.7-1ubuntu0.1~esm1
php-league-commonmark
Ubuntu:Pro:24.04:LTS
before 2.4.2-2ubuntu0.1~esm1, plus listed versions
2.3.9-12.4.1-12.4.2-12.4.2-2
2.4.2-2ubuntu0.1~esm1
Show 6 moreShow less
Affected packages
PackageAffectedFixed
php-league-commonmark
Ubuntu:25.10
All versions, plus listed versions
2.6.1-22.6.2-12.7.0-1
None known
php-league-commonmark
Ubuntu:26.10
All versions, plus listed versions
2.8.0-12.8.2-22.8.3-12.10.0-1
None known
php-league-commonmark
Ubuntu:26.04:LTS
All versions, plus listed versions
2.7.0-12.7.1-22.8.0-1
None known
php-league-commonmark
Ubuntu:Pro:20.04:LTS
From an advisory covering 3 CVEs
before 1.3.1-1ubuntu2+esm1, plus listed versions
1.1.2-11.2.0-11.3.0-11.3.1-11.3.1-1ubuntu2
1.3.1-1ubuntu2+esm1
php-league-commonmark
Ubuntu:Pro:22.04:LTS
From an advisory covering 3 CVEs
before 1.6.7-1ubuntu0.1~esm1, plus listed versions
1.5.7-2build11.6.6-1build11.6.7-1
1.6.7-1ubuntu0.1~esm1
php-league-commonmark
Ubuntu:Pro:24.04:LTS
From an advisory covering 3 CVEs
before 2.4.2-2ubuntu0.1~esm1, plus listed versions
2.3.9-12.4.1-12.4.2-12.4.2-2
2.4.2-2ubuntu0.1~esm1

History

History
RecordedChangedSources
affected, facts
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2026-30838 is a medium vulnerability (CVSS 5.1) in Thephpleague Commonmark, published March 6, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.24%, the 15th percentile. Fixed in league/commonmark 2.8.1.

References

Show 6 moreShow less
MoveEnter Open