BIT-python-min-2025-8194: Tarfile infinite loop during parsing with negative member offset
There is a defect in the CPython “tarfile” module affecting the “TarFile” extraction and entry enumeration APIs. The tar implementation would process tar archives with negative offsets without error, resulting in an infinite loop and deadlock during the parsing of maliciously crafted tar archives.
This vulnerability can be mitigated by including the following patch after importing the “tarfile” module: https://gist.github.com/sethmlarson/1716ac5b82b73dbcbf23ad2eff8b33e1
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
bitnami/libpythonto a version that resolves this vulnerability.Fixed in 3.9.24 - Upgrade
Upgrade
bitnami/libpythonto a version that resolves this vulnerability.Fixed in 3.10.19 - Upgrade
Upgrade
bitnami/libpythonto a version that resolves this vulnerability.Fixed in 3.11.14 - Upgrade
Upgrade
bitnami/libpythonto a version that resolves this vulnerability.Fixed in 3.12.12 - Upgrade
Upgrade
bitnami/libpythonto a version that resolves this vulnerability.Fixed in 3.13.6 - Upgrade
Upgrade
bitnami/pythonto a version that resolves this vulnerability.Fixed in 3.9.24 - Upgrade
Upgrade
bitnami/pythonto a version that resolves this vulnerability.Fixed in 3.10.19 - Upgrade
Upgrade
bitnami/pythonto a version that resolves this vulnerability.Fixed in 3.11.14 - Upgrade
Upgrade
bitnami/pythonto a version that resolves this vulnerability.Fixed in 3.12.12 - Upgrade
Upgrade
bitnami/pythonto a version that resolves this vulnerability.Fixed in 3.13.6 - Upgrade
Upgrade
bitnami/python-minto a version that resolves this vulnerability.Fixed in 3.9.24 - Upgrade
Upgrade
bitnami/python-minto a version that resolves this vulnerability.Fixed in 3.10.19 - Upgrade
Upgrade
bitnami/python-minto a version that resolves this vulnerability.Fixed in 3.11.14 - Upgrade
Upgrade
bitnami/python-minto a version that resolves this vulnerability.Fixed in 3.12.12 - Upgrade
Upgrade
bitnami/python-minto a version that resolves this vulnerability.Fixed in 3.13.6
Event History
Frequently Asked Questions
Who is exposed to this issue?
Applications that use CPython's tarfile module to enumerate entries in or extract attacker-controlled tar archives are exposed. Processing a maliciously crafted archive can cause the parsing operation to loop indefinitely and deadlock.
What does an attacker need to exploit it?
An attacker needs to cause the application to parse a crafted tar archive containing a negative member offset. No privileges or user interaction are indicated by the provided severity vector.
Are confidentiality or integrity affected?
The provided severity vector indicates no confidentiality or integrity impact. The impact is denial of service, because tarfile parsing can enter an infinite loop and deadlock.
What can be done if patching is not immediately possible?
The issue can be mitigated by applying the provided patch after importing the tarfile module. This mitigation is intended to prevent processing of tar archives with negative offsets.