PT-2024-2442 · Black+1 · Black+1

Sajeeb Lohani

·

Published

2024-03-18

·

Updated

2025-01-24

·

CVE-2024-21503

CVSS v3.1

5.3

Medium

VectorAV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Name of the Vulnerable Software and Affected Versions black versions prior to 24.3.0
Description The issue is related to a Regular Expression Denial of Service (ReDoS) vulnerability via the lines with leading tabs expanded function in the strings.py file. An attacker could exploit this by crafting a malicious input that causes a denial of service. This is possible when running Black on untrusted input or if thousands of leading tab characters are habitually put in docstrings.
Recommendations For versions prior to 24.3.0, update to version 24.3.0 or later to resolve the issue. As a temporary workaround, consider avoiding the use of the lines with leading tabs expanded function or restricting input to trusted sources until a patch is applied.

Fix

DoS

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

BDU:2024-02397
CVE-2024-21503
GHSA-FJ7X-Q9J7-G6Q6
OPENSUSE-SU-2024:13783-1
PYSEC-2024-48
RHSA-2024:3781
SUSE-SU-2024:2481-1

Affected Products

Debian
Black