CVE-2026-105829
League CommonMark 1.3.0 before 2.10.2 Stored XSS via DisallowedRawHtml Bypass
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Passive
What an attacker can affect
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
5.3
League CommonMark 1.3.0 before 2.10.2 Stored XSS via DisallowedRawHtml Bypass
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.
- Record
CVE-2026-105829- CVSS 4.0
- 5.3 Medium
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 - CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-80
- Updated
- 2026-11-02
EUVDEUVD-2026-95016
5.3
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.
- Record
EUVD-2026-95016- CVSS 4.0
- 5.3 Medium
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 - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-3q6v-r5mr-hxv8
7.5
league/commonmark: Quadratic-time denial of service in the GitHub Flavored Markdown Table extension block-start scan
Summary
league/commonmark's GitHub Flavored Markdown Table extension registers TableStartParser as a block-start parser. While a paragraph is the active block, the core block parser calls TableStartParser::tryStart() on every non-blank line. Its first action fetches the entire growing paragraph buffer via getParagraphContent() and runs strpos($paragraph, '|') across all of it. For a paragraph of M pipe-free lines, line k rescans about k lines of buffer, so total work is 1+2+...+M, which is O(M^2). An unauthenticated user who submits a single large paragraph of pipe-free lines that do not begin with a letter (see Attack Chain) to any service that converts untrusted Markdown with GithubFlavoredMarkdownConverter (or any environment that enables TableExtension) drives seconds to tens of seconds of single-core CPU that grows quadratically with body size, enough to exhaust worker processes and deny service.
Root Cause
The GFM table detector performs a per-line "quick check" against the whole accumulated paragraph rather than only the portion that could form a table header. A paragraph never closes while non-blank lines keep arriving, so its buffer grows without bound, and the quick check rescans the entire buffer on each line. Only the paragraph's last line can ever be a table header (it is extracted separately via strrpos/substr), so scanning the full multi-line buffer for a pipe on every line is unnecessary work and creates quadratic time complexity. There is no input-size cap and the default nesting limit is not reached, so nothing bounds the scan.
Affected function: League\CommonMark\Extension\Table\TableStartParser::tryStart
Location: src/Extension/Table/TableStartParser.php:35-38
$paragraph = $parserState->getParagraphContent(); // returns the FULL growing buffer
if ($paragraph === null || \strpos($paragraph, '|') === false) {
return BlockStart::none(); // strpos scans whole buffer each line
}
Buffer growth: src/Reference/ReferenceParser.php:89-95 ($this->paragraph .= "\n"; $this->paragraph .= $line;)
Per-line dispatch: src/Parser/MarkdownParser.php:135-147 and :224-236
Impact
An unauthenticated, remote attacker with no user interaction can cause denial of service against any application that renders untrusted Markdown with the GitHub Flavored Markdown converter or any configuration that enables the Table extension (the default GFM bundle enables it). A single request carrying a large paragraph of pipe-free, blank-line-free lines that do not begin with a letter consumes CPU proportional to the square of the input size: measured runs show roughly 4x CPU growth per input doubling. A body of a few megabytes ties up a worker for seconds to tens of seconds; repeated or concurrent requests exhaust all available PHP worker processes, denying service to legitimate users. Impact is limited to availability; there is no confidentiality or integrity impact.
Proof of Concept
Requires PHP with league/commonmark 2.x installed. The harness parses pipe-free paragraphs of increasing size with the real MarkdownParser and the real block-start parsers, comparing a GFM-plus-Table configuration against a core-only configuration to isolate the Table parser's contribution.
- Install
league/commonmark(2.10.1 or any 2.x release). - Convert a single large paragraph of pipe-free, blank-line-free lines that do not begin with a letter, with
GithubFlavoredMarkdownConverter. - Measure wall-clock time as the paragraph size doubles.
<?php
require 'vendor/autoload.php';
use League\CommonMark\GithubFlavoredMarkdownConverter;
$converter = new GithubFlavoredMarkdownConverter();
foreach ([25000, 50000, 100000, 200000] as $lines) {
$md = str_repeat("12345678\n", $lines); // one paragraph, no blank lines, no '|', lines not starting with a letter
$t = microtime(true);
$converter->convert($md);
printf("%7d lines %6.3fs\n", $lines,…
- Record
GHSA-3q6v-r5mr-hxv8- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-400, CWE-407
- Updated
- 2026-11-02
GitHub AdvisoriesGHSA-6vmm-7pc2-g2g6
5.3
League CommonMark from 1.3.0 before 2.10.2 contains a cross-site scripting vulnerability that...
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.
- Record
GHSA-6vmm-7pc2-g2g6- CVSS 4.0
- 5.3 Medium
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/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 - CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-80
- Updated
- 2026-11-02
GitHub AdvisoriesGHSA-8rr7-cvq3-gmfh
7.5
league/commonmark: Denial of service via distinctly-named attributes in the Attributes extension
Impact
AttributesExtension ships with the library but must be explicitly registered on the Environment; it is not included in CommonMarkConverter, GithubFlavoredMarkdownConverter, or GithubFlavoredMarkdownExtension. Applications that do not register AttributesExtension are not affected by this advisory.
Two paths in the extension re-process every attribute a node has already collected each time another attribute is applied to it. When the attributes carry distinct names, the collected set grows by one on every step and is walked again in full, so a run of n attributes costs O(n²).
1. Attribute nodes resolving to a common target (affected from 1.5.0).
AttributesListener::processDocument() merges each attribute node into the set accumulated for its target, then filters the result. Both operations traverse that entire set: AttributesHelper::mergeAttributes() rebuilds it with array_merge(), and AttributesHelper::filterAttributes() matches a regular expression against every name in it. A run of attribute nodes sharing one target therefore re-walks a set that grows by a key per node.
Two input shapes reach this path: adjacent inline attributes at the start of a block ({a0="v"}{a1="v"}…, where quoting the values is what keeps them separate — an unquoted value swallows the }{ that follows it), and a chain of attribute blocks held at their default target by reference definitions ({a0=v} / [a]: u / {a1=v} / [a]: u / …).
256 KB of adjacent inline attributes takes 20.0 seconds to convert, against 0.09 seconds once patched.
2. Consecutive attribute-block lines (affected from 2.0.0).
AttributesBlockContinueParser::tryContinue() merges each continuation line into the block's accumulated attributes, again rebuilding the whole set on every line. One distinct attribute per line ({a0=v} / {a1=v} / …) grows it by a key each time.
256 KB of such lines takes 1.9 seconds to convert while producing zero bytes of output, against 0.08 seconds once patched.
Relationship to GHSA-jjv6-8j6v-6j52. The fix released in 2.9.1 for that advisory made the class attribute cheap to accumulate, but left every other attribute name on the original path. Applications that upgraded to 2.9.1 or 2.9.2 remain exposed to this variant.
Overall impact. An unauthenticated attacker who can submit Markdown to an affected application can consume disproportionate CPU time with a comparatively small request, occupying PHP workers and preventing legitimate requests from completing. The impact is limited to availability: no data is disclosed, rendered output is unchanged, and no rendering restriction is bypassed.
Patches
The issue is patched in 2.10.0. Both paths now fold each node — or each line — into the accumulated attributes at a cost proportional to that node or line alone, rather than re-merging and re-filtering everything gathered so far. Rendered output is unchanged, down to the order in which attributes appear.
The listener path affects 1.5.0 through 2.9.2. The continuation-line path affects 2.0.0 through 2.9.2. The 1.x release line is no longer supported, so its users must upgrade to 2.10.0 or later.
Workarounds
If you cannot upgrade immediately:
- Do not register
AttributesExtensionwhen converting untrusted Markdown. This fully removes both paths. - If the extension is required, impose a strict maximum input length before conversion. Because the cost is quadratic, the cap must be small to meaningfully bound worst-case CPU time.
The attributes/allow allow-list added in 2.7.0 is not a mitigation. A non-empty allow-list happens to bound the first path, because unlisted names are discarded before they accumulate, but it does nothing for the second: continuation lines are merged while parsing, before any filtering takes place.
Restricting conversion to trusted users, applying strict execution-time limits, and rate-limiting requests…
- Record
GHSA-8rr7-cvq3-gmfh- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-407, CWE-1050
- Updated
- 2026-11-02
GitHub AdvisoriesGHSA-97jj-33gv-5xf9
6.1
league/commonmark: DisallowedRawHtml bypassed when a disallowed tag name ends the raw-HTML literal
## Summary
The DisallowedRawHtml extension does not escape a disallowed tag when the tag name is the last thing in the raw HTML. A Markdown line containing just <script is emitted unchanged, and the next block can supply its attributes. With the shipped GFM defaults this allows stored XSS by anyone who can post Markdown.
Details
DisallowedRawHtmlRenderer escapes tags with this regex:
/<(\/?(?:title|textarea|style|xmp|iframe|noembed|noframes|script|plaintext)[\s\/>])/i
The trailing character class requires one character after the tag name. The block parser does not: RegexHelper::PARTIAL_HTMLBLOCKOPEN accepts end of line after a tag name, so <script alone opens an HTML block. Because a rendered HtmlBlock has no trailing newline, the regex has nothing to match and the < passes through.
In the browser the newline is still present, so the tag name terminates there and whatever follows becomes attributes.
This is the same filter that GHSA-4v6x-c7xx-hw9f fixed in 2.8.1. That fix widened the character class but still requires one character, so this case was not covered.
Reproduction
Render this with GithubFlavoredMarkdownConverter and default settings:
<div>
<script
<span src="/evil.js">
Output:
<div>
<script
<span src="/evil.js">
A browser parses that as <script src="/evil.js"> with a junk <span attribute, and the script runs. <iframe with <span onload="..."> works the same way and does not need a later </script> in the page.
Control: <script src="/evil.js"></script> is correctly escaped to <script src="/evil.js"></script>.
Affected versions
1.3.0 (when the extension was added) through the current release. The </style and mid-line forms are only affected as continuation lines inside an already-open HTML block.
Preconditions
html_inputisallow(the default)- The
DisallowedRawHtmlextension is active, which the GFM extension enables automatically - Untrusted users can post Markdown
Setting html_input to escape or strip fully mitigates this.
Suggested fix
Allow end of string after the tag name:
$regex = \sprintf('/<(\/?(?:%s))([\s\/>]|$)/i', \implode('|', \array_map('preg_quote', $tags)));
return \preg_replace($regex, '<$1$2', $rendered);
This escapes every bypass shape above and leaves <div>, <scripts> and <span class="a"> untouched. The existing unit test only covers tag names followed by another character, so a case for a bare tag name should be added.
- Record
GHSA-97jj-33gv-5xf9- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-78, CWE-79
- Updated
- 2026-11-02
Show 30 moreShow less
GitHub AdvisoriesGHSA-f8fg-pg57-v4j8
7.2
league/commonmark XSS: `on*` event-handler filter in `AttributesExtension` bypassed with a U+000C form feed
Summary
The AttributesExtension documents a security guarantee:
Note: Attributes starting with
on(e.g.onclickoronerror) are capable of executing JavaScript code and are therefore never allowed by default. You must explicitly add them to theallowlist if you want to use them.—
docs/2.x/extensions/attributes.md
Prefixing the attribute name with a single U+000C FORM FEED byte defeats that guarantee.
{<FF>onclick="alert(1)"} passes through AttributesHelper::filterAttributes() untouched and is
written verbatim into the output, where browsers parse it as a genuine onclick handler.
The same prefix defeats the allow_unsafe_links check, letting a javascript: URI through on
href / src even when allow_unsafe_links is false.
This bypasses the fix shipped in the 2.7.0 security release ("Fix XSS in AttributesExtension",
43207253ea5f14867c77c697cd3838c446cadcea), which added filterAttributes() for the express
purpose of blocking these attributes.
Throughout this report <FF> denotes a literal U+000C byte ("\x0C" in PHP). It is invisible in
rendered text, so all payloads below are written with PHP escape sequences to stay unambiguous.
Details
Three behaviours combine.
1. \x0C survives the parser's trim().
AttributesHelper::SINGLE_ATTRIBUTE begins with \s*, and Cursor::match() returns
$matches[0][0] — the entire match, including that leading whitespace. The result is cleaned
with PHP's trim():
// src/Extension/Attributes/Util/AttributesHelper.php:62
while ($attribute = \trim((string) $attributeCursor->match('/^' . self::SINGLE_ATTRIBUTE . '/i'))) {
PCRE \s matches \x0C, but PHP's default trim() charlist is " \t\n\r\0\x0B" — it includes
the vertical tab \x0B but not the form feed \x0C. The byte is therefore consumed by the
regex, retained in the returned match, and not stripped. It ends up inside the attribute name:
// src/Extension/Attributes/Util/AttributesHelper.php:94
$attributes[\trim($name)] = \trim($value); // $name === "\x0Conclick"
\x0C is the only byte with this property: every other character the HTML5 tokenizer treats as
whitespace (\x09, \x0A, \x0D, \x20), plus \x0B, is in PHP's trim charlist. The PoC
includes a \x0B case as a control, and it is correctly stripped.
2. The filter's string comparisons miss it.
filterAttributes() compares the raw name against literal strings:
// src/Extension/Attributes/Util/AttributesHelper.php:148-166
$attrNameLower = \strtolower($name); // "\x0conclick"
... ($attrNameLower === 'href' || $attrNameLower === 'src') ... // false
... \str_starts_with($attrNameLower, 'on') ... // false -> not removed
3. The renderer never escapes attribute names.
// src/Util/HtmlElement.php:123-129
$result .= ' ' . $key . '="' . Xml::escape($value) . '"'; // $key emitted raw
Because the HTML5 tokenizer treats \x0C as whitespace between attributes, the browser reads
the name as plain onclick.
PoC
<?php
require 'vendor/autoload.php';
use League\CommonMark\Environment\Environment;
use League\CommonMark\Extension\Attributes\AttributesExtension;
use League\CommonMark\Extension\CommonMark\CommonMarkCoreExtension;
use League\CommonMark\MarkdownConverter;
// The most defensive configuration docs/2.x/security.md recommends.
$env = new Environment([
'html_input' => 'escape',
'allow_unsafe_links' => false,
'max_nesting_level' => 100,
// 'attributes' => ['allow' => [...]] deliberately left at its default []
]);
$env->addExtension(new CommonMarkCoreExtension());
$env->addExtension(new AttributesExtension());
$converter = new MarkdownConverter($env);
$FF = "\x0C";
echo $converter->convert('hello {onclick="alert(1)"}')->getContent();
// <p>hello</p> <- filtered, as documented
echo $converter->convert('hello…
- Record
GHSA-f8fg-pg57-v4j8- CVSS 3.1
- 7.2 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N - Weakness
- CWE-79, CWE-86
- Updated
- 2026-11-02
GitHub AdvisoriesGHSA-g2gp-3wwq-f4ph
7.5
league/commonmark: Denial of service via adjacent inline attribute blocks
Impact
With the Attributes extension enabled, AttributesListener::findTargetAndDirection() resolves each attribute node's target by walking outward through its siblings. For a run of N adjacent inline attribute blocks placed at the start of a block (with nothing to their left), each node scans the entire sibling list to the far-right end before giving up and falling back to the parent. Each resolution is therefore Θ(N) and the whole run is Θ(N²).
Reaching the path requires AttributesExtension (opt-in, but first-party: League\CommonMark\Extension\Attributes\AttributesExtension). No other configuration matters — the quadratic walk runs unconditionally during parsing and is not gated by the attributes/allow allow-list, the on* hardening added in 2.7.0, or allow_unsafe_links. An unauthenticated attacker can submit a ~32 KB input ({#a} repeated 8,000 times) that takes over 5 seconds to convert, with time growing quadratically in input length — a cheap denial of service. Availability impact only. The Attributes extension was introduced in 1.5.0 (May 2020) with this outward-walk resolver present from the first commit, so all releases from 1.5.0 onward (including every 2.x) are affected.
Workarounds
There is no library-level configuration that gates the quadratic walk. Integrators who cannot upgrade can only reduce exposure indirectly:
- Disable the Attributes extension for untrusted input, or
- Impose a strict maximum input length before conversion — noting that because the cost is quadratic, even a modest cap must be small to meaningfully bound worst-case CPU.
Upgrading to a release containing the fix is recommended.
- Record
GHSA-g2gp-3wwq-f4ph- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-407
- Updated
- 2026-11-02
GitHub AdvisoriesGHSA-j8pm-gj4c-rq4x
7.5
league/commonmark: Denial of service via crafted code fences, reference links, and emphasis delimiters
Impact
Affected versions of league/commonmark perform super-linear work on three independent parsing paths, all of which are reachable on a stock new CommonMarkConverter() with default configuration and no extensions registered. Each trigger fits on a single line of input, so no complex Markdown structure is required.
The three paths were introduced at different times. This advisory's version range is their union; the individual ranges are:
| Path | Affected from | Affected through |
|---|---|---|
| 1. Fenced code block detection | 0.6.0 | 2.9.0 |
| 2. Reference link label lookup | 0.6.0 | 2.9.0 |
| 3. Emphasis / strikethrough delimiters (*, _, ~) | 2.6.0 | 2.9.0 |
| 3. Highlight delimiters (=) | 2.9.0 | 2.9.0 |
1. Fenced code block detection — quadratic, affected from 0.6.0.
FencedCodeStartParser matches the following pattern:
/^[ \t]*(?:`{3,}(?!.*`)|~{3,})/
The lookahead enforces the CommonMark rule that a backtick fence's info string may not itself contain a backtick, but neither the lookahead nor the backtick run it guards is atomic or possessive. On a line consisting of a long backtick run, filler text, and a single trailing backtick, the quantifier gives back one character at a time and re-runs the lookahead across the remainder of the line on every candidate fence length.
A 320 KB single line takes roughly 27 seconds to convert. The identical payload with one x character prefixed — which fails the parser's own leading-character guard — takes 0.011 seconds. preg_last_error() returns 0 at every input size tested, including runs of 160,000 characters, so PCRE never reaches pcre.backtrack_limit and this is sustained CPU consumption rather than an early bail-out.
2. Reference link label lookup — effectively quadratic, affected from 0.6.0.
When a shortcut or collapsed reference link is attempted, CloseBracketParser::tryParseReference() copies the entire span between the brackets and passes it to ReferenceMap::get(), which normalizes the label — up to four full passes over its length (trim, preg_replace, mb_check_encoding, and strtolower, or mb_convert_case on the non-ASCII path). Nested brackets produce one such lookup per closing bracket, each on a span two characters longer than the last.
In 2.x the normalization sits behind an early return for an empty reference map, so a single 8-byte reference definition anywhere in the document ([x]: y) is enough to unlock the path. At n = 64,000 nested brackets the same input takes 22.0 seconds with that line present versus 0.59 seconds without it. A single non-ASCII character inside the brackets forces the mb_convert_case branch, costing roughly 2.5x more again.
3. Emphasis, strikethrough, and highlight delimiter processing — super-linear, affected from 2.6.0.
DelimiterStack::processDelimiters() remains linear only because of the openersBottom memo, which bounds the backward opener scan — an argument that holds only if the memo's key space is O(1). EmphasisDelimiterProcessor::getCacheKey(), and the equivalents in StrikethroughDelimiterProcessor and MarkDelimiterProcessor, embed the closer's raw current run length in the key, leaving that space unbounded. An attacker spends O(n) bytes minting a growing number of distinct run lengths; each distinct length is a fresh key whose recorded bound starts at zero, forcing a full backward re-scan of the entire pile of openers.
The resulting work grows as roughly n^1.5. This is sub-quadratic, but the amplification over linear growth itself scales with input size, so it worsens as inputs grow: 800 KB of ordinary asterisks, letters, and spaces costs roughly 27 seconds on a stock converter.
This path is a regression introduced in 2.6.0. Before that release the cache key was the bare delimiter character — a bounded key space that amortized correctly. * and _ are affected on any default configuration from 2.6.0 onward. ~…
- Record
GHSA-j8pm-gj4c-rq4x- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-407, CWE-1050, CWE-1333
- Updated
- 2026-11-02
GitHub AdvisoriesGHSA-jfm3-95jq-q3rf
7.5
league/commonmark: Denial of service via duplicate footnote definitions
Impact
The Footnote extension records one backref per footnote reference and then appends the entire backref list for every footnote definition block in the document, without ever de-duplicating or removing repeated definitions of the same label (GatherFootnotesListener, populated by NumberFootnotesListener). A document that references a single label N times and also supplies N duplicate [^a]: definitions of that label therefore produces N × N FootnoteBackref nodes, so output size, parse time, and peak memory are all O(N²).
Reaching the vulnerable path requires FootnoteExtension to be registered on the Environment. This is opt-in, but is a commonly enabled GFM-style feature; no other non-default configuration is required. An unauthenticated attacker can expand a ~10 KB request into a ~62 MB HTML response, ~3 s of CPU, and ~440 MB of peak memory — enough to OOM-kill a default 128 MB PHP worker and deny service. Availability impact only; no confidentiality or integrity effect. The Footnote extension was introduced in 1.5.0 (May 2020) with this backref logic present from the first commit, so all releases from 1.5.0 onward (including every 2.x through 2.8.x) are affected.
Workarounds
There is no library-level option to cap the number of footnotes, references, or definitions, so no configuration switch prevents the amplification. Integrators who cannot upgrade should:
- Disable the Footnote extension for untrusted input, or
- Enforce a strict input-size limit before conversion — but note this is a weak control here, since the ~10 KB payload that already triggers the 62 MB / ~440 MB blowup is well within typical request-body limits, so any cap must be aggressively small to help.
Upgrading to the patched release is the recommended remediation.
- Record
GHSA-jfm3-95jq-q3rf- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-407
- Updated
- 2026-11-02
GitHub AdvisoriesGHSA-jjv6-8j6v-6j52
7.5
league/commonmark: Denial of service in the SmartPunct and Attributes extensions
Impact
Two first-party extensions contain quadratic parsing paths. Both ship with the library but must be explicitly registered on the Environment; neither is included in CommonMarkConverter, GithubFlavoredMarkdownConverter, or GithubFlavoredMarkdownExtension. Applications that do not register SmartPunctExtension or AttributesExtension are not affected by this advisory.
1. SmartPunctExtension — quote replacement recopies the whole text node (affected from 2.0.0).
ReplaceUnpairedQuotesListener converts each unpaired Quote node back to a Text node and merges it into its neighbours via AdjacentTextMerger. The merge reads the left node's literal into a local variable, appends to that variable, and writes it back — and because the read aliases the node's string, every append copies the entire accumulated literal rather than only the bytes added. The listener runs this once per surviving unpaired quote against the same continuously growing text node, so the same buffer is fully re-copied a linear number of times.
A 1.2 MB document of alternating text segments and apostrophes takes 34.9 seconds to convert, against 0.069 seconds for the same input with the extension not registered.
Hardened configuration makes this worse rather than better: QuoteParser appends the Quote node to the AST before pushing it onto the delimiter stack, so max_delimiters_per_line removes the quote-pairing work while leaving every node the listener must process.
2. AttributesExtension — block-level attribute runs re-scan their siblings (affected from 1.5.0).
AttributesListener::findTargetAndDirection() walks the entire remaining sibling chain for every block-level Attributes node whose target is the following node. The backward half of that walk returns immediately for such nodes, and the forward half stops only at a sibling that is not itself an attributes node — which a contiguous run never provides — so a run of k nodes costs k(k-1)/2 steps.
An input placing each {#a} on its own line, with a single reference definition to keep the run contiguous, takes 28.4 seconds at 16,000 attribute blocks while producing zero bytes of output.
This is the block-level counterpart of GHSA-g2gp-3wwq-f4ph, patched in 2.9.0. That fix is incomplete: the early break it introduced is guarded on the node being an AttributesInline, so block-level Attributes nodes still re-scan. Applications that upgraded to 2.9.0 specifically to address GHSA-g2gp-3wwq-f4ph remain exposed to this variant.
3. AttributesExtension — class lists are rebuilt on every merge (affected from 1.5.0).
AttributesHelper::mergeAttributes() round-trips the accumulated class list through explode and implode on each merge. An #id attribute assigns a scalar and skips the branch entirely, but a .class attribute appends to an array which is then imploded to a string, written to the target node, and read back on the next iteration — so the ith merge pays a cost proportional to i three separate times.
{.c} repeated 32,000 times takes 33.5 seconds, against 0.26 seconds for byte-identical input using {#a} — a 130x gap that widens with input size. Both the inline and the block-level attribute paths are affected.
Overall impact. An unauthenticated attacker who can submit Markdown to an affected application can consume disproportionate CPU time with a comparatively small request, occupying PHP workers and preventing legitimate requests from completing. The impact is limited to availability: no data is disclosed, rendered output is unchanged, and no rendering restriction is bypassed.
No library-level configuration gates any of these paths. For the Attributes extension in particular, neither the attributes/allow allow-list nor the on* event-handler hardening added in 2.7.0 has any effect, because the expensive work happens while parsing and resolving the AST, before any attribute filtering or…
- Record
GHSA-jjv6-8j6v-6j52- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-407, CWE-1050
- Updated
- 2026-11-02
GitHub AdvisoriesGHSA-mh25-x5hq-wrqp
7.5
league/commonmark: Denial of service via colliding heading slugs
Impact
UniqueSlugNormalizer::normalize() makes each slug document-unique by searching for an unused numeric suffix, but restarts that search from 1 on every collision. The k-th heading that collapses to the same base slug performs k−1 array lookups, so K colliding slugs cost Σ(k−1) = O(K²). An attacker can force every heading onto a single base slug trivially — many empty ATX headings, identical heading text, or punctuation-only headings that normalize to the empty string.
The path is reached whenever the shared slug normalizer runs over attacker-controlled text. That happens when HeadingPermalinkExtension is registered (its HeadingPermalinkProcessor normalizes every heading), independently through FootnoteExtension (its AnonymousFootnoteRefParser normalizes every ^[label] reference), and on any TableOfContentsExtension site (which requires HeadingPermalinkExtension to be co-registered). The default slug_normalizer/unique setting (UniqueSlugNormalizerInterface::PER_DOCUMENT) accumulates collisions across the whole document. No authentication is required — a small document body turns into seconds of CPU and denies service. Availability impact only. UniqueSlugNormalizer was introduced in 2.0.0 (first shipped in 2.0.0-beta1, May 2021); the 1.x heading-permalink slug generator performed no de-duplication and is not affected. All 2.x releases (including 2.8.x) are affected.
Workarounds
Integrators who cannot upgrade immediately can:
- Set
slug_normalizer/uniquetofalse/UniqueSlugNormalizerInterface::DISABLED, which stops the de-duplication scan entirely — at the cost of losing id uniqueness (colliding headings then share an anchor). - Disable
HeadingPermalinkExtension(andTableOfContentsExtension, which depends on it), andFootnoteExtensionwhere anonymous footnotes reach the same normalizer, for untrusted Markdown. - Cap the accepted document size / heading count upstream so K cannot reach the quadratic danger zone.
Each of these trades off functionality or correctness; upgrading to the patched release (which removes the quadratic behavior while keeping unique ids and identical output) is the recommended remediation.
- Record
GHSA-mh25-x5hq-wrqp- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-407
- Updated
- 2026-11-02
GitHub AdvisoriesGHSA-mj63-m3rc-8ppr
5.3
league/commonmark: Denial of service via deeply nested XML output
Impact
XmlRenderer pretty-prints XML by emitting depth-proportional indentation whitespace for every opening and closing tag. For a tree of depth n, the indentation alone sums to O(n²) bytes of output (and corresponding memory), reachable through MarkdownToXmlConverter — e.g. str_repeat('> ', $depth) . "x\n", a single line of nested blockquotes — or through a direct XmlRenderer::renderDocument() call on an attacker-influenced AST.
This affects applications that convert untrusted Markdown to XML, which is an opt-in output path. The parser's max_nesting_level bounds the depth of parser-created trees, but its default is high enough to reach damaging sizes, can be raised by the host application, and does not constrain custom or programmatically built ASTs handed straight to the renderer. The result is a memory / output-size amplification rather than a hard crash, which is why this issue is rated Medium rather than High. No confidentiality or integrity impact. XML rendering was introduced in 2.0.0 (first shipped in 2.0.0-beta1, June 2021) and has emitted depth-proportional indentation ever since, so all 2.x releases are affected (verified against 2.8.x, clean upstream 1902f60f). 1.x has no XML renderer and is not affected.
Workarounds
Applications converting untrusted Markdown to XML should:
- Lower
max_nesting_levelto a conservative value appropriate to expected content, so the parser refuses to build extremely deep trees. This is the most direct lever for parser-produced ASTs, but does not protect trees built programmatically and passed straight toXmlRenderer. - Cap input size before conversion, since the amplification is driven by input-proportional depth.
- Constrain XML consumers with memory / output-size limits (and streaming or size caps on any downstream XML parser or storage) so one request cannot allocate unbounded output.
- Prefer HTML rendering for untrusted content where XML is not strictly required — the HTML renderer does not emit depth-proportional indentation and is not subject to this amplification.
- Record
GHSA-mj63-m3rc-8ppr- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L - Weakness
- CWE-405
- Updated
- 2026-11-02
NVD
5.3
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.
- Record
CVE-2026-105829- CVSS 4.0
- 5.3 Medium
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/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 - CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-80
- Updated
- 2026-11-02
OSV
5.3
League CommonMark 1.3.0 before 2.10.2 Stored XSS via DisallowedRawHtml Bypass
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.
- Record
CVE-2026-105829- CVSS 4.0
- 5.3 Medium
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 - Weakness
- CWE-80
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2026-105829
5.3
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.
- Record
DEBIAN-CVE-2026-105829- CVSS 4.0
- 5.3 Medium
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/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 - Updated
- 2026-11-02
OSVGHSA-3q6v-r5mr-hxv8
7.5
league/commonmark: Quadratic-time denial of service in the GitHub Flavored Markdown Table extension block-start scan
Summary
league/commonmark's GitHub Flavored Markdown Table extension registers TableStartParser as a block-start parser. While a paragraph is the active block, the core block parser calls TableStartParser::tryStart() on every non-blank line. Its first action fetches the entire growing paragraph buffer via getParagraphContent() and runs strpos($paragraph, '|') across all of it. For a paragraph of M pipe-free lines, line k rescans about k lines of buffer, so total work is 1+2+...+M, which is O(M^2). An unauthenticated user who submits a single large paragraph of pipe-free lines that do not begin with a letter (see Attack Chain) to any service that converts untrusted Markdown with GithubFlavoredMarkdownConverter (or any environment that enables TableExtension) drives seconds to tens of seconds of single-core CPU that grows quadratically with body size, enough to exhaust worker processes and deny service.
Root Cause
The GFM table detector performs a per-line "quick check" against the whole accumulated paragraph rather than only the portion that could form a table header. A paragraph never closes while non-blank lines keep arriving, so its buffer grows without bound, and the quick check rescans the entire buffer on each line. Only the paragraph's last line can ever be a table header (it is extracted separately via strrpos/substr), so scanning the full multi-line buffer for a pipe on every line is unnecessary work and creates quadratic time complexity. There is no input-size cap and the default nesting limit is not reached, so nothing bounds the scan.
Affected function: League\CommonMark\Extension\Table\TableStartParser::tryStart
Location: src/Extension/Table/TableStartParser.php:35-38
$paragraph = $parserState->getParagraphContent(); // returns the FULL growing buffer
if ($paragraph === null || \strpos($paragraph, '|') === false) {
return BlockStart::none(); // strpos scans whole buffer each line
}
Buffer growth: src/Reference/ReferenceParser.php:89-95 ($this->paragraph .= "\n"; $this->paragraph .= $line;)
Per-line dispatch: src/Parser/MarkdownParser.php:135-147 and :224-236
Impact
An unauthenticated, remote attacker with no user interaction can cause denial of service against any application that renders untrusted Markdown with the GitHub Flavored Markdown converter or any configuration that enables the Table extension (the default GFM bundle enables it). A single request carrying a large paragraph of pipe-free, blank-line-free lines that do not begin with a letter consumes CPU proportional to the square of the input size: measured runs show roughly 4x CPU growth per input doubling. A body of a few megabytes ties up a worker for seconds to tens of seconds; repeated or concurrent requests exhaust all available PHP worker processes, denying service to legitimate users. Impact is limited to availability; there is no confidentiality or integrity impact.
Proof of Concept
Requires PHP with league/commonmark 2.x installed. The harness parses pipe-free paragraphs of increasing size with the real MarkdownParser and the real block-start parsers, comparing a GFM-plus-Table configuration against a core-only configuration to isolate the Table parser's contribution.
- Install
league/commonmark(2.10.1 or any 2.x release). - Convert a single large paragraph of pipe-free, blank-line-free lines that do not begin with a letter, with
GithubFlavoredMarkdownConverter. - Measure wall-clock time as the paragraph size doubles.
<?php
require 'vendor/autoload.php';
use League\CommonMark\GithubFlavoredMarkdownConverter;
$converter = new GithubFlavoredMarkdownConverter();
foreach ([25000, 50000, 100000, 200000] as $lines) {
$md = str_repeat("12345678\n", $lines); // one paragraph, no blank lines, no '|', lines not starting with a letter
$t = microtime(true);
$converter->convert($md);
printf("%7d lines %6.3fs\n", $lines,…
- Record
GHSA-3q6v-r5mr-hxv8- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-400, CWE-407
- Updated
- 2026-11-02
OSVGHSA-8rr7-cvq3-gmfh
7.5
league/commonmark: Denial of service via distinctly-named attributes in the Attributes extension
Impact
AttributesExtension ships with the library but must be explicitly registered on the Environment; it is not included in CommonMarkConverter, GithubFlavoredMarkdownConverter, or GithubFlavoredMarkdownExtension. Applications that do not register AttributesExtension are not affected by this advisory.
Two paths in the extension re-process every attribute a node has already collected each time another attribute is applied to it. When the attributes carry distinct names, the collected set grows by one on every step and is walked again in full, so a run of n attributes costs O(n²).
1. Attribute nodes resolving to a common target (affected from 1.5.0).
AttributesListener::processDocument() merges each attribute node into the set accumulated for its target, then filters the result. Both operations traverse that entire set: AttributesHelper::mergeAttributes() rebuilds it with array_merge(), and AttributesHelper::filterAttributes() matches a regular expression against every name in it. A run of attribute nodes sharing one target therefore re-walks a set that grows by a key per node.
Two input shapes reach this path: adjacent inline attributes at the start of a block ({a0="v"}{a1="v"}…, where quoting the values is what keeps them separate — an unquoted value swallows the }{ that follows it), and a chain of attribute blocks held at their default target by reference definitions ({a0=v} / [a]: u / {a1=v} / [a]: u / …).
256 KB of adjacent inline attributes takes 20.0 seconds to convert, against 0.09 seconds once patched.
2. Consecutive attribute-block lines (affected from 2.0.0).
AttributesBlockContinueParser::tryContinue() merges each continuation line into the block's accumulated attributes, again rebuilding the whole set on every line. One distinct attribute per line ({a0=v} / {a1=v} / …) grows it by a key each time.
256 KB of such lines takes 1.9 seconds to convert while producing zero bytes of output, against 0.08 seconds once patched.
Relationship to GHSA-jjv6-8j6v-6j52. The fix released in 2.9.1 for that advisory made the class attribute cheap to accumulate, but left every other attribute name on the original path. Applications that upgraded to 2.9.1 or 2.9.2 remain exposed to this variant.
Overall impact. An unauthenticated attacker who can submit Markdown to an affected application can consume disproportionate CPU time with a comparatively small request, occupying PHP workers and preventing legitimate requests from completing. The impact is limited to availability: no data is disclosed, rendered output is unchanged, and no rendering restriction is bypassed.
Patches
The issue is patched in 2.10.0. Both paths now fold each node — or each line — into the accumulated attributes at a cost proportional to that node or line alone, rather than re-merging and re-filtering everything gathered so far. Rendered output is unchanged, down to the order in which attributes appear.
The listener path affects 1.5.0 through 2.9.2. The continuation-line path affects 2.0.0 through 2.9.2. The 1.x release line is no longer supported, so its users must upgrade to 2.10.0 or later.
Workarounds
If you cannot upgrade immediately:
- Do not register
AttributesExtensionwhen converting untrusted Markdown. This fully removes both paths. - If the extension is required, impose a strict maximum input length before conversion. Because the cost is quadratic, the cap must be small to meaningfully bound worst-case CPU time.
The attributes/allow allow-list added in 2.7.0 is not a mitigation. A non-empty allow-list happens to bound the first path, because unlisted names are discarded before they accumulate, but it does nothing for the second: continuation lines are merged while parsing, before any filtering takes place.
Restricting conversion to trusted users, applying strict execution-time limits, and rate-limiting requests…
- Record
GHSA-8rr7-cvq3-gmfh- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-1050, CWE-407
- Updated
- 2026-11-02
OSVGHSA-97jj-33gv-5xf9
6.1
league/commonmark: DisallowedRawHtml bypassed when a disallowed tag name ends the raw-HTML literal
## Summary
The DisallowedRawHtml extension does not escape a disallowed tag when the tag name is the last thing in the raw HTML. A Markdown line containing just <script is emitted unchanged, and the next block can supply its attributes. With the shipped GFM defaults this allows stored XSS by anyone who can post Markdown.
Details
DisallowedRawHtmlRenderer escapes tags with this regex:
/<(\/?(?:title|textarea|style|xmp|iframe|noembed|noframes|script|plaintext)[\s\/>])/i
The trailing character class requires one character after the tag name. The block parser does not: RegexHelper::PARTIAL_HTMLBLOCKOPEN accepts end of line after a tag name, so <script alone opens an HTML block. Because a rendered HtmlBlock has no trailing newline, the regex has nothing to match and the < passes through.
In the browser the newline is still present, so the tag name terminates there and whatever follows becomes attributes.
This is the same filter that GHSA-4v6x-c7xx-hw9f fixed in 2.8.1. That fix widened the character class but still requires one character, so this case was not covered.
Reproduction
Render this with GithubFlavoredMarkdownConverter and default settings:
<div>
<script
<span src="/evil.js">
Output:
<div>
<script
<span src="/evil.js">
A browser parses that as <script src="/evil.js"> with a junk <span attribute, and the script runs. <iframe with <span onload="..."> works the same way and does not need a later </script> in the page.
Control: <script src="/evil.js"></script> is correctly escaped to <script src="/evil.js"></script>.
Affected versions
1.3.0 (when the extension was added) through the current release. The </style and mid-line forms are only affected as continuation lines inside an already-open HTML block.
Preconditions
html_inputisallow(the default)- The
DisallowedRawHtmlextension is active, which the GFM extension enables automatically - Untrusted users can post Markdown
Setting html_input to escape or strip fully mitigates this.
Suggested fix
Allow end of string after the tag name:
$regex = \sprintf('/<(\/?(?:%s))([\s\/>]|$)/i', \implode('|', \array_map('preg_quote', $tags)));
return \preg_replace($regex, '<$1$2', $rendered);
This escapes every bypass shape above and leaves <div>, <scripts> and <span class="a"> untouched. The existing unit test only covers tag names followed by another character, so a case for a bare tag name should be added.
- Record
GHSA-97jj-33gv-5xf9- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-78, CWE-79
- Updated
- 2026-11-02
OSVGHSA-f8fg-pg57-v4j8
7.2
league/commonmark XSS: `on*` event-handler filter in `AttributesExtension` bypassed with a U+000C form feed
Summary
The AttributesExtension documents a security guarantee:
Note: Attributes starting with
on(e.g.onclickoronerror) are capable of executing JavaScript code and are therefore never allowed by default. You must explicitly add them to theallowlist if you want to use them.—
docs/2.x/extensions/attributes.md
Prefixing the attribute name with a single U+000C FORM FEED byte defeats that guarantee.
{<FF>onclick="alert(1)"} passes through AttributesHelper::filterAttributes() untouched and is
written verbatim into the output, where browsers parse it as a genuine onclick handler.
The same prefix defeats the allow_unsafe_links check, letting a javascript: URI through on
href / src even when allow_unsafe_links is false.
This bypasses the fix shipped in the 2.7.0 security release ("Fix XSS in AttributesExtension",
43207253ea5f14867c77c697cd3838c446cadcea), which added filterAttributes() for the express
purpose of blocking these attributes.
Throughout this report <FF> denotes a literal U+000C byte ("\x0C" in PHP). It is invisible in
rendered text, so all payloads below are written with PHP escape sequences to stay unambiguous.
Details
Three behaviours combine.
1. \x0C survives the parser's trim().
AttributesHelper::SINGLE_ATTRIBUTE begins with \s*, and Cursor::match() returns
$matches[0][0] — the entire match, including that leading whitespace. The result is cleaned
with PHP's trim():
// src/Extension/Attributes/Util/AttributesHelper.php:62
while ($attribute = \trim((string) $attributeCursor->match('/^' . self::SINGLE_ATTRIBUTE . '/i'))) {
PCRE \s matches \x0C, but PHP's default trim() charlist is " \t\n\r\0\x0B" — it includes
the vertical tab \x0B but not the form feed \x0C. The byte is therefore consumed by the
regex, retained in the returned match, and not stripped. It ends up inside the attribute name:
// src/Extension/Attributes/Util/AttributesHelper.php:94
$attributes[\trim($name)] = \trim($value); // $name === "\x0Conclick"
\x0C is the only byte with this property: every other character the HTML5 tokenizer treats as
whitespace (\x09, \x0A, \x0D, \x20), plus \x0B, is in PHP's trim charlist. The PoC
includes a \x0B case as a control, and it is correctly stripped.
2. The filter's string comparisons miss it.
filterAttributes() compares the raw name against literal strings:
// src/Extension/Attributes/Util/AttributesHelper.php:148-166
$attrNameLower = \strtolower($name); // "\x0conclick"
... ($attrNameLower === 'href' || $attrNameLower === 'src') ... // false
... \str_starts_with($attrNameLower, 'on') ... // false -> not removed
3. The renderer never escapes attribute names.
// src/Util/HtmlElement.php:123-129
$result .= ' ' . $key . '="' . Xml::escape($value) . '"'; // $key emitted raw
Because the HTML5 tokenizer treats \x0C as whitespace between attributes, the browser reads
the name as plain onclick.
PoC
<?php
require 'vendor/autoload.php';
use League\CommonMark\Environment\Environment;
use League\CommonMark\Extension\Attributes\AttributesExtension;
use League\CommonMark\Extension\CommonMark\CommonMarkCoreExtension;
use League\CommonMark\MarkdownConverter;
// The most defensive configuration docs/2.x/security.md recommends.
$env = new Environment([
'html_input' => 'escape',
'allow_unsafe_links' => false,
'max_nesting_level' => 100,
// 'attributes' => ['allow' => [...]] deliberately left at its default []
]);
$env->addExtension(new CommonMarkCoreExtension());
$env->addExtension(new AttributesExtension());
$converter = new MarkdownConverter($env);
$FF = "\x0C";
echo $converter->convert('hello {onclick="alert(1)"}')->getContent();
// <p>hello</p> <- filtered, as documented
echo $converter->convert('hello…
- Record
GHSA-f8fg-pg57-v4j8- CVSS 3.1
- 7.2 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N - Weakness
- CWE-79, CWE-86
- Updated
- 2026-11-02
OSVGHSA-g2gp-3wwq-f4ph
7.5
league/commonmark: Denial of service via adjacent inline attribute blocks
Impact
With the Attributes extension enabled, AttributesListener::findTargetAndDirection() resolves each attribute node's target by walking outward through its siblings. For a run of N adjacent inline attribute blocks placed at the start of a block (with nothing to their left), each node scans the entire sibling list to the far-right end before giving up and falling back to the parent. Each resolution is therefore Θ(N) and the whole run is Θ(N²).
Reaching the path requires AttributesExtension (opt-in, but first-party: League\CommonMark\Extension\Attributes\AttributesExtension). No other configuration matters — the quadratic walk runs unconditionally during parsing and is not gated by the attributes/allow allow-list, the on* hardening added in 2.7.0, or allow_unsafe_links. An unauthenticated attacker can submit a ~32 KB input ({#a} repeated 8,000 times) that takes over 5 seconds to convert, with time growing quadratically in input length — a cheap denial of service. Availability impact only. The Attributes extension was introduced in 1.5.0 (May 2020) with this outward-walk resolver present from the first commit, so all releases from 1.5.0 onward (including every 2.x) are affected.
Workarounds
There is no library-level configuration that gates the quadratic walk. Integrators who cannot upgrade can only reduce exposure indirectly:
- Disable the Attributes extension for untrusted input, or
- Impose a strict maximum input length before conversion — noting that because the cost is quadratic, even a modest cap must be small to meaningfully bound worst-case CPU.
Upgrading to a release containing the fix is recommended.
- Record
GHSA-g2gp-3wwq-f4ph- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-407
- Updated
- 2026-11-02
OSVGHSA-j8pm-gj4c-rq4x
7.5
league/commonmark: Denial of service via crafted code fences, reference links, and emphasis delimiters
Impact
Affected versions of league/commonmark perform super-linear work on three independent parsing paths, all of which are reachable on a stock new CommonMarkConverter() with default configuration and no extensions registered. Each trigger fits on a single line of input, so no complex Markdown structure is required.
The three paths were introduced at different times. This advisory's version range is their union; the individual ranges are:
| Path | Affected from | Affected through |
|---|---|---|
| 1. Fenced code block detection | 0.6.0 | 2.9.0 |
| 2. Reference link label lookup | 0.6.0 | 2.9.0 |
| 3. Emphasis / strikethrough delimiters (*, _, ~) | 2.6.0 | 2.9.0 |
| 3. Highlight delimiters (=) | 2.9.0 | 2.9.0 |
1. Fenced code block detection — quadratic, affected from 0.6.0.
FencedCodeStartParser matches the following pattern:
/^[ \t]*(?:`{3,}(?!.*`)|~{3,})/
The lookahead enforces the CommonMark rule that a backtick fence's info string may not itself contain a backtick, but neither the lookahead nor the backtick run it guards is atomic or possessive. On a line consisting of a long backtick run, filler text, and a single trailing backtick, the quantifier gives back one character at a time and re-runs the lookahead across the remainder of the line on every candidate fence length.
A 320 KB single line takes roughly 27 seconds to convert. The identical payload with one x character prefixed — which fails the parser's own leading-character guard — takes 0.011 seconds. preg_last_error() returns 0 at every input size tested, including runs of 160,000 characters, so PCRE never reaches pcre.backtrack_limit and this is sustained CPU consumption rather than an early bail-out.
2. Reference link label lookup — effectively quadratic, affected from 0.6.0.
When a shortcut or collapsed reference link is attempted, CloseBracketParser::tryParseReference() copies the entire span between the brackets and passes it to ReferenceMap::get(), which normalizes the label — up to four full passes over its length (trim, preg_replace, mb_check_encoding, and strtolower, or mb_convert_case on the non-ASCII path). Nested brackets produce one such lookup per closing bracket, each on a span two characters longer than the last.
In 2.x the normalization sits behind an early return for an empty reference map, so a single 8-byte reference definition anywhere in the document ([x]: y) is enough to unlock the path. At n = 64,000 nested brackets the same input takes 22.0 seconds with that line present versus 0.59 seconds without it. A single non-ASCII character inside the brackets forces the mb_convert_case branch, costing roughly 2.5x more again.
3. Emphasis, strikethrough, and highlight delimiter processing — super-linear, affected from 2.6.0.
DelimiterStack::processDelimiters() remains linear only because of the openersBottom memo, which bounds the backward opener scan — an argument that holds only if the memo's key space is O(1). EmphasisDelimiterProcessor::getCacheKey(), and the equivalents in StrikethroughDelimiterProcessor and MarkDelimiterProcessor, embed the closer's raw current run length in the key, leaving that space unbounded. An attacker spends O(n) bytes minting a growing number of distinct run lengths; each distinct length is a fresh key whose recorded bound starts at zero, forcing a full backward re-scan of the entire pile of openers.
The resulting work grows as roughly n^1.5. This is sub-quadratic, but the amplification over linear growth itself scales with input size, so it worsens as inputs grow: 800 KB of ordinary asterisks, letters, and spaces costs roughly 27 seconds on a stock converter.
This path is a regression introduced in 2.6.0. Before that release the cache key was the bare delimiter character — a bounded key space that amortized correctly. * and _ are affected on any default configuration from 2.6.0 onward. ~…
- Record
GHSA-j8pm-gj4c-rq4x- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-1050, CWE-1333, CWE-407
- Updated
- 2026-11-02
OSVGHSA-jfm3-95jq-q3rf
7.5
league/commonmark: Denial of service via duplicate footnote definitions
Impact
The Footnote extension records one backref per footnote reference and then appends the entire backref list for every footnote definition block in the document, without ever de-duplicating or removing repeated definitions of the same label (GatherFootnotesListener, populated by NumberFootnotesListener). A document that references a single label N times and also supplies N duplicate [^a]: definitions of that label therefore produces N × N FootnoteBackref nodes, so output size, parse time, and peak memory are all O(N²).
Reaching the vulnerable path requires FootnoteExtension to be registered on the Environment. This is opt-in, but is a commonly enabled GFM-style feature; no other non-default configuration is required. An unauthenticated attacker can expand a ~10 KB request into a ~62 MB HTML response, ~3 s of CPU, and ~440 MB of peak memory — enough to OOM-kill a default 128 MB PHP worker and deny service. Availability impact only; no confidentiality or integrity effect. The Footnote extension was introduced in 1.5.0 (May 2020) with this backref logic present from the first commit, so all releases from 1.5.0 onward (including every 2.x through 2.8.x) are affected.
Workarounds
There is no library-level option to cap the number of footnotes, references, or definitions, so no configuration switch prevents the amplification. Integrators who cannot upgrade should:
- Disable the Footnote extension for untrusted input, or
- Enforce a strict input-size limit before conversion — but note this is a weak control here, since the ~10 KB payload that already triggers the 62 MB / ~440 MB blowup is well within typical request-body limits, so any cap must be aggressively small to help.
Upgrading to the patched release is the recommended remediation.
- Record
GHSA-jfm3-95jq-q3rf- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-407
- Updated
- 2026-11-02
OSVGHSA-jjv6-8j6v-6j52
7.5
league/commonmark: Denial of service in the SmartPunct and Attributes extensions
Impact
Two first-party extensions contain quadratic parsing paths. Both ship with the library but must be explicitly registered on the Environment; neither is included in CommonMarkConverter, GithubFlavoredMarkdownConverter, or GithubFlavoredMarkdownExtension. Applications that do not register SmartPunctExtension or AttributesExtension are not affected by this advisory.
1. SmartPunctExtension — quote replacement recopies the whole text node (affected from 2.0.0).
ReplaceUnpairedQuotesListener converts each unpaired Quote node back to a Text node and merges it into its neighbours via AdjacentTextMerger. The merge reads the left node's literal into a local variable, appends to that variable, and writes it back — and because the read aliases the node's string, every append copies the entire accumulated literal rather than only the bytes added. The listener runs this once per surviving unpaired quote against the same continuously growing text node, so the same buffer is fully re-copied a linear number of times.
A 1.2 MB document of alternating text segments and apostrophes takes 34.9 seconds to convert, against 0.069 seconds for the same input with the extension not registered.
Hardened configuration makes this worse rather than better: QuoteParser appends the Quote node to the AST before pushing it onto the delimiter stack, so max_delimiters_per_line removes the quote-pairing work while leaving every node the listener must process.
2. AttributesExtension — block-level attribute runs re-scan their siblings (affected from 1.5.0).
AttributesListener::findTargetAndDirection() walks the entire remaining sibling chain for every block-level Attributes node whose target is the following node. The backward half of that walk returns immediately for such nodes, and the forward half stops only at a sibling that is not itself an attributes node — which a contiguous run never provides — so a run of k nodes costs k(k-1)/2 steps.
An input placing each {#a} on its own line, with a single reference definition to keep the run contiguous, takes 28.4 seconds at 16,000 attribute blocks while producing zero bytes of output.
This is the block-level counterpart of GHSA-g2gp-3wwq-f4ph, patched in 2.9.0. That fix is incomplete: the early break it introduced is guarded on the node being an AttributesInline, so block-level Attributes nodes still re-scan. Applications that upgraded to 2.9.0 specifically to address GHSA-g2gp-3wwq-f4ph remain exposed to this variant.
3. AttributesExtension — class lists are rebuilt on every merge (affected from 1.5.0).
AttributesHelper::mergeAttributes() round-trips the accumulated class list through explode and implode on each merge. An #id attribute assigns a scalar and skips the branch entirely, but a .class attribute appends to an array which is then imploded to a string, written to the target node, and read back on the next iteration — so the ith merge pays a cost proportional to i three separate times.
{.c} repeated 32,000 times takes 33.5 seconds, against 0.26 seconds for byte-identical input using {#a} — a 130x gap that widens with input size. Both the inline and the block-level attribute paths are affected.
Overall impact. An unauthenticated attacker who can submit Markdown to an affected application can consume disproportionate CPU time with a comparatively small request, occupying PHP workers and preventing legitimate requests from completing. The impact is limited to availability: no data is disclosed, rendered output is unchanged, and no rendering restriction is bypassed.
No library-level configuration gates any of these paths. For the Attributes extension in particular, neither the attributes/allow allow-list nor the on* event-handler hardening added in 2.7.0 has any effect, because the expensive work happens while parsing and resolving the AST, before any attribute filtering or…
- Record
GHSA-jjv6-8j6v-6j52- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-1050, CWE-407
- Updated
- 2026-11-02
OSVGHSA-mh25-x5hq-wrqp
7.5
league/commonmark: Denial of service via colliding heading slugs
Impact
UniqueSlugNormalizer::normalize() makes each slug document-unique by searching for an unused numeric suffix, but restarts that search from 1 on every collision. The k-th heading that collapses to the same base slug performs k−1 array lookups, so K colliding slugs cost Σ(k−1) = O(K²). An attacker can force every heading onto a single base slug trivially — many empty ATX headings, identical heading text, or punctuation-only headings that normalize to the empty string.
The path is reached whenever the shared slug normalizer runs over attacker-controlled text. That happens when HeadingPermalinkExtension is registered (its HeadingPermalinkProcessor normalizes every heading), independently through FootnoteExtension (its AnonymousFootnoteRefParser normalizes every ^[label] reference), and on any TableOfContentsExtension site (which requires HeadingPermalinkExtension to be co-registered). The default slug_normalizer/unique setting (UniqueSlugNormalizerInterface::PER_DOCUMENT) accumulates collisions across the whole document. No authentication is required — a small document body turns into seconds of CPU and denies service. Availability impact only. UniqueSlugNormalizer was introduced in 2.0.0 (first shipped in 2.0.0-beta1, May 2021); the 1.x heading-permalink slug generator performed no de-duplication and is not affected. All 2.x releases (including 2.8.x) are affected.
Workarounds
Integrators who cannot upgrade immediately can:
- Set
slug_normalizer/uniquetofalse/UniqueSlugNormalizerInterface::DISABLED, which stops the de-duplication scan entirely — at the cost of losing id uniqueness (colliding headings then share an anchor). - Disable
HeadingPermalinkExtension(andTableOfContentsExtension, which depends on it), andFootnoteExtensionwhere anonymous footnotes reach the same normalizer, for untrusted Markdown. - Cap the accepted document size / heading count upstream so K cannot reach the quadratic danger zone.
Each of these trades off functionality or correctness; upgrading to the patched release (which removes the quadratic behavior while keeping unique ids and identical output) is the recommended remediation.
- Record
GHSA-mh25-x5hq-wrqp- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-407
- Updated
- 2026-11-02
OSVGHSA-mj63-m3rc-8ppr
5.3
league/commonmark: Denial of service via deeply nested XML output
Impact
XmlRenderer pretty-prints XML by emitting depth-proportional indentation whitespace for every opening and closing tag. For a tree of depth n, the indentation alone sums to O(n²) bytes of output (and corresponding memory), reachable through MarkdownToXmlConverter — e.g. str_repeat('> ', $depth) . "x\n", a single line of nested blockquotes — or through a direct XmlRenderer::renderDocument() call on an attacker-influenced AST.
This affects applications that convert untrusted Markdown to XML, which is an opt-in output path. The parser's max_nesting_level bounds the depth of parser-created trees, but its default is high enough to reach damaging sizes, can be raised by the host application, and does not constrain custom or programmatically built ASTs handed straight to the renderer. The result is a memory / output-size amplification rather than a hard crash, which is why this issue is rated Medium rather than High. No confidentiality or integrity impact. XML rendering was introduced in 2.0.0 (first shipped in 2.0.0-beta1, June 2021) and has emitted depth-proportional indentation ever since, so all 2.x releases are affected (verified against 2.8.x, clean upstream 1902f60f). 1.x has no XML renderer and is not affected.
Workarounds
Applications converting untrusted Markdown to XML should:
- Lower
max_nesting_levelto a conservative value appropriate to expected content, so the parser refuses to build extremely deep trees. This is the most direct lever for parser-produced ASTs, but does not protect trees built programmatically and passed straight toXmlRenderer. - Cap input size before conversion, since the amplification is driven by input-proportional depth.
- Constrain XML consumers with memory / output-size limits (and streaming or size caps on any downstream XML parser or storage) so one request cannot allocate unbounded output.
- Prefer HTML rendering for untrusted content where XML is not strictly required — the HTML renderer does not emit depth-proportional indentation and is not subject to this amplification.
- Record
GHSA-mj63-m3rc-8ppr- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L - Weakness
- CWE-405
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2026-105829
5.3
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.
- Record
UBUNTU-CVE-2026-105829- CVSS 4.0
- 5.3 Medium
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 - CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Updated
- 2026-11-02
OSVCLSA-2026-1788257456 No score
TuxCare security update for league/commonmark (6 CVEs)
TuxCare rebuilt league/commonmark to address 6 CVEs. Fixed in 2.8.2-p2+tuxcare.
- Record
CLSA-2026-1788257456- Updated
- 2026-11-02
OSVCLSA-2026-1788257590 No score
TuxCare security update for league/commonmark (6 CVEs)
TuxCare rebuilt league/commonmark to address 6 CVEs. Fixed in 2.7.1-p2+tuxcare.
- Record
CLSA-2026-1788257590- Updated
- 2026-11-02
OSVCLSA-2026-1788973862 No score
TuxCare security update for league/commonmark (4 CVEs)
TuxCare rebuilt league/commonmark to address 4 CVEs. Fixed in 2.8.2-p3+tuxcare.
- Record
CLSA-2026-1788973862- Updated
- 2026-11-02
OSVCLSA-2026-1788974290 No score
TuxCare security update for league/commonmark (4 CVEs)
TuxCare rebuilt league/commonmark to address 4 CVEs. Fixed in 2.7.1-p3+tuxcare.
- Record
CLSA-2026-1788974290- Updated
- 2026-11-02
OSVCLSA-2026-1789061392 No score
TuxCare security update for league/commonmark (3 CVEs)
TuxCare rebuilt league/commonmark to address 3 CVEs. Fixed in 1.6.7-p5+tuxcare.
- Record
CLSA-2026-1789061392- Updated
- 2026-11-02
OSVCLSA-2026-1791458367 No score
TuxCare security update for league/commonmark (2 CVEs)
TuxCare rebuilt league/commonmark to address 2 CVEs. Fixed in 2.7.1-p4+tuxcare.
- Record
CLSA-2026-1791458367- Updated
- 2026-11-02
OSVCLSA-2026-1791458446 No score
TuxCare security update for league/commonmark (2 CVEs)
TuxCare rebuilt league/commonmark to address 2 CVEs. Fixed in 2.8.2-p4+tuxcare.
- Record
CLSA-2026-1791458446- Updated
- 2026-11-02
OSVCLSA-2026-1791458521 No score
TuxCare security update for league/commonmark (1 CVE)
TuxCare rebuilt league/commonmark to address 1 CVE. Fixed in 1.6.7-p6+tuxcare.
- Record
CLSA-2026-1791458521- Updated
- 2026-11-02
OSVCLSA-2026-1793372754 No score
TuxCare security update for league/commonmark (3 CVEs)
TuxCare rebuilt league/commonmark to address 3 CVEs. Fixed in 1.6.7-p7+tuxcare.
- Record
CLSA-2026-1793372754- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
league/commonmarkPackagist |
2.0.0 to 2.10.1 | 2.10.2 |
league/commonmarkPackagist |
1.5.0 up to 2.10.0 | 2.10.0 |
league/commonmarkPackagist |
1.3.0 to 2.10.1 | 2.10.2 |
league/commonmarkPackagist |
2.7.0 up to 2.9.1 | 2.9.1 |
league/commonmarkPackagist |
1.5.0 up to 2.9.0 | 2.9.0 |
league/commonmarkPackagist |
0.6.0 up to 2.9.1 | 2.9.1 |
league/commonmarkPackagist |
1.5.0 up to 2.9.1 | 2.9.1 |
league/commonmarkPackagist |
2.0.0 up to 2.9.0 | 2.9.0 |
league/commonmarkTuxCare:Packagist |
2.8.2 up to 2.8.2-p2+tuxcare | 2.8.2-p2+tuxcare |
league/commonmarkTuxCare:Packagist |
2.7.1 up to 2.7.1-p2+tuxcare, plus listed versions 2.7.1-p1+tuxcare |
2.7.1-p2+tuxcare |
Show 23 moreShow less
| Package | Affected | Fixed |
|---|---|---|
league/commonmarkTuxCare:Packagist |
2.8.2 up to 2.8.2-p3+tuxcare, plus listed versions 2.8.2-p2+tuxcare |
2.8.2-p3+tuxcare |
league/commonmarkTuxCare:Packagist |
2.7.1 up to 2.7.1-p3+tuxcare, plus listed versions 2.7.1-p1+tuxcare2.7.1-p2+tuxcare |
2.7.1-p3+tuxcare |
league/commonmarkTuxCare:Packagist |
1.6.7 up to 1.6.7-p5+tuxcare, plus listed versions 1.6.7-p1+tuxcare1.6.7-p2+tuxcare1.6.7-p3+tuxcare1.6.7-p4+tuxcare |
1.6.7-p5+tuxcare |
league/commonmarkTuxCare:Packagist |
2.7.1 up to 2.7.1-p4+tuxcare, plus listed versions 2.7.1-p1+tuxcare2.7.1-p2+tuxcare2.7.1-p3+tuxcare |
2.7.1-p4+tuxcare |
league/commonmarkTuxCare:Packagist |
2.8.2 up to 2.8.2-p4+tuxcare, plus listed versions 2.8.2-p2+tuxcare2.8.2-p3+tuxcare |
2.8.2-p4+tuxcare |
league/commonmarkTuxCare:Packagist |
1.6.7 up to 1.6.7-p6+tuxcare, plus listed versions 1.6.7-p1+tuxcare1.6.7-p2+tuxcare1.6.7-p3+tuxcare1.6.7-p4+tuxcare1.6.7-p5+tuxcare |
1.6.7-p6+tuxcare |
league/commonmarkTuxCare:Packagist |
1.6.7 up to 1.6.7-p7+tuxcare, plus listed versions 1.6.7-p1+tuxcare1.6.7-p2+tuxcare1.6.7-p3+tuxcare1.6.7-p4+tuxcare1.6.7-p5+tuxcare1.6.7-p6+tuxcare |
1.6.7-p7+tuxcare |
php-league-commonmarkDebian:12 |
All versions, plus listed versions 2.10.0-12.10.1-12.10.3-12.3.9-12.3.9-1+deb12u1 Show 20 moreShow less2.4.0-12.4.1-12.4.2-12.4.2-22.5.0-12.5.1-12.5.3-12.6.0-12.6.1-12.6.1-22.6.2-12.7.0-12.7.1-12.7.1-22.8.0-12.8.1-12.8.2-12.8.2-22.8.3-12.9.0-1 |
None known |
php-league-commonmarkDebian:13 |
All versions, plus listed versions 2.10.0-12.10.1-12.10.3-12.7.0-12.7.0-1+deb13u1 Show 8 moreShow less2.7.1-12.7.1-22.8.0-12.8.1-12.8.2-12.8.2-22.8.3-12.9.0-1 |
None known |
php-league-commonmarkDebian:14 |
before 2.10.3-1, plus listed versions 2.10.0-12.10.1-12.7.0-12.7.1-12.7.1-2 Show 6 moreShow less2.8.0-12.8.1-12.8.2-12.8.2-22.8.3-12.9.0-1 |
2.10.3-1 |
league/commonmarkPackagist |
2.0.0 up to 2.10.2, plus listed versions 2.0.12.0.22.0.32.0.42.1.0 Show 42 moreShow less2.1.12.1.22.1.32.10.02.10.12.2.02.2.12.2.22.2.32.2.42.2.52.3.02.3.12.3.22.3.32.3.42.3.52.3.62.3.72.3.82.3.92.4.02.4.12.4.22.4.32.4.42.5.02.5.12.5.22.5.32.6.02.6.12.6.22.7.02.7.12.8.02.8.12.8.22.8.32.9.02.9.12.9.2 |
2.10.2 |
league/commonmarkPackagist |
1.5.0 up to 2.10.0, plus listed versions 1.5.11.5.21.5.31.5.41.5.5 Show 45 moreShow less1.5.61.5.71.5.81.6.01.6.11.6.21.6.31.6.41.6.51.6.61.6.72.0.02.0.0-beta12.0.0-beta22.0.0-beta32.0.0-rc12.0.0-rc22.0.12.0.22.0.32.0.42.1.02.1.12.1.22.1.32.2.02.2.12.2.22.2.32.2.42.2.52.3.02.3.12.3.22.3.32.3.42.3.52.3.62.3.72.3.82.3.92.4.02.4.12.4.22.4.3 |
2.10.0 |
league/commonmarkPackagist |
1.3.0 up to 2.10.2, plus listed versions 1.3.11.3.21.3.31.3.41.4.0 Show 45 moreShow less1.4.11.4.21.4.31.5.01.5.11.5.21.5.31.5.41.5.51.5.61.5.71.5.81.6.01.6.11.6.21.6.31.6.41.6.51.6.61.6.72.0.02.0.0-beta12.0.0-beta22.0.0-beta32.0.0-rc12.0.0-rc22.0.12.0.22.0.32.0.42.1.02.1.12.1.22.1.32.10.02.10.12.2.02.2.12.2.22.2.32.2.42.2.52.3.02.3.12.3.2 |
2.10.2 |
league/commonmarkPackagist |
2.7.0 up to 2.9.1, plus listed versions 2.7.12.8.02.8.12.8.22.8.32.9.0 |
2.9.1 |
league/commonmarkPackagist |
1.5.0 up to 2.9.0, plus listed versions 1.5.11.5.21.5.31.5.41.5.5 Show 45 moreShow less1.5.61.5.71.5.81.6.01.6.11.6.21.6.31.6.41.6.51.6.61.6.72.0.02.0.0-beta12.0.0-beta22.0.0-beta32.0.0-rc12.0.0-rc22.0.12.0.22.0.32.0.42.1.02.1.12.1.22.1.32.2.02.2.12.2.22.2.32.2.42.2.52.3.02.3.12.3.22.3.32.3.42.3.52.3.62.3.72.3.82.3.92.4.02.4.12.4.22.4.3 |
2.9.0 |
league/commonmarkPackagist |
0.6.0 up to 2.9.1, plus listed versions 0.10.00.11.00.11.10.11.20.11.3 Show 45 moreShow less0.12.00.13.00.13.10.13.20.13.30.13.40.14.00.15.00.15.10.15.20.15.30.15.40.15.50.15.60.15.70.16.00.17.00.17.10.17.20.17.30.17.40.17.50.18.00.18.10.18.20.18.30.18.40.18.50.19.00.19.10.19.20.19.30.6.10.7.00.7.10.7.20.8.00.9.01.0.01.0.0-beta11.0.0-beta21.0.0-beta31.0.0-beta41.0.0-rc11.1.0 |
2.9.1 |
league/commonmarkPackagist |
1.5.0 up to 2.9.1, plus listed versions 1.5.11.5.21.5.31.5.41.5.5 Show 45 moreShow less1.5.61.5.71.5.81.6.01.6.11.6.21.6.31.6.41.6.51.6.61.6.72.0.02.0.0-beta12.0.0-beta22.0.0-beta32.0.0-rc12.0.0-rc22.0.12.0.22.0.32.0.42.1.02.1.12.1.22.1.32.2.02.2.12.2.22.2.32.2.42.2.52.3.02.3.12.3.22.3.32.3.42.3.52.3.62.3.72.3.82.3.92.4.02.4.12.4.22.4.3 |
2.9.1 |
league/commonmarkPackagist |
2.0.0 up to 2.9.0, plus listed versions 2.0.12.0.22.0.32.0.42.1.0 Show 37 moreShow less2.1.12.1.22.1.32.2.02.2.12.2.22.2.32.2.42.2.52.3.02.3.12.3.22.3.32.3.42.3.52.3.62.3.72.3.82.3.92.4.02.4.12.4.22.4.32.4.42.5.02.5.12.5.22.5.32.6.02.6.12.6.22.7.02.7.12.8.02.8.12.8.22.8.3 |
2.9.0 |
php-league-commonmarkUbuntu:Pro:20.04:LTS |
All versions, plus listed versions 1.1.2-11.2.0-11.3.0-11.3.1-11.3.1-1ubuntu21.3.1-1ubuntu2+esm1 |
None known |
php-league-commonmarkUbuntu:Pro:22.04:LTS |
All versions, plus listed versions 1.5.7-2build11.6.6-1build11.6.7-11.6.7-1ubuntu0.1~esm1 |
None known |
php-league-commonmarkUbuntu:Pro:24.04:LTS |
All versions, plus listed versions 2.3.9-12.4.1-12.4.2-12.4.2-22.4.2-2ubuntu0.1~esm1 |
None known |
php-league-commonmarkUbuntu:26.10 |
All versions, plus listed versions 2.8.0-12.8.2-22.8.3-12.10.0-1 |
None known |
php-league-commonmarkUbuntu:26.04:LTS |
All versions, plus listed versions 2.7.0-12.7.1-22.8.0-1 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-105829 is a medium vulnerability (CVSS 5.3) in Thephpleague Commonmark, published August 6, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.25%, the 16th percentile. Fixed in league/commonmark 2.10.2.
References
github.com/thephpleague/commonmark/security/advisories/GHSA-97jj-33gv-5xf9
vulncheck.com/advisories/league-commonmark-1.3.0-before-2.10.2-stored-xss-via-disallowedrawhtml-bypass
github.com/thephpleague/commonmark/security/advisories/GHSA-3q6v-r5mr-hxv8
github.com/thephpleague/commonmark/commit/5f63680a5e29dd57f9c6be9743b0e90493d3c2d0
github.com/thephpleague/commonmark/releases/tag/2.10.2
github.com/advisories/GHSA-3q6v-r5mr-hxv8
Show 38 moreShow less
nvd.nist.gov/vuln/detail/CVE-2026-105829
github.com/advisories/GHSA-6vmm-7pc2-g2g6
github.com/thephpleague/commonmark/security/advisories/GHSA-8rr7-cvq3-gmfh
github.com/thephpleague/commonmark/commit/f27eb720972490b5af4dbb635ad8634529faf9f2
github.com/thephpleague/commonmark/releases/tag/2.10.0
github.com/advisories/GHSA-8rr7-cvq3-gmfh
github.com/thephpleague/commonmark/commit/411afcc2a7402756d96c89af8882c724d12d47ca
github.com/advisories/GHSA-97jj-33gv-5xf9
github.com/thephpleague/commonmark/security/advisories/GHSA-f8fg-pg57-v4j8
github.com/thephpleague/commonmark/commit/dfcdf4554c16aa37c15e3a5ee3243ee26147c239
github.com/thephpleague/commonmark/releases/tag/2.9.1
github.com/advisories/GHSA-f8fg-pg57-v4j8
github.com/thephpleague/commonmark/security/advisories/GHSA-g2gp-3wwq-f4ph
github.com/thephpleague/commonmark/commit/2d4c0fafa62501be919262064cffa6d71687430b
github.com/thephpleague/commonmark/releases/tag/2.9.0
github.com/advisories/GHSA-g2gp-3wwq-f4ph
github.com/thephpleague/commonmark/security/advisories/GHSA-j8pm-gj4c-rq4x
github.com/thephpleague/commonmark/commit/0768217751fbfaeb8d76762f6944e9af7114295e
github.com/thephpleague/commonmark/commit/d9375fadc308a63a02950a68d822417a6e4c33b2
github.com/thephpleague/commonmark/commit/e0036ef031fd36ec1c3c82db8743fc928b5271c8
github.com/advisories/GHSA-j8pm-gj4c-rq4x
github.com/thephpleague/commonmark/security/advisories/GHSA-jfm3-95jq-q3rf
github.com/thephpleague/commonmark/commit/66028124a17ba193da7b11cc3dfda92df21bfbf4
github.com/advisories/GHSA-jfm3-95jq-q3rf
github.com/thephpleague/commonmark/security/advisories/GHSA-jjv6-8j6v-6j52
github.com/thephpleague/commonmark/commit/04a5d11ef6bf2d0b927310810d6a2a85d3c184b9
github.com/thephpleague/commonmark/commit/2f611b599c51661b005dc45c16ceaa547546e687
github.com/advisories/GHSA-jjv6-8j6v-6j52
github.com/thephpleague/commonmark/security/advisories/GHSA-mh25-x5hq-wrqp
github.com/advisories/GHSA-mh25-x5hq-wrqp
github.com/thephpleague/commonmark/security/advisories/GHSA-mj63-m3rc-8ppr
github.com/thephpleague/commonmark/commit/b5ac8c3947ca81844e85a09c7e0a5b4148bde2e1
github.com/advisories/GHSA-mj63-m3rc-8ppr
github.com/CVEProject/cvelistV5/tree/main/cves/2026/105xxx/CVE-2026-105829.json
security-tracker.debian.org/tracker/CVE-2026-105829
github.com/thephpleague/commonmark
ubuntu.com/security/CVE-2026-105829
cve.org/CVERecord?id=CVE-2026-105829
Left out here: 155 versions and the rest of 10 source descriptions. The JSON record has them.