python / python/cpython

tarfile `data`/`tar` filter bypass via hard link to a symlink

Abierto
#157,190 0 comentarios 0 reacciones 1 asignado Ver en GitHub

@StanFromIreland ya está trabajando en esto.

Desde el 8/9/2026.

3.10 3.11 3.12 3.13 stdlib type-security
Lenguaje dominante
Python
Estrellas
77.2k
Forks
35.9k
Métricas de merge de PR
Métricas de PR pendientes

Descripción

On CPython 3.13.15 for Linux, an attacker-controlled tar archive extracted with the tar or data filter can make tarfile change the permissions and modification time of an existing file outside the extraction directory. The archive also leaves a path inside the extracted tree that resolves to the outside file. Opening that path returns the outside file's content.

This was incidentally fixed by https://github.com/python/cpython/commit/5a57248b22ad3b9aafcaaadae2c304a1923daeca for 3.14+ which changed os.link to use AT_SYMLINK_FOLLOW.

Linked PRs
  • gh-157191
  • gh-157192
  • gh-157261
  • gh-157262
  • gh-157454

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.