# RUSTSEC-2026-0433: Quadratic parsing of nested image wikilinks with `ENABLE_WIKILINKS`

- Severity: High 7.5 (CVSS:3.1, scored by RustSec Advisory Database) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2026-10-28T12:00:00.000Z
- Modified: 2026-11-02T11:30:18.315Z

## Description

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.

Applications that parse untrusted Markdown with `ENABLE_WIKILINKS` set,
including through `Options::all()`, are affected. The option is off by default.
Parsing without it is not affected.

The flaw was fixed in
[#1186](https://github.com/pulldown-cmark/pulldown-cmark/pull/1186) and
released in 0.13.6.

(As written by RustSec Advisory Database.)

## Affected

- pulldown-cmark (crates.io): from 0.13.0 before 0.13.6

## References

- <https://crates.io/crates/pulldown-cmark> (package)
- <https://rustsec.org/advisories/RUSTSEC-2026-0433.html> (advisory)
- <https://github.com/pulldown-cmark/pulldown-cmark/pull/1186> (web)

## Sources

- RustSec Advisory Database: [RUSTSEC-2026-0433](https://rustsec.org/advisories/RUSTSEC-2026-0433.html), CC0-1.0, modified 2026-11-02

---

Page: https://cve.day/RUSTSEC-2026-0433 · Whole record: https://cve.day/RUSTSEC-2026-0433.json · Rebuilt by cve.day 2026-11-25T22:56:43.463Z
