CVE-2025-8194

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
Configurations

No configuration.

History

07 Aug 2025, 21:15

Type Values Removed Values Added
References
  • () https://github.com/python/cpython/commit/c9d9f78feb1467e73fd29356c040bde1c104f29f -
  • () https://github.com/python/cpython/commit/fbc2a0ca9ac8aff6887f8ddf79b87b4510277227 -

29 Jul 2025, 14:15

Type Values Removed Values Added
References
  • () https://gist.github.com/sethmlarson/1716ac5b82b73dbcbf23ad2eff8b33e1 -
Summary
  • (es) Existe un defecto en el módulo "tarfile" de CPython que afecta a las API de extracción y enumeración de entradas de "TarFile". La implementación de tar procesaba archivos tar con desplazamientos negativos sin errores, lo que resultaba en un bucle infinito y un bloqueo durante el análisis de archivos tar manipulados con fines maliciosos. Esta vulnerabilidad se puede mitigar incluyendo el siguiente parche después de importar el módulo "tarfile": 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
Summary (en) 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 (en) 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

28 Jul 2025, 20:17

Type Values Removed Values Added
References
  • () https://github.com/python/cpython/commit/7040aa54f14676938970e10c5f74ea93cd56aa38 -
  • () https://github.com/python/cpython/commit/cdae923ffe187d6ef916c0f665a31249619193fe -

28 Jul 2025, 19:15

Type Values Removed Values Added
New CVE

Information

Published : 2025-07-28 19:15

Updated : 2025-08-07 21:15


NVD link : CVE-2025-8194

Mitre link : CVE-2025-8194

CVE.ORG link : CVE-2025-8194


JSON object : View

Products Affected

No product.

CWE
CWE-835

Loop with Unreachable Exit Condition ('Infinite Loop')