Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization HTML tag escaping
MITRE ATT&CK
1 technique across 1 tactic: Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Impact | This is a genuine but moderate-severity stored XSS issue, not a drop-everything emergency. The vendor CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:N with subsequent-system SC:L/SI:L) scores 5.3 Medium, and this is internally consistent with the mechanism: a network-reachable, low-complexity flaw requiring no privileges but needing a victim to passively view the malicious content (UI:P), yielding limited confidentiality/integrity impact in the viewer's browser context. There is publicly available exploit code (a complete three-line reproduction is published in the GHSA advisory), which raises practical risk above a theoretical bug. However, this is NOT in CISA KEV - no confirmed active exploitation - and no EPSS score was provided in the input, so near-term mass-exploitation probability cannot be quantified from available data. The realistic ceiling is bounded: impact is session/DOM-level script execution in individual viewers rather than server compromise, and exploitation depends on the application exposing the vulnerable default configuration to untrusted Markdown authors. Net: treat as a priority patch for any application that renders user-submitted Markdown with GFM defaults, but it is a high-reach-library / medium-impact issue rather than a high-real-risk critical. One signal to verify: the input supplies only a CVSS 4.0 vector and a '5.3' score - no CVSS 3.1 vector was provided, so cross-framework severity should be confirmed against the vendor advisory. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 08, 2026
Stored cross-site scripting in league/commonmark from 1.3.0 through 2.10.1 lets any user who can post Markdown bypass the DisallowedRawHtml extension and execute script in the browsers of everyone who views the rendered page. The bypass is triggered by ending a raw HTML block with a bare disallowed tag name (for example a line containing only <script or <iframe), after which a following block can supply attributes such as src or onload that the filter never saw; the CVSS 4.0 vector indicates network reachability with no privileges required (PR:N) and passive user interaction (UI:P), and the upstream GitHub advisory publishes full reproduction steps, though there is no CISA KEV listing or other indication of active exploitation at time of analysis. Affected deployments are those running the library with the default html_input=allow and the GFM/DisallowedRawHtml extension enabled, which is the default for GithubFlavoredMarkdownConverter.
RemediationAI
Vendor-released patch: 2.10.2 - upgrade composer/league/commonmark to 2.10.2 or later, which widens the DisallowedRawHtml scrubbing regex to also match a tag name at end-of-string; the corresponding upstream fix is commit 411afcc2a7402756d96c89af8882c724d12d47ca (https://github.com/thephpleague/commonmark/commit/411afcc2a7402756d96c89af8882c724d12d47ca) and the advisory is https://github.com/thephpleague/commonmark/security/advisories/GHSA-97jj-33gv-5xf9. If upgrading is not immediately possible, the advisory states that switching the html_input configuration from allow to escape or strip fully mitigates the issue because raw HTML never reaches the renderer; the trade-off is that all author-supplied raw HTML in existing content stops rendering and appears as escaped text or is removed, so it may break legitimate embeds and stored posts. A second compensating control is to disable the DisallowedRawHtml extension and the GFM extension that enables it for untrusted input, at the cost of losing GFM table/strikethrough/autolink behaviour in rendered output. The most surgical interim workaround is to apply the upstream regex change in a local fork, replacing the renderer's pattern with /<(\/?(?:%s))([\s\/>]|$)/i while preserving the <$1$2 replacement, then add a regression test covering a tag name that ends the raw-HTML literal. Note that these mitigations protect against new renders only; previously stored Markdown containing the bypass should be identified and re-rendered or purged after the fix is deployed.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in composer
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
league/commonmark is the PHP implementation of the CommonMark/GFM Markdown specification, widely used as the rendering engine behind PHP applications, forums, wikis and CMS front ends. The flaw sits in the DisallowedRawHtml extension's renderer, which scrubs dangerous raw HTML tags with the regular expression /<(\/?(?:title|textarea|style|xmp|iframe|noembed|noframes|script|plaintext)[\s\/>])/i; the trailing character class demands at least one character after the tag name, so a raw-HTML literal that terminates immediately after the tag name is never escaped. The underlying block parser is more permissive: RegexHelper::PARTIAL_HTMLBLOCKOPEN accepts an end-of-line after the tag name, meaning the single line <script legitimately opens an HTML block. Because a rendered HtmlBlock is emitted without a trailing newline the filter's regex finds no trailing character to match and lets the < through unescaped, yet in the browser the newline is still present and terminates the tag name, so any attributes introduced by the next Markdown block (<span src="...">, <span onload="...">) are absorbed into the script or iframe element and execute. This is the same filter class previously hardened in GHSA-4v6x-c7xx-hw9f (fixed in 2.8.1), where the character class was widened but the one-character requirement was retained, leaving this shape uncovered; the root cause class is CWE-80, improper neutralization of script-related HTML tags. The upstream fix allows end-of-string after the tag name (([\s\/>]|$)), escaping the bypass shapes while leaving benign markup such as <div>, <scripts> and <span class="a"> untouched.
Know when Commonmark gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N
Primary rating from Vendor (VulnCheck) · only source for this CVE.
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
League CommonMark from 1.3.0 before 2.10.2 contains a cross-site scripting vulnerability that allows users posting Markdown to bypass the DisallowedRawHtml extension by ending raw HTML with a bare disallowed tag name. Attackers can place a lone <script or <iframe line followed by a block supplying attributes like src or onload, executing stored scripts in viewers' browsers under default GFM settings.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
Affected Products (CPE)CVE.org
More in Commonmark
View allCross-site scripting (XSS) vulnerability in the PHP League CommonMark library before 0.18.3 allows remote attackers to i
Cross-site scripting (XSS) vulnerability in the PHP League CommonMark library versions 0.15.6 through 0.18.x before 0.18
Quadratic CPU exhaustion in league/commonmark 2.0.0-2.8.3 allows unauthenticated remote attackers to deny service by sub
Quadratic-time algorithmic complexity in league/commonmark's Attributes extension exposes PHP applications to remote den
Quadratic parsing complexity in league/commonmark (thephpleague/commonmark, versions ≥1.5.0 and <2.9.1) allows unauthent
Three independent super-linear parsing paths in league/commonmark before 2.9.1 allow unauthenticated remote attackers to
Quadratic-blowup denial of service in league/commonmark's Footnote extension allows remote unauthenticated attackers to
Quadratic CPU exhaustion in league/commonmark's optional AttributesExtension (versions 1.5.0 through 2.9.2) allows unaut
Quadratic-time denial of service in league/commonmark 2.0.0 through 2.10.1 lets unauthenticated remote attackers exhaust
Quadratic memory and output amplification in league/commonmark's XmlRenderer affects all 2.x releases from 2.0.0 through
Cross-site scripting in league/commonmark 2.7.0-2.9.0 allows unauthenticated attackers to inject arbitrary JavaScript in
The DisallowedRawHtml extension in PHP Commonmark (league/commonmark) versions prior to 2.8.1 can be bypassed by injecti
EUVD-2026-95016
GHSA-6vmm-7pc2-g2g6
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB