CVE-2026-4360·Python vulnerability
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.
- Severity
- medium
- Software
- Python
- Fixed in
- 3.1.5
- Published
Affected versions
Until: 3.1.5
Fixed in: 3.1.5
How to fix this CVE
Update Python to version 3.1.5 or later to resolve a tarfile extraction vulnerability where the security filter parameter is bypassed during hardlink operations. Systems that process untrusted tar archives should prioritize this update to prevent unintended file ownership changes. Apply the update across all Python installations used for archive handling.
sudo dnf update python3Defensia detects this vulnerability
How to check if you are affected
- Check installed Python version: python3 --version
- Verify tarfile module is available: python3 -c "import tarfile; print(tarfile.__file__)"
- Search for tarfile.extract() usage in application code: grep -r "extract(" /path/to/app --include="*.py" | grep -i tar
- Confirm the fix: python3 -c "import sys; print('Vulnerable' if sys.version_info < (3, 1, 5) else 'Patched')"
FAQ
What is CVE-2026-4360?
CVE-2026-4360 is a vulnerability in Python's tarfile.extract() function where the security filter parameter is not properly applied to hardlink operations. This allows attackers to create files with arbitrary uid/gid values when processing malicious tar archives, bypassing intended security restrictions.
Is CVE-2026-4360 being actively exploited?
No, there are currently no public reports of active exploitation or proof-of-concept exploits for CVE-2026-4360.
What versions of Python are affected by CVE-2026-4360?
All Python versions prior to and including 3.1.4 are affected. Python 3.1.5 and later versions contain the fix.
How do I check if my server is vulnerable to CVE-2026-4360?
Run `python3 --version` and compare the version number to 3.1.5. If your version is 3.1.4 or earlier, your system is vulnerable.
Does Defensia detect CVE-2026-4360?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Python is installed on a monitored server, CVE-2026-4360 will appear in your dashboard with remediation steps.
Related Python CVEs
References
- https://github.com/python/cpython/commit/0367912be336348b30572f8029cec4a282782d92
- https://github.com/python/cpython/commit/5e0ef3f1afe892e4f64eb83368db57ac4c40cba0
- https://github.com/python/cpython/commit/7b57e8d51446297b8c7c482d224bc5f1938e4301
- https://github.com/python/cpython/commit/7ccdbaba2c54250a70d7f25632152df7655a5e0a
- https://github.com/python/cpython/commit/cf23b9153181062150d061468b6d24af33fe214f
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-4360. Free for 1 server.
Get started free