mistune vulnerabilities

A sane and fast Markdown parser with useful plugins and renderers

Registry
PyPI
Latest
3.4.0
License
BSD-3-Clause

21 known advisories

The latest version, 3.4.0, is not affected by any of them. Projects on older versions may be.

Update to the latest version:pip install 'mistune>=3.4.0'

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

Security advisories for mistune

  • HighCVE-2026-115355GHSA-h7ww-273w-6cm823 Oct 2026

    Mistune: Path Traversal and XSS in Include directive

    Affected
    <3.3.0
    Fixed in
    3.3.0
  • HighCVE-2026-76098GHSA-6m44-fpc8-c3rq2 Sept 2026

    Mistune: Denial of Service — RecursionError via Excessive Emphasis Markers in Markdown

    Affected
    >=3.3.0 <3.3.3
    Fixed in
    3.3.3
  • MediumCVE-2026-59929GHSA-qfrw-5rxm-mhh220 Jul 2026

    Mistune renderers/html.safe_url: HARMFUL_PROTOCOLS list misses legacy and chained schemes that historically chain to `javascript:` execution

    Affected
    <3.3.0
    Fixed in
    3.3.0
  • MediumCVE-2026-59930GHSA-2hm2-hc3v-44h920 Jul 2026

    Mistune toc / TableOfContents directive: heading IDs use predictable `toc_N` numbering with no slugification, allowing collision with attacker-controlled `id="toc_N"` content

    Affected
    <3.3.0
    Fixed in
    3.3.0
  • MediumCVE-2026-59924GHSA-r4rv-85jg-w4mf20 Jul 2026

    Mistune: Arbitrary File Read via Include directive path traversal

    Affected
    <3.3.0
    Fixed in
    3.3.0
  • HighCVE-2026-59922GHSA-c8j7-8cv4-2xmq20 Jul 2026

    Mistune plugins/formatting: quadratic-time parsing on long runs of `~~x~~`, `==x==`, and `^^x^^` markers (strikethrough / mark / insert)

    Affected
    <3.3.0
    Fixed in
    3.3.0
  • MediumCVE-2026-59926GHSA-g97x-gvcm-x72h20 Jul 2026

    Mistune: XSS via unescaped class option in Admonition directive

    Affected
    <3.3.0
    Fixed in
    3.3.0
  • MediumCVE-2026-59923GHSA-8c25-4j27-2rv320 Jul 2026

    Mistune: XSS via percent-encoded javascript URI bypass in safe_url()

    Affected
    <3.3.0
    Fixed in
    3.3.0
  • HighCVE-2026-59925GHSA-4j32-57v6-6g4520 Jul 2026

    Mistune inline_parser: quadratic-time parsing on long runs of `**x**` and `***x***` emphasis pairs

    Affected
    <3.3.0
    Fixed in
    3.3.0
  • MediumCVE-2026-59927GHSA-8mpj-m6qm-5qr820 Jul 2026

    Mistune directives/include: mutual `.. include::` recursion crashes the renderer with `RecursionError`, denial of service via two attacker-controlled markdown files

    Affected
    <3.3.0
    Fixed in
    3.3.0
  • HighCVE-2026-59928GHSA-ffq3-xpv3-j92q20 Jul 2026

    Mistune block_parser: quadratic-time parsing on long lists of repeated reference-link definitions

    Affected
    <3.3.0
    Fixed in
    3.3.0
  • HighCVE-2026-49851GHSA-qcq2-496w-v96p9 Jul 2026

    Mistune: Potential DoS via quadratic-time parsing in parse_link_text

    Affected
    <3.3.0
    Fixed in
    3.3.0
  • MediumCVE-2026-44899GHSA-ccfx-mfmx-2fx914 May 2026

    Mistune Image Directive CSS Injection Vulnerability

    Affected
    >=3.2.0 <3.2.1
    Fixed in
    3.2.1
  • MediumCVE-2026-44898GHSA-6269-cqxg-mhhv14 May 2026

    Mistune TOC Anchor Injection XSS

    Affected
    >=3.2.0 <3.2.1
    Fixed in
    3.2.1
  • MediumCVE-2026-44897GHSA-v87v-83h2-53w79 May 2026

    Mistune Heading ID Attribute has Injection XSS

    Affected
    <3.2.1
    Fixed in
    3.2.1
  • MediumCVE-2026-44896GHSA-58cw-g322-p94v8 May 2026

    Mistune has XSS via unescaped figclass/figwidth in Figure directive

    Affected
    <3.2.1
    Fixed in
    3.2.1
  • MediumCVE-2026-44708GHSA-8g87-j6q8-g93x8 May 2026

    Mistune Math Plugin has an XSS Escape Bypass

    Affected
    <=3.2.0
    Fixed in
    No fix released
  • HighCVE-2026-33079GHSA-8mp2-v27r-99xp6 May 2026

    Mistune has a ReDoS in LINK_TITLE_RE that allows denial of service via crafted Markdown input

    Affected
    >=3.0.0a1 <3.2.1
    Fixed in
    3.2.1
  • HighCVE-2022-34749GHSA-fw3v-x4f2-v67326 Jul 2022

    Mistune vulnerable to catastrophic backtracking

    Affected
    >=2.0.0a1 <2.0.3
    Fixed in
    2.0.3
  • MediumCVE-2017-15612GHSA-hpv5-v8g5-c86417 May 2022

    Cross-site Scripting in Mistune

    Affected
    <0.8
    Fixed in
    0.8
  • MediumCVE-2017-16876GHSA-98gj-wwxm-cj3h4 Jan 2019

    mistune Cross-site scripting (XSS) vulnerability

    Affected
    <0.8.1
    Fixed in
    0.8.1

Is your mistune version vulnerable?

Which of your client projects still run an old mistune?

NPMscan reads the requirements.txt, poetry.lock, uv.lock and Pipfile.lock in every GitHub repo you pick and checks each installed version against these advisories, including the packages your packages pull in. Each finding comes with the command that fixes it.

Other PyPI packages

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily. Package details from the PyPI registry.