CVE-2024-21503
Versions of the package black before 24.3.0 are vulnerable to Regular Expression Denial of Service (ReDoS) via the lines_with_leading_tabs_expanded function in the strings.py file. An attacker could exploit this vulnerability by crafting a malicious input that causes a denial of service. Exploiting this vulnerability is possible when running Black on untrusted input, or if you habitually put thousands of leading tab characters in your docstrings.
Published:Mar 19, 2024
Last Modified:Apr 15, 2026
EPS:Mar 19, 2024
EPSS Score:0.00081
CVSS Score:5.3
Affected Products
Vendor
Product
Action
Vendor
Python Software Foundation
Product
Black
Python Software Foundation
Black
Vendor
Redhat
Product
Ansible Automation Platform
Redhat
Ansible Automation Platform
Exploits
No exploit reference
Common Weakness Enumeration
Common Attack Pattern Enumeration and Classification (CAPEC)
References
Common Vulnerability Scoring System
Attack Vector
Network
Adjacent
Local
Physical
Privileges Required
None
Low
High
User Interaction
None
Required
Scope
Unchanged
Changed
Confidentiality
None
Low
High
Integrity
None
Low
High
Availability
None
Low
High
