Description
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.
Affected products
python: python
References10
- mail.python.org/archives/list/[email protected]/thre… Issue TrackingVendor Advisory
- github.com/python/cpython/commit/5e0ef3f1afe892e4f64eb83368db57… Patch
- github.com/python/cpython/commit/7b57e8d51446297b8c7c482d224bc5… Patch
- github.com/python/cpython/commit/7ccdbaba2c54250a70d7f25632152d… Patch
- github.com/python/cpython/commit/d2b2f5eacab4dd48446b63340613b0… Patch
- github.com/python/cpython/commit/eee3ddf0ca10283cc7fea724aae9cd… Patch
- github.com/python/cpython/issues/151987 Issue TrackingPatch
- github.com/python/cpython/pull/151988 Issue TrackingPatch
- github.com/python/cpython/commit/0367912be336348b30572f8029cec4…
- github.com/python/cpython/commit/cf23b9153181062150d061468b6d24…
Metrics
- CVSS 3.1
-
5.3
MEDIUM
Score source: NVD
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N - CVSS 4.0
-
2.0
LOW
Score source: CNA
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - EPSS — exploit probability
- 0% percentile: 42 · as of 16 November 2026
- CWE
- CWE-281
Could this be exploited in your environment?
A patch closes the known hole. A penetration test shows what an attacker can still reach — with proof.