BIT-libpython-2024-6232: Regular-expression DoS when parsing TarFile headers
There is a MEDIUM severity vulnerability affecting CPython.
Regular expressions that allowed excessive backtracking during tarfile.TarFile header parsing are vulnerable to ReDoS via specifically-crafted tar archives.
Affected Software
Event History
Frequently Asked Questions
What does an attacker need to exploit this issue?
An attacker needs to provide a specifically crafted tar archive that is parsed through tarfile.TarFile header processing. No privileges or user interaction are required according to the supplied severity vector.
Who is most exposed?
CPython deployments that parse tar archives from untrusted or attacker-controlled sources are exposed. The impact is denial of service, as malicious headers can trigger excessive regular-expression backtracking during parsing.
How can I tell whether an application may be affected?
Review whether the application uses Python's tarfile.TarFile functionality to open or inspect tar archives, especially archives received from external users, uploads, network sources, or other untrusted inputs.