CVE-2026-49851 Mistune: Potential DoS via quadratic-time parsing in parse_link_text

High 8.7 Published Updated

An attacker can cause CPU exhaustion and denial of service in Mistune by submitting crafted Markdown input with many consecutive brackets.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-49851?

CVE-2026-49851 is a high-severity denial of service vulnerability in lepture mistune, published on 24 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Mistune is a Python Markdown parser with renderers and plugins. Prior to 3.3.0, Mistune is vulnerable to a CPU exhaustion DoS due to superlinear (approximately O(n²)) behavior in parse_link_text. When parsing Markdown containing many consecutive [ characters, parse_link_text repeatedly scans the input using a regex search inside a loop. Each iteration re-scans a large portion of the remaining string, resulting in quadratic-time behavior. An attacker-controlled Markdown input can therefore trigger excessive CPU usage with a very small payload. This vulnerability is fixed in 3.3.0.

Weakness: CWE-1333, CWE-770, CWE-407, CWE-400

Which versions are affected by CVE-2026-49851?

3 open source packages ship an affected version, including mistune.

PackageAffectedFixed in
mistune PyPIAll versions3.3.0
mistune PyPIAll versions3.3.0
mistune PyPIAll versions3.3.0
Linux distribution packages (4)
python-mistune SUSE:Linux Enterprise Server 16.0All versions3.1.3-160000.4.1
python-mistune SUSE:Linux Enterprise Server for SAP applications 16.0All versions3.1.3-160000.4.1
python-mistune openSUSE:Leap 16.0All versions3.1.3-160000.4.1
python-mistune openSUSE:TumbleweedAll versions3.3.2-1.1

How do I fix CVE-2026-49851?

Upgrade mistune to 3.3.0 or later.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2026-49851 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-49851 exists.

Sources

Also known as AZL-91047, DEBIAN-CVE-2026-49851, ECHO-2259-d6c1-3019, GHSA-qcq2-496w-v96p, PYSEC-2026-2652, SUSE-SU-2026:22495-1 and 3 more.

Is CVE-2026-49851 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free