CVE-2026-30838
Plain English Summary
AI-powered analysis for quick understanding
This vulnerability allows an attacker to inject malicious HTML, like a script tag, into applications that use a specific Markdown parser to handle user input, potentially leading to cross-site scripting (XSS) attacks. It can be exploited by cleverly inserting whitespace in disallowed HTML tags, and it affects any application relying on the parser's built-in sanitization without additional protections.
Technical 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.
CVSS Vector Analysis
Vector String
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:XExploit Resources
Search for proof-of-concept code and exploit modules
Official References
Quick Information
Published
Mar 7, 2026
about 1 month ago
Last Modified
Mar 11, 2026
27 days ago
Vendor
thephpleague
Product
commonmark