Skip to main content

python-markdown2 EUVDEUVD-2026-112495

| CVE-2026-118694 HIGH
Inefficient Algorithmic Complexity (CWE-407)
2026-10-28 VulnCheck GHSA-rgrp-3mvm-5g9j
8.7
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Reach Markdown-rendering endpoint
  2. Delivery
    Submit payload of repeated unclosed '[a](' openers
  3. Exploit
    _find_balanced rescans document per link
  4. Execution
    Quadratic CPU consumption on worker
  5. Impact
    Service degradation / denial of service

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V2 - Validation and Business Logic Algorithmic complexity limits
Exploitation Conditions

The application must accept attacker-controlled Markdown and render it through python-markdown2 at or below version 2.5.5; any such code path (web comment/post rendering, API-driven Markdown-to-HTML conversion, chat or wiki rendering) is exploitable because no authentication (PR:N) or user interaction (UI:N) is required and default configuration is sufficient. There is no special markdown2 feature flag needed - standard link/image parsing is the vulnerable path. The practical limits on exploitation are scope rather than difficulty: the attacker needs a reachable surface that passes untrusted input to markdown2, and the impact is confined to CPU/availability exhaustion of the processing worker (VC:N/VI:N) with no data read or modification.

Impact

This is a genuine availability risk but not a drop-everything emergency. The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N) describes a remotely reachable, low-complexity, unauthenticated trigger with no attack requirements, and the only impact is availability (VA:H; VC:N/VI:N) - consistent with CWE-407 algorithmic complexity: repeated '[a](' or '![a](' sequences force _find_balanced to rescan the document per link, producing quadratic CPU consumption. The vuln.today decision label is 'this_week', which aligns with a serious-but-non-critical DoS rather than act_now/emergency. No CISA KEV listing and no EPSS score were supplied, so there is no signal of active or widespread exploitation; however, the attack payload is fully disclosed in the description, the GitHub issue (#750), and the regression test added in the fix (test/tm-cases/unclosed_link_parens.html), so the barrier to reproducing it is effectively zero. Net: a legitimate priority for any service that renders untrusted Markdown with markdown2, but the ceiling is resource exhaustion - no confidentiality or integrity exposure - so it should be patched promptly rather than treated as a breach-class event.

Exploit ScenarioDerived

An attacker submits a Markdown document containing a long run of unclosed inline link openers (e.g. thousands of repeated '[a](' or '![a](' sequences) to any endpoint that renders user-supplied Markdown with python-markdown2 - a comment field, issue tracker, chat, or API. Each opener causes _find_balanced to rescan the rest of the document, so a modestly sized input drives CPU time up quadratically and ties up the worker. The exact triggering input is public (GitHub issue #750 and the fix's regression test), so no novel exploit development is required.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 28, 2026

Quadratic CPU exhaustion in python-markdown2 (through 2.5.5) lets remote attackers burn processing time by submitting Markdown containing repeated unclosed inline link or image destinations such as '[a](' or '![a](' - no authentication, user interaction, or special feature flag is required, and default configuration is sufficient. Any code path that passes untrusted Markdown into markdown2 (comment/post rendering, API-driven Markdown-to-HTML conversion, wiki or chat rendering) is exposed because the standard inline anchor/image parser is the vulnerable path. Impact is confined to availability of the rendering worker (VC:N/VI:N/VA:H, assessed CVSS:3.1 8.7-equivalent severity); no public exploit code was identified at time of analysis, and the issue is not in CISA KEV. An upstream fix exists as a pull request rather than a confirmed tagged release.

RemediationAI

Upstream fix available (PR/commit); released patched version not independently confirmed - the fix is in pull request https://github.com/trentm/python-markdown2/pull/751, which caches the last close-delimiter position in _find_balanced and short-circuits parse_inline_anchor_or_image when the destination paren never closes, and it adds a regression test fixture. Because no tagged release version is stated in the available data, confirm the fixed tag on https://github.com/trentm/python-markdown2 before pinning, and treat patch availability as vendor-reported per the advisory and issue #750. Until an upgraded release is deployed, the practical interim control is to bound the cost of the vulnerable path: cap accepted Markdown document length and reject or truncate pathological inputs before they reach markdown2, and rate-limit or time-box Markdown rendering workers so a single request cannot monopolize a process. Both have trade-offs - length caps can reject legitimate large documents and must be tuned per use case, and worker timeouts will surface as render failures rather than clean rejections. Restricting Markdown rendering to trusted or authenticated content producers removes the remote attack surface entirely but changes the product's functionality; unchanged worker capacity alone does not mitigate the quadratic growth.

Affected VersionsENISA

python-markdown2 0 ≤2.5.5

Affected Packages

euvd python_markdown2 no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

python-markdown2 is a pure-Python Markdown-to-HTML converter used as a library across web frameworks, wikis, comment systems and API pipelines. The flaw is CWE-407 (inefficient algorithm with disproportionately costly control flow): the inline link scanner calls _find_balanced(text, start, '(', ')') for each candidate '[a](' or '![a](' sequence, and when no closing parenthesis exists anywhere in the remaining document the scan walks to the end of the text every time, producing quadratic runtime in document length. The upstream PR #751 addresses both contributing costs: it adds a per-text cache of the last close-delimiter position via text.rfind so a scan can be skipped immediately when start exceeds the last ')' (returning len(text)), and it adds an early return in parse_inline_anchor_or_image when text[end_idx - 1] != ')', since the inline link title regex ends in \)$ and cannot match when the destination's opening paren never closed. The PR also ships a regression fixture (test/tm-cases/unclosed_link_parens) built from long runs of unclosed '[a](' and '![img](' sequences. The relevant code in the affected 2.5.5 tree is _find_balanced at lib/markdown2.py#L1478-L1492 plus the call site around L3029. CPE cpe:2.3:a:trentm:python-markdown2 with a wildcard version confirms the affected package identity; the trigger is an attacker-controlled document submitted to a rendering endpoint, and the only practical constraint is reachability of such an endpoint.

Know when Python gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 8.7 HIGH
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
vuln.today AI 7.5 HIGH

Untrusted Markdown is processed remotely with no auth or interaction (AV:N/AC:L/PR:N/UI:N); impact is pure CPU exhaustion, so A:H with C:N/I:N and unchanged scope.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

A high-severity vulnerability in python-markdown2 (versions up to 2.5.5) allows unauthenticated attackers to cause CPU exhaustion by submitting specially crafted Markdown, potentially disrupting services that render user-generated content. This impacts any application using the library for Markdown rendering, including comment systems, wikis, and chat platforms, and could lead to service outages and degraded user experience.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis; interim mitigations include rate limiting, input size restrictions, and resource quotas on Markdown processing workers.

Threat Intelligence Overview

Prevalence
Medium
popular PyPI Markdown library, common but not a ubiquitous core dependency
Social Media
1
Sightings
Data Quality
4 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS N/A
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy