PT-2024-2442
CVE-2024-21503
·
Published
2024-03-18
·
Updated
2026-11-11
Description by
CVSS 3.1
5.3
MediumMetricsAV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Name of the Vulnerable Software and Affected Versions
black versions prior to 24.3.0
Description
The issue is related to a Regular Expression Denial of Service (ReDoS) vulnerability via the
lines with leading tabs expanded function in the strings.py file. An attacker could exploit this by crafting a malicious input that causes a denial of service. This is possible when running Black on untrusted input or if thousands of leading tab characters are habitually put in docstrings.Recommendations
For versions prior to 24.3.0, update to version 24.3.0 or later to resolve the issue. As a temporary workaround, consider avoiding the use of the
lines with leading tabs expanded function or restricting input to trusted sources until a patch is applied.Exploitability
Exploit
Fix
Impacts
Vendors
Affected products
Found an issue in the description? Have something to add? Feel free to write us 👾