Skip to main content
← All vulnerabilities
CVE-2026-30838GHSA-4V6X-C7XX-HW9F

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

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 2.8.1
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: none
  • Automatable: no
  • Technical impact: partial

Summary

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: none · Automatable: no · Technical impact: partial

  3. Record last updated

Affected versions

  • thephpleague commonmark

    fixed in 2.8.1

  • league/commonmarkPackagist

    From 2.0.0 · fixed in 2.8.1

References 1

GitHub · thephpleague/commonmark