VAITP Dataset

← Back to the dataset

CVE-2026-118694

Denial of service via unclosed inline links causing quadratic CPU usage.

  • CVSS 8.7
  • CWE-407
  • Resource Management
  • Remote

python-markdown2 through 2.5.5 contains a denial of service vulnerability that allows remote users to exhaust CPU by submitting Markdown with unclosed inline link destinations. Attackers can submit repeated '[a](' or '![a](' sequences, causing _find_balanced to rescan the remaining document for each link and consume quadratic CPU time.

CVSS base score
8.7
Published
2026-10-28
OWASP
A06 Vulnerable and Outdated Components
Orthogonal defect classification
Timing/Serialization
Code defect classification
Timing Issues
Category
Resource Management
Subcategory
Resource Exhaustion
Accessibility scope
Remote
Impact
Denial of Service (DoS)
Affected component
Python
Fixed by upgrading
Yes

Solution

Upgrade python‑markdown2 to version 2.5.6 (or any newer release) which fixes the unclosed inline‑link DoS vulnerability.

Vulnerable code sample

import markdown2

def render_markdown(text: str) -> str:
    # VULNERABLE: unbounded rescanning of incomplete inline links
    parser = markdown2.Markdown()
    return parser.convert(text)

Patched code sample

import markdown2

def render_markdown(text: str) -> str:
    # FIX: disable link pattern processing to avoid quadratic rescanning
    parser = markdown2.Markdown(extras={"link_patterns": False})
    return parser.convert(text)

Published fix

Public sources link this CVE to the changes below. The code samples above were generated to illustrate the defect; these links lead to the code the project actually changed.

Cite this entry

@misc{vaitp:cve2026118694,
  title        = {{Denial of service via unclosed inline links causing quadratic CPU usage.}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2026},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2026-118694},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-118694/}}
}

Download this entry as JSON Download the whole dataset

Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.

The supreme art of war is to subdue the enemy without fighting.

Sun Tzu – “The Art of War”

:: Shaping the future through research and ingenuity ::

Before you use the VAITP AI models

Please read and accept the following disclaimer:

By choosing "I understand and accept", you acknowledge that you understand and agree to these terms.