---
id: "CVE-2026-121437"
kind: "vulnerability"
aliases: ["CVE-2026-121437"]
title: "Mistune: quadratic emphasis parsing lets small markdown stall workers"
severity: "high"
cvss: 8.7
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["markdown", "mistune", "package", "python"]
not_affected_if: ["mistune-not-used", "trusted-input-only"]
published_at: "2026-11-03T15:17:35+00:00"
first_seen_at: "2026-11-03T15:22:00+00:00"
updated_at: "2026-11-03T15:22:32+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-121437", "first_seen_at": "2026-11-03T15:22:00+00:00"}]
---

# Mistune: quadratic emphasis parsing lets small markdown stall workers

Mistune, a Python markdown parser, takes quadratic time on repeated emphasis delimiters such as "*a_b". A remote attacker can send small markdown documents that tie up CPU and stall worker processes for seconds.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed version with `pip show mistune` or `python -c "import mistune; print(mistune.__version__)"`.
- Look for any service that parses user-submitted markdown with mistune.

## Fix

- Mistune: `3.3.4` (fixed version per the sources; any 3.3.x before 3.3.4 is affected).

## Timeline

- 2026-11-03T15:22:00+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-121437

## Documents

- [advisory] Vendor advisory: github.com https://github.com/lepture/mistune/security/advisories/GHSA-qp42-r9j6-83g9
- [advisory] Third-party advisory: www.vulncheck.com https://www.vulncheck.com/advisories/mistune-3.3.0-before-3.3.4-quadratic-time-dos-via-process-emphasis-delimiters
- [fix] Patch: github.com https://github.com/lepture/mistune/commit/b4dd3284e52ec741ed9a227db29ade9017828e90

## From the sources

Mistune from 3.3.0 before 3.3.4 contains a denial of service vulnerability that allows remote attackers to exhaust CPU through quadratic-time emphasis delimiter processing. Attackers can submit small markdown documents with repeated patterns like "*a_b" to trigger an O(n²) index-fixup loop, stalling workers for seconds.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
