PT-2024-2442

CVE-2024-21503

·

Published

2024-03-18

·

Updated

2026-11-11

Description by

CVSS 3.1
5.3
Medium
MetricsAV: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
Researchers
Vendors
Affected products
Related identifiers
GHSA-FJ7X-Q9J7-G6Q6
CLEANSTART-2024-EN29810
DHI-5XHR-EDRU-M7EZ-BTBG
OPENSUSE-SU-2024:13783-1
OPENSUSE-SU-2026:12001-1
PYSEC-2024-48
RHSA-2024:3781
SUSE-SU-2024:2481-1
Found an issue in the description? Have something to add? Feel free to write us 👾