BIT-python-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
What application behavior is exposed to this issue?
Applications that use CPython's tarfile module to extract archives or enumerate their entries are exposed when they process a maliciously crafted tar archive containing a negative member offset.
What does an attacker need to exploit the flaw?
An attacker needs to cause the application to parse a crafted tar archive. The provided vector indicates this can be done remotely, requires no privileges or user interaction, and has low attack complexity.
What is the impact if exploitation succeeds?
Parsing can enter an infinite loop and deadlock, causing a denial of service. The supplied severity vector indicates availability impact only, with no stated confidentiality or integrity impact.
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.