BIT-libpython-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 untrusted tar archives are exposed. A malicious archive can cause parsing to enter an infinite loop and deadlock.
What does an attacker need to exploit it?
An attacker needs to supply a specially crafted tar archive containing a negative member offset. No authentication or user interaction is required according to the provided severity vector.
Is there a mitigation if patching is not immediately possible?
The issue can be mitigated by applying the referenced patch after importing the tarfile module. The provided data does not describe other mitigations.