CVE-2026-7774 PUBLISHED

tarfile.data_filter path traversal bypass allows writing outside the extraction directory

Assigner: PSF
Reserved: 04.05.2026 Published: 04.06.2026 Updated: 04.06.2026

tarfile.data_filter could be bypassed using crafted link entries, including symlinks with empty or directory-like names, to redirect later archive members outside the intended extraction directory. This allowed a malicious tar archive to cause tarfile.extractall() to write files outside the destination directory, subject to the permissions of the extracting process.

Metrics

CVSS Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
CVSS Score: 6.9

Product Status

Vendor Python Software Foundation
Product CPython
Versions Default: unaffected
  • affected from 0 to 3.15.0 (excl.)

Credits

  • Phùng Siêu Đạt (OPSWAT Unit 515) reporter
  • Seth Larson (https://github.com/sethmlarson) coordinator
  • Gregory P. Smith (https://github.com/gpshead) remediation developer
  • Petr Viktorin (https://github.com/encukou) remediation developer
  • Stan Ulbrych (https://github.com/StanFromIreland) coordinator

References

Problem Types

  • CWE-22 CWE