5.3

CVE-2024-21503: black

Deferred
AliasesGHSA-fj7x-q9j7-g6q6PYSEC-2024-48UBUNTU-CVE-2024-21503
Published 19-03-2024Last modified 01-08-2024

Vulnerability summary

CVE-2024-21503 is a medium (CVSS 5.3) vulnerability in black. EPSS estimates a 0.98% chance of exploitation in the next 30 days, higher than 62.2% of scored vulnerabilities.

Priority
Routine

Not severe (CVSS 5.3, network access); no exploitation reported by the 5 checked sources

Source freshness unavailable

How is this decided?
CVSS score
5.3/10
010
Medium · v3.1 (CVE.org)
EPSS score
0.98%
0%100%
Low · 0.00 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits0No public exploits recorded

Advisory lineage

Upstream 0 · Downstream 1 · Related 2

Timeline

  1. 19-03-2024
    PublishedVulnerability first disclosed.
  2. 01-08-2024
    Last modifiedVulnerability information updated.

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.

CVSS metrics

7 scores · 7 sources · 1 version

EPSS trend

Probability

0.98%

Chance of exploitation in the next 30 days

Percentile

62%

Versus all other CVEs

30-day change

No change 0.00 pp

From 0.98% on 04-10-2026

04-10-202603-11-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.

Opensuse2 products
  • python-black&distro=openSUSE Leap 15.6< 24.3.0-150400.9.8.1
  • python-black&distro=openSUSE Tumbleweed< 26.5.1-1.3
Alpine1 product
  • black< 23.12.0-r0 | < 24.3.0-r0
Chainguard1 product
  • nemo< 1.23.0-r12
Debian1 product
  • blackAll versions (No fix recorded) | < 24.4.0-1
PyPI1 product
  • black< f00093672628d212b8965a8993cee8bedf5fe9b8 | < 24.3.0
Ubuntu1 product
  • blackAll versions (No fix recorded)

6 vendors · 7 products

References

15 links
Show all 15 references