IT SBIT Services
Schneeberger
DEEN
CVE tracker

python-markdown2: Denial of service via unclosed inline link destinations

CVE-2026-118694High 8.7

← All vulnerabilities

Summary

python-markdown2 through version 2.5.5 is a Python library that converts Markdown to HTML. Crafted Markdown with repeated unclosed inline link sequences makes the parser rescan the remaining document for each link, so CPU time grows quadratically. A remote attacker who can submit Markdown text to an application using the library can exhaust CPU resources and cause a denial of service.

Affected

  • python-markdown2 versions 0 through 2.5.5
  • Applications that render untrusted Markdown with this library, including transitive dependencies

Fixed in

Unknown. No confirmed fixed release was found at the time of writing. Upstream issue #750 and pull request #751 are relevant but their merge and release status could not be confirmed.

Workaround

  • Pin the current version and monitor upstream pull request #751 and new releases for a fix
  • Limit the size of Markdown input before parsing
  • Run Markdown rendering with a timeout or in a separate worker process
  • Rate-limit submissions to public endpoints that render Markdown
  • Render user content as plain text where links are not required

Exploitation

  • Not known to be exploited in the wild; not listed in CISA KEV
  • The maintainer's public issue #750 describes a reproduction with timing measurements
  • The trigger pattern is publicly described in the CVE text

Our recommendation

  • Check inventories for markdown2, including transitive dependencies
  • Prioritise internet-facing applications that render user content (medium to high); internal tools that render only trusted text are lower priority
  • Apply the upstream fix once released, and apply the mitigations above until then
  • Monitor the upstream project and CVE records for an update

Public exploits

PoC-in-GitHub, Metasploit and Exploit-DB list nothing for this CVE.

Research sources

Researched and written up in English and German by an AI (Claude by Anthropic) based on NVD, CISA, EPSS and the sources listed. The vendor information is authoritative. Researched on 31 Oct 2026, 23:44.

Original description (NVD)

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.

NVD references (6)

Sources

The tracker combines official, freely usable data sources – updated continuously:

This product uses data from the NVD API but is not endorsed or certified by the NVD. EPSS data © FIRST.org.

Affected? We can help.

We check whether your systems are affected, install updates and close the gap – continuously with the System Health Checker if you wish.