CVE-2023-26302: markdown-it-py Denial of Service vulnerability in the command line interface
5.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.03769%
CWE
Published
2/23/2023
Updated
9/30/2024
KEV Status
No
Technology
Python
Technical Details
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
markdown-it-py | pip | < 2.2.0 | 2.2.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from how the convert_file function handled file input. The pre-patch code used 'open(filename, "r")' without specifying encoding/error handling, making it susceptible to system-dependent encoding issues. The fix explicitly sets UTF-8 encoding with error ignoring. The added test in test_cli.py with invalid \x80 bytes confirms this was the attack vector. CWE-173 (Improper Handling of Alternate Encoding) directly maps to this missing encoding specification.