CVE-2024-21503 Affecting black package, versions <24.4.0-1


Severity

Recommended
low

Based on default assessment until relevant scores are available.

Threat Intelligence

EPSS
0.05% (18th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-DEBIAN13-BLACK-6466744
  • published20 Mar 2024
  • disclosed19 Mar 2024

Introduced: 19 Mar 2024

CVE-2024-21503  (opens in a new tab)

How to fix?

Upgrade Debian:13 black to version 24.4.0-1 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream black package and not the black package as distributed by Debian. See How to fix? for Debian:13 relevant fixed versions and status.

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.