CVE-2024-21503

MEDIUM
5.3
CVSS Score
Published: March 19, 2024 at 05:00 AM UTC
Updated: June 17, 2026 at 07:09 AM UTC
2 products affected across 2 vendorsBlackBlack

Using black by N/A?

Get instant alerts when new vulnerabilities affect black - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.3
Exploit prediction
EPSS 1.0%
SSVC
PoC

Description

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 24.3.0
Affected range stops below 24.3.0, so it looks safe — our inference, not a vendor statement
v < 24.3.0
Affected range stops below 24.3.0, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet, and no fixed version or vendor advisory is recorded against it.

SSVC — Action Prioritization

SSVCPoCAutomatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

5.3MEDIUMsnyk
Attack Vector
NETWORK
Complexity
LOW
Privileges
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
LOW
Vector?

Quick Info

StatusDEFERRED
CWE
CWE-1333CWE-75

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card