cve/2024/CVE-2024-21503.md
2024-05-25 21:48:12 +02:00

19 lines
1.0 KiB
Markdown

### [CVE-2024-21503](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-21503)
![](https://img.shields.io/static/v1?label=Product&message=black&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=0%3C%2024.3.0%20&color=brighgreen)
![](https://img.shields.io/static/v1?label=Vulnerability&message=Regular%20Expression%20Denial%20of%20Service%20(ReDoS)&color=brighgreen)
### Description
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.
### POC
#### Reference
- https://security.snyk.io/vuln/SNYK-PYTHON-BLACK-6256273
#### Github
- https://github.com/NaInSec/CVE-LIST
- https://github.com/fkie-cad/nvd-json-data-feeds