CVE catalog

CVE-2024-21503

black: CVE-2024-21503

[CVE catalog]

Severity
High · CVSS 7.5CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Published
Source
[NVD] · [CVE record]
EPSS
0.98% · Oct 25, 2026

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.

Vulnerable and fixed packages

Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.

DistributionPackageReleaseVersionStatus
Debianblacksid26.10.1-1fixed
Debianblackforky26.10.1-1fixed
Debianblacktrixie25.1.0-3+deb13u1fixed
Debianblackbookworm23.1.0-1vulnerable
Opensusepython-blacktumbleweed26.5.1-1.3fixed
Opensusepython-blackleap 15.624.3.0-150400.9.8.1fixed

Fixed-version evidence

DistributionPackageTypeReleaseFixed versionUrgencyOriginBugs
Debianblacksourcesid24.4.0-1not yet assignedNot reported[1067177]
Debianblacksourceforky24.4.0-1not yet assignedNot reported[1067177]
Debianblacksourcetrixie24.4.0-1not yet assignedNot reported[1067177]
Debianblacksourcebookworm(unfixed)not yet assignedNot reported[1067177]
Opensusepython-blackrpmtumbleweed26.5.1-1.3Not reportedOPENSUSE-SU-2026:12001-1Not reported
Opensusepython-blackrpmleap 15.624.3.0-150400.9.8.1Not reportedSUSE-SU-2024:2481-1Not reported

[Debian bug #1067177]

Notes

[bookworm] black: Minor issue

OpenFactory catalog packages

Matching against OpenFactory catalog package versions is in progress.

References