mistune — security advisory
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.
- Products
- mistune
- Affected versions
- 3.1.3-1, 3.1.4-1, 3.3.4-1, 3.4.0-1
- Fixed versions
- Not specified
- CVEs
- CVE-2026-49851
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 1 Nov 2026, 13:59 UTC · Revision 2
Source evidence
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.
osv:DEBIAN-CVE-2026-49851
mistune
Fixed versions: Not specified
mistune
Fixed versions: Not specified
Complete source record
{
"id": "91a2d69e8a13276af83306800eb597752ab479a1ff8fee98c8f29f2a992cd94a",
"url": "https://osv.dev/vulnerability/DEBIAN-CVE-2026-49851",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "DEBIAN-CVE-2026-49851",
"summary": "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.",
"evidence": "osv:DEBIAN-CVE-2026-49851",
"products": [
{
"name": {
"value": "mistune",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "3.1.3-1",
"evidence": "/affected/0/versions"
},
{
"value": "3.1.4-1",
"evidence": "/affected/0/versions"
},
{
"value": "3.3.4-1",
"evidence": "/affected/0/versions"
},
{
"value": "3.4.0-1",
"evidence": "/affected/0/versions"
}
]
},
{
"name": {
"value": "mistune",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "3.1.3-1",
"evidence": "/affected/1/versions"
},
{
"value": "3.1.4-1",
"evidence": "/affected/1/versions"
},
{
"value": "3.3.4-1",
"evidence": "/affected/1/versions"
},
{
"value": "3.4.0-1",
"evidence": "/affected/1/versions"
}
]
}
],
"severity": "high",
"structured": {
"id": "DEBIAN-CVE-2026-49851",
"aliases": [
"DEBIAN-CVE-2026-49851"
],
"metrics": [
{
"type": "CVSS_V4",
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X"
}
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "mistune",
"purl": "pkg:deb/debian/mistune?arch=source&distro=trixie",
"ecosystem": "Debian:13"
},
"versions": [
"3.1.3-1",
"3.1.4-1",
"3.3.4-1",
"3.4.0-1"
],
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-49851.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "mistune",
"purl": "pkg:deb/debian/mistune?arch=source&distro=forky",
"ecosystem": "Debian:14"
},
"versions": [
"3.1.3-1",
"3.1.4-1",
"3.3.4-1",
"3.4.0-1"
],
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-49851.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
}
],
"modified": "2026-10-26T12:02:57.894119510Z",
"provider": "osv",
"upstream": [
"CVE-2026-49851"
],
"references": [
"https://security-tracker.debian.org/tracker/CVE-2026-49851"
]
},
"related_cves": [
{
"value": "CVE-2026-49851",
"evidence": "/upstream"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 453016,
"published_at": "2026-06-24T18:17:18.937+00:00"
}