HighGHSA-fw3v-x4f2-v673CVE-2022-34749PYSEC-2022-237

Mistune vulnerable to catastrophic backtracking

Published 26 Jul 2022 · Updated 25 Sept 2024

Is your project on an affected mistune?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Python apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected package

Affected
>=2.0.0a1 <2.0.3
Fixed in
2.0.3
Update to the fixed version for your release line, for example:pip install 'mistune>=2.0.3'

Details

In Mistune through 2.0.2, support of inline markup is implemented by using regular expressions that can involve a high amount of backtracking on certain edge cases. This behavior is commonly named catastrophic backtracking.

Is GHSA-fw3v-x4f2-v673 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected mistune, and gives you the command that fixes it.

More advisories for mistune

  • HighCVE-2026-115355Mistune: Path Traversal and XSS in Include directive · 23 Oct 2026
  • HighCVE-2026-76098Mistune: Denial of Service — RecursionError via Excessive Emphasis Markers in Markdown · 2 Sept 2026
  • MediumCVE-2026-59929Mistune renderers/html.safe_url: HARMFUL_PROTOCOLS list misses legacy and chained schemes that historically chain to `javascript:` execution · 20 Jul 2026
  • MediumCVE-2026-59930Mistune toc / TableOfContents directive: heading IDs use predictable `toc_N` numbering with no slugification, allowing collision with attacker-controlled `id="toc_N"` content · 20 Jul 2026
  • MediumCVE-2026-59924Mistune: Arbitrary File Read via Include directive path traversal · 20 Jul 2026
  • HighCVE-2026-59922Mistune plugins/formatting: quadratic-time parsing on long runs of `~~x~~`, `==x==`, and `^^x^^` markers (strikethrough / mark / insert) · 20 Jul 2026
All 21 advisories for mistune

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.