Quick answers
- Is CVE-2026-59922 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2026-59922 being exploited in the wild.
- How severe is CVE-2026-59922?
- High severity, with a CVSS score of 7.5, published 8 July 2026.
- Which products and versions are affected?
- mistune (PyPI) < 3.3.0, ECOSYSTEM:introduced=0,fixed=3.3.0.
- Is there a fix for CVE-2026-59922?
- Yes. mistune (PyPI): upgrade to 3.3.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2026-59922 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2026-59922?
- Check whether you run mistune (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- mistune (PyPI): upgrade to 3.3.0 or later
pip install "mistune>=3.3.0"
Technical details
The vulnerability is an algorithmic complexity flaw (CWE-407) in `src/mistune/plugins/formatting.py`. When the strikethrough, mark, or insert plugins are enabled, the parser performs a forward scan for matching closing delimiters (`~~`, `==`, or `^^`) for every opening delimiter encountered. In inputs with many repeated markers, this results in O(N²) complexity. An attacker can exploit this by sending a relatively small payload (e.g., 8-16 KB) that exhausts CPU resources. The issue is resolved in version 3.3.0 by implementing a cap on tracked markers or using a more efficient delimiter-stack algorithm.
Affected products
- lepture mistune < 3.3.0
Identifiers
- CVE-2026-59922
- GHSA-c8j7-8cv4-2xmq
- PYSEC-2026-2210
Timeline
- 2026-06-21: disclosed
- 2026-07-08: advisory: NVD publication
- 2026-07-20: patched: GitHub Advisory reviewed and updated
References
- https://github.com/lepture/mistune/security/advisories/GHSA-c8j7-8cv4-2xmq
- https://github.com/lepture/mistune/commit/96d0f57f8fe9eeb06bb4cff521962a27d7c402e7
- https://github.com/lepture/mistune/releases/tag/v3.3.0
- https://github.com/pypa/advisory-database/tree/main/vulns/mistune/PYSEC-2026-2210.yaml
- https://api.github.com/repos/lepture/mistune/security-advisories/GHSA-c8j7-8cv4-2xmq