Live threats

All CVEs / Thephpleague

CVE-2026-30838Thephpleague Commonmark

Medium 5.1

Priority
31
CVSS 4.0
5.1
EPSS
—
Auth required
Yes
Published
Mar 7, 2026
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-79
SSVC (CISA)
Exploitation: none · Automatable: no · Technical impact: partial
Vector
CVSS: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

What happens

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Commonmark.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
Packagist league/commonmark ≥ 2.0.0 < 2.8.1 2.8.1 composer require "league/commonmark:^2.8.1"

Per OSV / GitHub Advisories (GHSA-4v6x-c7xx-hw9f). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
thephpleaguecommonmark< 2.8.1

Official sources

References

Links published by the sources. Open them with care.