Test Python tarfile data filters before extracting deployment artifacts
An archive-extraction step is often hidden inside a deployment helper: download a release bundle, unpack it, then move the expected files into place. That makes the archive a filesystem input, not just a transport format. A member name, symlink, hard link, device entry, ownership field, or permission can change what extraction tries to create.
Python’s tarfile module now has extraction filters for this boundary. Python 3.14 changed the default filter to data, but Python 3.13 and earlier have a less restrictive default. Passing filter="data" explicitly is therefore useful in code that supports more than one Python release. It is not a substitute for patching: Ubuntu’s September Python advisory includes CVE-2026-4224, involving how the tarfile filter parameter was applied to hard links. Update the interpreter or distribution package before relying on any filter behavior.