Skip to content

Fix pulldown-cmark wikilink parser DoS - #1346

Merged
AnthonyRonning merged 1 commit into
masterfrom
codex-pulldown-cmark-fix-maple
Oct 28, 2026
Merged

AnthonyRonning merged 1 commit into
masterfrom
codex-pulldown-cmark-fix-maple

Conversation

@AnthonyRonning

@AnthonyRonning AnthonyRonning commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Raise the minimum pulldown-cmark version to 0.13.5 in the server and Agent Cargo packages, and update both lockfiles.
  • Add a regression test for bounded output when sanitizing a short sequence of wikilinks.

The RustSec advisory describes exponential parser event growth with the wikilink option enabled. The sanitizer processes untrusted Markdown with Options::all(), so a short input can expand before downstream truncation. The updated parser fixes that growth. This change does not alter Markdown options or output policy.

Validation

  • With the prior 0.13.4 release, the regression input produced 589,830 bytes after the same parse, filter, and serialize pipeline, exceeding the test bound.
  • Server: cargo fmt --all -- --check; warning-denied cargo clippy --locked --all-targets --all-features; warning-denied cargo test --locked --all-features (1,076 passed, 54 intentionally ignored).
  • Agent: pinned nix develop --no-update-lock-file -c just ci passed, including format, lint, workspace tests, build, and feature-matrix tests.
  • Repository pre-commit checks: passed for both affected components.

This PR prepares the source and lockfiles for review. It has not been deployed or tested against a live service.

@AnthonyRonning
AnthonyRonning marked this pull request as ready for review October 28, 2026 20:21
@AnthonyRonning
AnthonyRonning merged commit e92b3f6 into master Oct 28, 2026
29 checks passed
@AnthonyRonning
AnthonyRonning deleted the codex-pulldown-cmark-fix-maple branch October 28, 2026 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant