Repository navigation
Add advisory for pulldown-cmark: quadratic parsing of nested image wikilinks - #3467
Merged
djc merged 1 commit intoNov 2, 2026
Merged
Conversation
Member
|
How is this different from This declares that anything < 0.13.0 is unaffected whereas the other PR says that 0.11+ are vulnerable -- which is it? |
Contributor
Author
|
#3444 should be closed in favor of the already merged #3454/#3455. Wikilinks were added in 0.13, so the correct value is everything below 0.13, as #3454 and #3455 say: https://github.com/pulldown-cmark/pulldown-cmark/releases/tag/v0.13.0. This is different than #3454 because it is about a different issue fixed in the 0.13.6 release launched today. Thanks. |
djc
approved these changes
Nov 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Affected crate(s)
Links to upstream issue(s) or PR(s)
Severity
Remote denial-of-service via time exhaustion.
With
Options::ENABLE_WIKILINKS, handle_wikilink builds a wikilink's target from the raw text of its body: scan_wikilink_pipe walks it looking for |, then contains('\0') and from_replace_nuls walk it again.Once a wikilink is created, disable_all_links only disables Link entries, so every enclosing
![[stays live on the wikilink stack.On
![[![[![[…]]]]]]each of those openers then resolves in turn and rescans everything inside it, which is quadratic in the nesting depth.The event count stays tiny, because in the unpiped case each enclosing image replaces its body with a fresh text node, so all of that work is thrown away.
Affects 0.13.0 through 0.13.5; wikilinks were introduced in 0.13.0, and 0.13.6 is patched.
CVSS 3.1 is 7.5, scored for a service that renders untrusted Markdown with wikilinks enabled. AC:H, to account for the option being off by default, would give 5.9.
Checklist
RUSTSEC-0000-0000as the IDdatefield is set to the public disclosure date