CVE-2025-46656: Markdownify Markdownify Allows Large Headline Prefixes Vulnerability
LOWCVE-2025-46656 is a LOW (CVSS 2.9) markdownify allows large headline prefixes vulnerability (CWE-1284: Improper Validation of Specified Quantity in Input) affecting Markdownify libraries in the PyPI ecosystem. The issue involves markdownify allows large headline prefixes such as <h9999999>, which causes memory consumption. Remediation is available by upgrading affected packages to version 0.14.1.
CVE-2025-46656 at a Glance
Security Impact
CVSS: 2.9
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L).
How to Fix CVE-2025-46656
To remediate this vulnerability, upgrade all affected Markdownify dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install markdownify>=0.14.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show markdownify
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2025-46656, inspect your installed packages using pip:
pip show markdownify
Analyze the terminal output to locate any version of Markdownify in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.14.1), your application is affected.
Note: The pip show markdownify command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-1284: Improper Validation of Specified Quantity in Input, where the product receives input that is expected to specify a quantity (such as size or length), but it does not validate or incorrectly validates that the quantity has the required properties. In Markdownify, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-46656 Affected Markdownify Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
markdownify
|
PyPI |
< 0.14.1
|
0.14.1
|
References
Frequently Asked Questions
What is CVE-2025-46656?
Which Markdownify versions are affected?
What version fixes CVE-2025-46656?
Is markdownify affected?
What is the CVSS score of CVE-2025-46656?
What CWE is associated with CVE-2025-46656?
How can I check PyPI dependencies for CVE-2025-46656?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-7mpr-5m44-h73r",
"modified" : "2025-04-28T14:34:51Z",
"published" : "2025-04-27T00:30:34Z",
"aliases" : [ "CVE-2025-46656" ],
"summary" : "markdownify allows large headline prefixes such as <h9999999>, which causes memory consumption",
"details" : "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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "markdownify"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.14.1"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-46656"
}, {
"type" : "WEB",
"url" : "https://github.com/matthewwithanm/python-markdownify/issues/143"
}, {
"type" : "WEB",
"url" : "https://github.com/matthewwithanm/python-markdownify/commit/959561879693bf4a576f99c6733b50b01186aa08"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/matthewwithanm/python-markdownify"
}, {
"type" : "WEB",
"url" : "https://github.com/matthewwithanm/python-markdownify/compare/0.14.0...0.14.1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1284" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2025-04-28T14:34:51Z",
"nvd_published_at" : "2025-04-26T22:15:17Z"
}
}