Allows arbitrary filesystem writes outside the extraction directory during extraction with filter="data". You are affected by this…
PSF·CWE-22·Published 2025-06-03
Allows arbitrary filesystem writes outside the extraction directory during extraction with filter="data". You are affected by this vulnerability if using the tarfile module to extract untrusted tar archives using TarFile.extractall() or TarFile.extract() using the filter= parameter with a value of "data" or "tar". See the tarfile extraction filters documentation https://docs.python.org/3/library/tarfile.html#tarfile-extraction-filter for more information. Note that for Python 3.14 or later the default value of filter= changed from "no filtering" to `"data", so if you are relying on this new default behavior then your usage is also affected. Note that none of these vulnerabilities significantly affect the installation of source distributions which are tar archives as source distributions already allow arbitrary code execution during the build process. However when evaluating source distributions it's important to avoid installing source distributions with suspicious links.
Allows arbitrary filesystem writes outside the extraction directory during extraction with filter="data". You are affected by this vulnerability if using the tarfile module to extract untrusted tar archives using TarFile.extractall() or TarFile.extract() using the filter= parameter with a value of "data" or "tar". See the tarfile extraction filters documentation https://docs.python.org/3/library/tarfile.html#tarfile-extraction-filter for more information. Note that for Python 3.14 or later the default value of filter= changed from "no filtering" to `"data", so if you are relying on this new default behavior then your usage is also affected. Note that none of these vulnerabilities significantly affect the installation of source distributions which are tar archives as source distributions already allow arbitrary code execution during the build process. However when evaluating source distributions it's important to avoid installing source distributions with suspicious links.
Permite escrituras arbitrarias en el sistema de archivos fuera del directorio de extracción durante la extracción con filter="data". Esta vulnerabilidad afecta al usuario si utiliza el módulo tarfile para extraer archivos tar no confiables mediante TarFile.extractall() o TarFile.extract() y el parámetro filter= con el valor "data" o "tar". Consulte la documentación sobre filtros de extracción de archivos tar (https://docs.python.org/3/library/tarfile.html#tarfile-extraction-filter) para obtener más información. Solo las versiones de Python 3.12 o posteriores se ven afectadas por estas vulnerabilidades; las versiones anteriores no incluyen la función de filtro de extracción. Tenga en cuenta que, para Python 3.14 o posteriores, el valor predeterminado de filter= cambió de "sin filtrado" a "data", por lo que si utiliza este nuevo comportamiento predeterminado, su uso también se verá afectado. Tenga en cuenta que ninguna de estas vulnerabilidades afecta significativamente la instalación de distribuciones fuente que son archivos tar, ya que estas permiten la ejecución de código arbitrario durante el proceso de compilación. Sin embargo, al evaluar distribuciones de origen es importante evitar instalar distribuciones de origen con enlaces sospechosos.
| Version | Type | Source | Base | Exp | Impact | Vector |
|---|---|---|---|---|---|---|
| 3.1 | Primary | cve.org | 9.4 | — | — | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L |
| 3.1 | Secondary | ENISA EUVD | 9.4 | — | — | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L |
| 3.1 | Secondary | NVD | 9.4 | 3.9 | 5.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L |