Quick answers
- Is CVE-2026-59926 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2026-59926 being exploited in the wild.
- How severe is CVE-2026-59926?
- Medium severity, with a CVSS score of 4, 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-59926?
- 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-59926 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2026-59926?
- 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
A Cross-Site Scripting (XSS) vulnerability exists in Mistune's Admonition directive implementation within `src/mistune/directives/admonition.py`. The `render_admonition()` function fails to escape the `:class:` option before concatenating it into the HTML class attribute. This oversight allows for attribute injection and XSS even when the `HTMLRenderer` is configured with `escape=True`. An attacker can exploit this by providing raw user input in the class option of an Admonition directive. The issue is resolved in version 3.3.0.
Affected products
- lepture mistune < 3.3.0
Identifiers
- CVE-2026-59926
- GHSA-g97x-gvcm-x72h
- PYSEC-2026-2214
Timeline
- 2026-06-21: disclosed
- 2026-07-08: advisory: NVD publication
- 2026-07-20: advisory: GitHub Advisory published
References
- https://api.github.com/users/sergeykochanov
- https://github.com/sergeykochanov
- https://api.github.com/users/sergeykochanov/gists%7B/gist_id%7D
- https://api.github.com/users/sergeykochanov/repos
- https://avatars.githubusercontent.com/u/47022537?v=4
- https://api.github.com/users/sergeykochanov/events%7B/privacy%7D