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?
Look after several Python apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected package
mistunePyPI
- 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
References
- Advisorynvd.nist.gov/vuln/detail/CVE-2022-34749
- Linkgithub.com/lepture/mistune/issues/314#issuecomment-1223972386
- Linkgithub.com/lepture/mistune/commit/a6d43215132fe4f3d93f8d7e90ba83b16a0838b2
- Linkgithub.com/lepture/mistune/commit/ca1e7b506850f4e488823fc7338b49a8f9852718
- Packagegithub.com/lepture/mistune
- Linkgithub.com/lepture/mistune/releases
- Linkgithub.com/pypa/advisory-database/tree/main/vulns/mistune/PYSEC-2022-237.yaml
- Linklists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/TQHXITQ2DSBYOILKHXBSBB7PFBPZHF63
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.