python / python/cpython

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

Offen
#157,190 0 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

@StanFromIreland arbeitet bereits daran.

Seit 08.9.2026.

3.10 3.11 3.12 3.13 stdlib type-security
Vorherrschende Sprache
Python
Sterne
77.2k
Forks
35.9k
PR-Merge-Kennzahlen
PR-Kennzahlen ausstehend

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.