CVE-2025-46656 markdownify allows large headline prefixes such as <h9999999>, which causes memory consumption

Low 2.9 Published Updated

An attacker can cause memory exhaustion and denial of service by providing large headline prefixes to the markdownify library.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2025-46656?

CVE-2025-46656 is a low-severity denial of service vulnerability in python-markdownify, published on 26 Apr 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

python-markdownify (aka markdownify) before 0.14.1 allows large headline prefixes such as <h9999999> in addition to <h1> through <h6>. This causes memory consumption.

Weakness: CWE-1284

Which versions are affected by CVE-2025-46656?

3 open source packages ship an affected version, including markdownify. It affects 1 product.

PackageAffectedFixed in
markdownify PyPIAll versions0.14.1
markdownify PyPIAll versions0.14.1
markdownify PyPIAll versions0.14.1

Products include Matthewwithanm Markdownify.

How do I fix CVE-2025-46656?

Upgrade markdownify to 0.14.1 or later.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2025-46656 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-46656 exists.

Sources

Also known as GHSA-7mpr-5m44-h73r, PYSEC-2026-1604.

Is CVE-2025-46656 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free