CVE-2024-21503
mediumpriority · track · 0EPSS 0.010 · 62 %ileDEEURUUSEPSS · scored 2026-10-27
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
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode
ssvc
A stakeholder decision — act, attend, or track — from exploitation and impact.
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (26)
Products and version ranges known to be affected.
- Red Hat Enterprise Linux Update Infrastructure 4all versionscert_bundDEcpe:/o:redhat:enterprise_linux:update_infrastructure_4
advisories (3)
Vendor and ecosystem advisories describing this.
- WID-SEC-W-2024-1328Red Hat Ansible Automation Platform: Mehrere SchwachstellenDeutsch2024-06-10csaf · cert_bundDE
Ein Angreifer kann mehrere Schwachstellen in Red Hat Ansible Automation Platform ausnutzen, um beliebigen Programmcode auszuführen, einen Denial-of-Service-Zustand erzeugen, vertrauliche Informationen offenzulegen, Sicherheitsmaßnahmen zu umgehen, Dateien zu manipulieren oder Cross-Site-Scripting (XSS)-Angriffe durchzuführen.
- GHSA-fj7x-q9j7-g6q6Black vulnerable to Regular Expression Denial of Service (ReDoS)2024-03-19ghsa · osvUS
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.
- PYSEC-2024-482024-03-19vendor · osvUS
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.
also known as (7)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (11)
External citations — patches, advisories, analysis.
- https://access.redhat.com/security/cve/cve-2024-21503cnnvd
- https://cxsecurity.com/cveshow/CVE-2024-21503/cnnvd
- https://github.com/psf/black/commit/f00093672628d212b8965a8993cee8bedf5fe9b8cnnvd
- https://github.com/psf/black/releases/tag/24.3.0cnnvd
- https://security.snyk.io/vuln/SNYK-PYTHON-BLACK-6256273cnnvd
- https://github.com/psf/black/commit/f00093672628d212b8965a8993cee8bedf5fe9b8enisa_euvd
- https://github.com/psf/black/releases/tag/24.3.0enisa_euvd
- https://security.snyk.io/vuln/SNYK-PYTHON-BLACK-6256273enisa_euvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan