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
Advisories
Source ID Title
Debian DLA Debian DLA DLA-4445-1 python3.9 security update
EUVD EUVD EUVD-2025-22999 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
Ubuntu USN Ubuntu USN USN-7710-1 Python vulnerabilities
Ubuntu USN Ubuntu USN USN-7710-2 Python 2.7 vulnerability
Fixes

Solution

No solution given by the vendor.


Workaround

No workaround given by the vendor.

History

Wed, 05 Nov 2025 07:30:00 +0900


Thu, 25 Sep 2025 03:00:00 +0900


Fri, 08 Aug 2025 05:30:00 +0900


Tue, 29 Jul 2025 22:45:00 +0900

Type Values Removed Values Added
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: import tarfile def _block_patched(self, count):     if count < 0: # pragma: no cover         raise tarfile.InvalidHeaderError("invalid offset")     return _block_patched._orig_block(self, count) _block_patched._orig_block = tarfile.TarInfo._block tarfile.TarInfo._block = _block_patched 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
References

Tue, 29 Jul 2025 21:30:00 +0900

Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Moderate


Tue, 29 Jul 2025 17:00:00 +0900

Type Values Removed Values Added
First Time appeared Python
Python cpython
Vendors & Products Python
Python cpython

Tue, 29 Jul 2025 04:45:00 +0900


Tue, 29 Jul 2025 04:15:00 +0900

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Tue, 29 Jul 2025 04:00:00 +0900

Type Values Removed Values Added
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: import tarfile def _block_patched(self, count):     if count < 0: # pragma: no cover         raise tarfile.InvalidHeaderError("invalid offset")     return _block_patched._orig_block(self, count) _block_patched._orig_block = tarfile.TarInfo._block tarfile.TarInfo._block = _block_patched
Title Tarfile infinite loop during parsing with negative member offset
Weaknesses CWE-835
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}


Projects

Sign in to view the affected projects.

cve-icon MITRE

Status: PUBLISHED

Assigner: PSF

Published:

Updated: 2025-11-04T22:06:48.390Z

Reserved: 2025-07-25T14:05:55.899Z

Link: CVE-2025-8194

cve-icon Vulnrichment

Updated: 2025-11-04T22:06:48.390Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2025-07-28T19:15:43.793

Modified: 2025-11-04T22:16:44.687

Link: CVE-2025-8194

cve-icon Redhat

Severity : Moderate

Publid Date: 2025-07-28T18:42:44Z

Links: CVE-2025-8194 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2025-07-29T16:59:17Z

Weaknesses