CVE-2025-8194

Tarfile infinite loop during parsing with negative member offset

State
Published
Severity
7.5 High
Published
Jul 28, 2025
Updated
Jul 31, 2026
Reserved
Jul 25, 2025

Read the record on cve.org

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

Scores

CVSSScoreVectorSource
3.17.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HPSF

Weaknesses

  • CWE-835 Loop with Unreachable Exit Condition ('Infinite Loop')

Affected Products

ProductVersions
CPythonPython Software Foundation
  • before 3.9.24Affected
  • 3.10.0 to before 3.10.19Affected
  • 3.11.0 to before 3.11.14Affected
  • 3.12.0 to before 3.12.12Affected
  • 3.13.0 to before 3.13.6Affected
  • 3.14.0a1 to before 3.14.0rc2Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.