Vulnerability · Published Jun 24, 2026 · Assigned by GitHub_M
CVE-2026-49851Mistune: Potential DoS via quadratic-time parsing in parse_link_text
High 7.5
In plain English
A high-severity uncontrolled resource consumption in mistune from lepture. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.5% (higher than 44% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:13 | mistune | no fix listed | DEBIAN-CVE-2026-49851 |
| Debian:14 | mistune | no fix listed | DEBIAN-CVE-2026-49851 |
| PyPI | mistune | 3.3.0 | GHSA-qcq2-496w-v96p |
| PyPI | mistune | 3.3.0 | PYSEC-2026-2652 |
| Ubuntu:22.04:LTS | mistune | no fix listed | UBUNTU-CVE-2026-49851 |
| Ubuntu:24.04:LTS | mistune | no fix listed | UBUNTU-CVE-2026-49851 |
| Ubuntu:25.10 | mistune | no fix listed | UBUNTU-CVE-2026-49851 |
| Ubuntu:26.04:LTS | mistune | no fix listed | UBUNTU-CVE-2026-49851 |
| Ubuntu:26.10 | mistune | no fix listed | UBUNTU-CVE-2026-49851 |
Affected products (as reported)
Weakness: CWE-400, CWE-770, CWE-407, CWE-1333 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
References
- https://github.com/lepture/mistune/security/advisories/GHSA-qcq2-496w-v96p x_refsource_CONFIRM
- https://access.redhat.com/security/cve/CVE-2026-49851 vdb-entry, x_refsource_REDHAT
- RHBZ#2492304 issue-tracking, x_refsource_REDHAT
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-49851.json x_sadp-csaf-vex
- https://access.redhat.com/errata/RHSA-2026:60520 vendor-advisory, x_refsource_REDHAT