Ecosyste.ms: Advisories
An open API service providing security vulnerability metadata for many open source software ecosystems.
Security Advisories: GSA_kwCzR0hTQS1majd4LXE5ajctZzZxNs4AA6He
Black vulnerable to Regular Expression Denial of Service (ReDoS)
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.
Permalink: https://github.com/advisories/GHSA-fj7x-q9j7-g6q6JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1majd4LXE5ajctZzZxNs4AA6He
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Moderate
Classification: General
Published: 9 months ago
Updated: 5 months ago
CVSS Score: 5.3
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Identifiers: GHSA-fj7x-q9j7-g6q6, CVE-2024-21503
References:
- https://nvd.nist.gov/vuln/detail/CVE-2024-21503
- https://github.com/psf/black/commit/f00093672628d212b8965a8993cee8bedf5fe9b8
- https://github.com/psf/black/releases/tag/24.3.0
- https://security.snyk.io/vuln/SNYK-PYTHON-BLACK-6256273
- https://github.com/pypa/advisory-database/tree/main/vulns/black/PYSEC-2024-48.yaml
- https://github.com/advisories/GHSA-fj7x-q9j7-g6q6
Blast Radius: 26.6
Affected Packages
pypi:black
Dependent packages: 9,489Dependent repositories: 105,588
Downloads: 62,637,445 last month
Affected Version Ranges: >= 0, < 24.3.0
Fixed in: 24.3.0
All affected versions: 22.1.0, 22.3.0, 22.6.0, 22.8.0, 22.10.0, 22.12.0, 23.1.0, 23.3.0, 23.7.0, 23.9.0, 23.9.1, 23.10.0, 23.10.1, 23.11.0, 23.12.0, 23.12.1, 24.1.0, 24.1.1, 24.2.0
All unaffected versions: 24.3.0, 24.4.0, 24.4.1, 24.4.2, 24.8.0, 24.10.0