CVE-2026-4360: In the Tarfile.extract() function, the filter parameter is not passed properly when extracting hardlinks.
Medium CVSS 5.3
- CVE id
- CVE-2026-4360
- Published
- Last modified
Affected packages
| Package | Affected versions | Fixed in |
|---|---|---|
| Python Runtimes and servers |
< 3.1.5 | 3.1.5 |
How to fix it
Upgrade Python to 3.1.5 or later.
python --version
- Install the patched Python release of your minor line (pyenv, the python image tag, or your OS packages) and recreate virtual environments.
A free AIssue account reads the runtime versions your repositories pin (version files, Dockerfiles, build files) and tells you when one is affected.
Details
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.
References
- CVE-2026-4360 on the NVD
- Advisory: https://nvd.nist.gov/vuln/detail/CVE-2026-4360
- Web: https://github.com/python/cpython/commit/0367912be336348b30572f8029cec4a282782d92
- Web: https://github.com/python/cpython/commit/5e0ef3f1afe892e4f64eb83368db57ac4c40cba0
- Web: https://github.com/python/cpython/commit/7b57e8d51446297b8c7c482d224bc5f1938e4301
- Web: https://github.com/python/cpython/commit/7ccdbaba2c54250a70d7f25632152df7655a5e0a
- Web: https://github.com/python/cpython/commit/cf23b9153181062150d061468b6d24af33fe214f
- Web: https://github.com/python/cpython/commit/d2b2f5eacab4dd48446b63340613b05dcbbf0b44
- Web: https://github.com/python/cpython/commit/eee3ddf0ca10283cc7fea724aae9cd8665f8d15e
- Web: https://github.com/python/cpython/issues/151987
- Web: https://github.com/python/cpython/pull/151988
- Web: https://mail.python.org/archives/list/security-announce@python.org/thread/TWZW2PC2AZOV6FENIHFSRC63OM7MBGSB/
Am I affected?
Upload or paste your lockfile. We check every package version in it against OSV.dev, this advisory included, and email you the vulnerable ones with the version that fixes them. Free, and no account needed.
About this data
Source: National Vulnerability Database (NVD) (public domain). Severity comes from the advisory's own rating when it has one, else from its CVSS score.