cPython TarFile Infinite Loop via Negative Offset
CVE-2025-8194 Published on July 28, 2025
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
Vulnerability Analysis
CVE-2025-8194 is exploitable with network access, and does not require authorization privileges or user interaction. This vulnerability is considered to have a low attack complexity. The potential impact of an exploit of this vulnerability is considered to have no impact on confidentiality and integrity, and a high impact on availability.
Weakness Type
What is an Infinite Loop Vulnerability?
The program contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop. If the loop can be influenced by an attacker, this weakness could allow attackers to consume excessive resources such as CPU or memory.
CVE-2025-8194 has been classified to as an Infinite Loop vulnerability or weakness.
Products Associated with CVE-2025-8194
You can be notified by email with stack.watch whenever vulnerabilities like CVE-2025-8194 are published in these products:
Affected Versions
Python Software Foundation CPython:- Before 3.9.24 is affected.
- Version 3.10.0 and below 3.10.19 is affected.
- Version 3.11.0 and below 3.11.14 is affected.
- Version 3.12.0 and below 3.12.12 is affected.
- Version 3.13.0 and below 3.13.6 is affected.
- Version 3.14.0a1 and below 3.14.0rc2 is affected.
Exploit Probability
EPSS (Exploit Prediction Scoring System) scores estimate the probability that a vulnerability will be exploited in the wild within the next 30 days. The percentile shows you how this score compares to all other vulnerabilities.