CVE-2025-8194 Tarfile infinite loop during parsing with negative member offset
Attackers can cause a denial of service via infinite loop in Python's tarfile module by providing maliciously crafted archives with negative offsets.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-8194?
CVE-2025-8194 is a high-severity denial of service vulnerability in CPython, published on 28 Jul 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
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
Weakness: CWE-835
Which versions are affected by CVE-2025-8194?
3 open source packages ship an affected version, including libpython, python and python-min.
| Package | Affected | Fixed in |
|---|---|---|
libpython Bitnami | All versions | 3.9.24, 3.10.19, 3.11.14, 3.12.12, 3.13.6 |
python Bitnami | All versions | 3.9.24, 3.10.19, 3.11.14, 3.12.12, 3.13.6 |
python-min Bitnami | All versions | 3.9.24, 3.10.19, 3.11.14, 3.12.12, 3.13.6 |
Linux distribution packages (37)
python-unversioned-command AlmaLinux:10 | All versions | 3.12.9-2.el10_0.3 |
platform-python AlmaLinux:8 | All versions | 3.6.8-71.el8_10.alma.1 |
platform-python-debug AlmaLinux:8 | All versions | 3.6.8-71.el8_10.alma.1 |
platform-python-devel AlmaLinux:8 | All versions | 3.6.8-71.el8_10.alma.1 |
python3-idle AlmaLinux:8 | All versions | 3.6.8-71.el8_10.alma.1 |
python3-libs AlmaLinux:8 | All versions | 3.6.8-71.el8_10.alma.1 |
python3-test AlmaLinux:8 | All versions | 3.6.8-71.el8_10.alma.1 |
python3-tkinter AlmaLinux:8 | All versions | 3.6.8-71.el8_10.alma.1 |
python3.11 AlmaLinux:8 | All versions | 3.11.13-2.el8_10 |
python3.11-debug AlmaLinux:8 | All versions | 3.11.13-2.el8_10 |
python3.11-devel AlmaLinux:8 | All versions | 3.11.13-2.el8_10 |
python3.11-idle AlmaLinux:8 | All versions | 3.11.13-2.el8_10 |
python3.11-libs AlmaLinux:8 | All versions | 3.11.13-2.el8_10 |
python3.11-rpm-macros AlmaLinux:8 | All versions | 3.11.13-2.el8_10 |
python3.11-test AlmaLinux:8 | All versions | 3.11.13-2.el8_10 |
python3.11-tkinter AlmaLinux:8 | All versions | 3.11.13-2.el8_10 |
python3.12 AlmaLinux:8 | All versions | 3.12.11-2.el8_10 |
python3.12-debug AlmaLinux:8 | All versions | 3.12.11-2.el8_10 |
python3.12-devel AlmaLinux:8 | All versions | 3.12.11-2.el8_10 |
python3.12-idle AlmaLinux:8 | All versions | 3.12.11-2.el8_10 |
python3.12-libs AlmaLinux:8 | All versions | 3.12.11-2.el8_10 |
python3.12-rpm-macros AlmaLinux:8 | All versions | 3.12.11-2.el8_10 |
python3.12-test AlmaLinux:8 | All versions | 3.12.11-2.el8_10 |
python3.12-tkinter AlmaLinux:8 | All versions | 3.12.11-2.el8_10 |
python-unversioned-command AlmaLinux:9 | All versions | 3.9.21-2.el9_6.2 |
python3 AlmaLinux:9 | All versions | 3.9.21-2.el9_6.2 |
python3-debug AlmaLinux:9 | All versions | 3.9.21-2.el9_6.2 |
python3-devel AlmaLinux:9 | All versions | 3.9.21-2.el9_6.2 |
python3-idle AlmaLinux:9 | All versions | 3.9.21-2.el9_6.2 |
python3-libs AlmaLinux:9 | All versions | 3.9.21-2.el9_6.2 |
python3-test AlmaLinux:9 | All versions | 3.9.21-2.el9_6.2 |
python3-tkinter AlmaLinux:9 | All versions | 3.9.21-2.el9_6.2 |
python3.11 AlmaLinux:9 | All versions | 3.11.11-2.el9_6.2 |
python3.11-debug AlmaLinux:9 | All versions | 3.11.11-2.el9_6.2 |
python3.11-devel AlmaLinux:9 | All versions | 3.11.11-2.el9_6.2 |
python3.11-idle AlmaLinux:9 | All versions | 3.11.11-2.el9_6.2 |
python3.11-libs AlmaLinux:9 | All versions | 3.11.11-2.el9_6.2 |
How do I fix CVE-2025-8194?
Upgrade libpython to a fixed version for your release line: 3.9.24, 3.10.19, 3.11.14 or 3.12.12.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2025-8194 being exploited?
There is no known exploitation of CVE-2025-8194 in the wild and no public exploit code.
Sources
Also known as ALSA-2025:14546, ALSA-2025:14560, ALSA-2025:14841, ALSA-2025:14984, ALSA-2025:15007, ALSA-2025:15010 and 82 more.