Read the docs
TI-2024-14260 Aliases CVE-2024-21503GHSA-fj7x-q9j7-g6q6

Regular expression denial of service in black

Priority MEDIUM 63CWE-1333Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
Denial of service
Confidentiality · integrity · availability
None · None · Low
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-1333.

Summary

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.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.00979 62nd percentileScored 2026-11-07
Fix Fixed black: 24.3.0black (PyPI): 24.3.0Red Hat: 1 advisory

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
Yes
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
—blackbefore 24.3.024.3.0Patch availableCNA
—black (PyPI)before 24.3.024.3.0Patch availableGHSA-fj7x-q9j7-g6q6
  • black Vendor— Affected before 24.3.0 Fixed in 24.3.0 Patch available CNA
  • black (PyPI) Vendor— Affected before 24.3.0 Fixed in 24.3.0 Patch available GHSA-fj7x-q9j7-g6q6

CPE names CISA-ADP · 1

CPEVersionsRoleVendor
cpe:2.3:a:python_software_foundation:black:*:*:*:*:*:*:*:*——Python Software Foundation

Remediation

  • Fix · CNA black Fixed in 24.3.0
  • Fix · GHSA-fj7x-q9j7-g6q6 black (PyPI) Fixed in 24.3.0 Advisory →

Red Hat 1 advisory

  • RHSA-2024:3781 Released 2024-06-10 · Red Hat rating Moderate
    Red Hat Ansible Automation Platform 2.4 Product Security and Bug Fix Update
    • Red Hat Ansible Automation Platform 2.4 for RHEL 8 automation-controller-venv-tower-4.5.7-1.el8ap, automation-hub-4.9.2-1.el8ap, python39-aiohttp-3.9.5-1.el8ap +25
    • Red Hat Ansible Automation Platform 2.4 for RHEL 9 automation-controller-venv-tower-4.5.7-1.el9ap, automation-hub-4.9.2-1.el9ap, python-aiohttp-3.9.5-1.el9ap +25

Vendor assessments

Red Hat

Red Hat rating: Moderate. Red Hat's page for this CVE →

ProductStatusPlan or fix
Red Hat Ansible Automation Platform 2.4 for RHEL 8Fixed RHSA-2024:3781
Red Hat Ansible Automation Platform 2.4 for RHEL 9Fixed RHSA-2024:3781
Not affected: 2 products
  • Red Hat Ansible Automation Platform 2.4 for RHEL 8
  • Red Hat Ansible Automation Platform 2.4 for RHEL 9

Timeline

  1. 2026-10-02 Threatist record created from CVE-2024-21503
  2. 2026-10-03 Alias added: GHSA-fj7x-q9j7-g6q6

References

Sources