Skip to content

commonmark

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

CVE-2026-30838Published 7 Mar 2026, 16:00 UTC

Real-world risk

1.1/ 10Low

Routine

PreliminaryFrom the CVSS vector only · confidence low

CVSS

5.1

scored by the vendor (CNA), CVSS 4.0

In plain words

No plain-language summary yet. The original description is below.

Original description (from GitHub_M)

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.

Am I affected?

ProductAffected versions (from the sources)Fixed in
commonmarkNiche< 2.8.12.8.1

What to do

Update to a fixed version: 2.8.1.

Why this score

FactorValueEvidence×
ImpactMinorReflected XSS, CSRF with low effect, open redirect, minor leakFrom the CVSS vector0.30
Attacker positionInternetAnyone on the Internet can reach a typical deploymentFrom the CVSS vector1.00
Privileges neededLowA real low-privileged accountFrom the CVSS vector0.60
Victim interactionRoutineA normal action: open a file, visit a page, click a linkFrom the CVSS vector0.70
ConfigurationDefaultOut-of-the-box installs are vulnerableFrom the CVSS vector1.00
ReliabilityReliableDeterministic: injection, logic bug, path traversalFrom the CVSS vector1.00

Threat level T1: Nothing known (× 0.85)

The default for a new disclosure

EPSS 0.2% chance of exploitation in 30 days (percentile 16), as of 2026-12-03.

The arithmetic
  1. Prerequisites multiplied together0.420
  2. Threat T1: Nothing known0.850
  3. 10 × impact 0.3 × prerequisites 0.42 × threat 0.851.071
  4. Rounded to one decimal between 0.1 and 101.1

How the score works

Exploitation and evidence timeline

  1. 7 Mar 2026 Published
  2. 3 Dec 2026 Risk 1.1 (cvss fallback)

Weakness

CWE-79

References

Get alerts for commonmark

Free email or text alerts when a vulnerability in commonmark reaches risk 8 or higher. Nothing else.