{"id":"CVE-2024-21503","published":"2024-03-19T05:00:01Z","modified":"2024-08-01T22:20:40Z","title":"Versions of the package black before 24.3.0 are vulnerable to Regular Expression Denial of Service (ReDoS) via the…","vendor":null,"product":null,"tier":"tail","description":{"text":"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.\r\rExploiting this vulnerability is possible when running Black on untrusted input, or if you habitually put thousands of leading tab characters in your docstrings.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.3,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L/E:P","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01112,"percentile":0.65613,"provenance":"source"},"cwes":[{"id":"CWE-1333","name":"Inefficient Regular Expression Complexity"},{"id":"CWE-75","name":"Failure to Sanitize Special Elements into a Different Plane"}],"references":[{"url":"https://security.snyk.io/vuln/SNYK-PYTHON-BLACK-6256273","tags":[]},{"url":"https://github.com/psf/black/releases/tag/24.3.0","tags":[]},{"url":"https://github.com/psf/black/commit/f00093672628d212b8965a8993cee8bedf5fe9b8","tags":[]}],"priority":{"score":16.8,"factors":[{"name":"EPSS percentile","points":13.12},{"name":"CVSS severity","points":3.71}]},"affectedVersions":[{"vendor":"n/a","product":"black","versions":["< 24.3.0"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial","timestamp":"2024-03-19T13:35:33.402362Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"black","vulnerableRanges":["<24.3.0"],"patched":["24.3.0"],"from":["GHSA-fj7x-q9j7-g6q6","PYSEC-2024-48"],"provenance":"source"}],"summary":{"text":"The Python code formatter Black, in versions before 24.3.0, contains a regular expression denial-of-service flaw in the lines_with_leading_tabs_expanded function in its strings.py file. An attacker who can get Black to process crafted input, such as running it on untrusted code or on docstrings containing thousands of leading tab characters, can cause excessive processing time and make the service unresponsive.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:27:35Z"},"euvd":{"id":"EUVD-2024-0019","exploited":false,"provenance":"source"}}