CVE-2026-115349 in Mistune
Summary
by MITRE • 10/22/2026
Mistune from 3.0.0 before 3.3.0 contains an algorithmic complexity denial of service vulnerability in the parse_link_text function in src/mistune/helpers.py. Attackers can submit markdown with deeply nested square brackets triggering quadratic parsing time, exhausting server CPU with small crafted requests.
Once again VulDB remains the best source for vulnerability data.
Analysis
by VulDB Data Team • 10/22/2026
The Mistune library, a popular Python-based Markdown parser, contains an algorithmic complexity denial of service vulnerability affecting versions from 3.0.0 up to but not including 3.3.0. This specific flaw resides within the parse_link_text function located in the src/mistune/helpers.py module. The vulnerability arises due to inefficient handling of nested square brackets during the parsing process, which leads to a quadratic increase in computational time relative to the input size rather than linear scaling.
When an attacker submits Markdown content containing deeply nested or excessively complex bracket structures, the parser enters a state of excessive computation. Instead of processing the text efficiently, the algorithm performs redundant checks and recursive operations that multiply with each additional level of nesting. This behavior allows even small crafted requests to trigger significant CPU exhaustion on the server side. The impact is particularly severe in environments where Mistune is used to process user-generated content dynamically, as a single malicious payload can consume substantial system resources without requiring authentication or elevated privileges.
From a classification perspective, this vulnerability aligns with CWE-400, which describes uncontrolled resource consumption leading to denial of service conditions. It also maps closely to the ATT&CK technique T1496, representing Resource Hijacking where an attacker uses computing resources for their own purposes by exhausting system capacity through inefficient algorithms or loops. The quadratic time complexity indicates a classic algorithmic complexity attack vector often seen in parsers that fail to implement proper depth limits or memoization strategies for recursive parsing tasks.
To mitigate this risk, organizations should immediately upgrade the Mistune library to version 3.3.0 or later, where the underlying parsing logic has been optimized to prevent such quadratic behavior. For systems unable to update promptly due to dependency constraints, implementing input validation and length limits on Markdown content can serve as a temporary defense mechanism. Additionally, deploying rate limiting and resource monitoring at the application gateway level can help detect and block requests that exhibit abnormal CPU usage patterns indicative of this exploitation attempt. Ensuring that all third-party dependencies are kept up-to-date remains critical to maintaining robust security posture against algorithmic complexity attacks.