
CVE catalog
CVE-2024-21503
black: CVE-2024-21503
- Severity
- High · CVSS 7.5
CVSS: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.
| Distribution | Package | Release | Version | Status |
|---|---|---|---|---|
| Debian | black | sid | 26.10.1-1 | fixed |
| Debian | black | forky | 26.10.1-1 | fixed |
| Debian | black | trixie | 25.1.0-3+deb13u1 | fixed |
| Debian | black | bookworm | 23.1.0-1 | vulnerable |
| Opensuse | python-black | tumbleweed | 26.5.1-1.3 | fixed |
| Opensuse | python-black | leap 15.6 | 24.3.0-150400.9.8.1 | fixed |
Fixed-version evidence
| Distribution | Package | Type | Release | Fixed version | Urgency | Origin | Bugs |
|---|---|---|---|---|---|---|---|
| Debian | black | source | sid | 24.4.0-1 | not yet assigned | Not reported | [1067177] |
| Debian | black | source | forky | 24.4.0-1 | not yet assigned | Not reported | [1067177] |
| Debian | black | source | trixie | 24.4.0-1 | not yet assigned | Not reported | [1067177] |
| Debian | black | source | bookworm | (unfixed) | not yet assigned | Not reported | [1067177] |
| Opensuse | python-black | rpm | tumbleweed | 26.5.1-1.3 | Not reported | OPENSUSE-SU-2026:12001-1 | Not reported |
| Opensuse | python-black | rpm | leap 15.6 | 24.3.0-150400.9.8.1 | Not reported | SUSE-SU-2024:2481-1 | Not reported |
Notes
[bookworm] black: Minor issue
OpenFactory catalog packages
Matching against OpenFactory catalog package versions is in progress.
References
- [https://access.redhat.com/errata/RHSA-2024:3781]
- [https://ftp.suse.com/pub/projects/security/csaf/suse-su-2024_2481-1.json]
- [https://osv.dev/vulnerability/DEBIAN-CVE-2024-21503]
- [https://osv.dev/vulnerability/SUSE-SU-2024:2481-1]
- [https://osv.dev/vulnerability/openSUSE-SU-2026:12001-1]
- [https://security-tracker.debian.org/tracker/CVE-2024-21503]
- [https://wid.cert-bund.de/.well-known/csaf/white/2024/wid-sec-w-2024-1328.json]
[CERT-Bund public advisories] · [Debian Security Tracker] · [FIRST EPSS] · [OSV Package Vulnerability Database] · [Red Hat security advisories and VEX] · [SUSE security advisories and VEX]