CVE-2026-4360 PUBLISHED

Tarfile.extract() doesn't fully respect filter parameter

Assigner: PSF
Reserved: 17.03.2026 Published: 30.06.2026 Updated: 30.06.2026

In the Tarfile.extract() function, the filter parameter is not passed properly when extracting hardlinks. An affected system that extracts content from untrusted tar files could end up writing files with an unexpected uid/gid despite the user passing filter='data' to the extract() function.

Metrics

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

Product Status

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

Credits

  • Michael Scovetta (https://github.com/scovetta) reporter
  • Seth Larson (https://github.com/sethmlarson) coordinator
  • Petr Viktorin (https://github.com/encukou) remediation developer

References

Problem Types

  • CWE-281 CWE