CVE-2024-21503

published 19 Mar 2024 · updated 1 Aug 2024

Versions of the package black before 24.3.0 are vulnerable to Regular Expression Denial of Service (ReDoS) via the…

5.3MediumCVSS 5.3EPSS 1%

No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 1%. Fixed in 24.3.0.

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.

Affected

Vendors, products and packages with version ranges

VendorProductVersionsFixed
<24.3.024.3.0

Timeline

Every event on this vulnerability

Embed

A live severity badge for an advisory, README or ticket

CVE-2024-21503 severity on Zeptric[![CVE-2024-21503](https://zeptric.io/badge/cve/CVE-2024-21503.svg)](https://zeptric.io/cve/CVE-2024-21503)