Skip to main content
← All vulnerabilities
CVE-2024-21503PYSEC-2024-48GHSA-FJ7X-Q9J7-G6Q6

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

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 24.3.0
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: poc
  • Automatable: yes
  • Technical impact: partial

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: poc · Automatable: yes · Technical impact: partial

  3. Record last updated

Affected versions

  • n/a black

    fixed in 24.3.0

  • blackPyPI

    fixed in 24.3.0

References 3

security.snyk.io

GitHub · psf/black