CVE-2025-4138
CVE-2025-4138 — Bypassing extraction filter to create symlinks to arbitrary targets outside extraction directory
Allows the extraction filter to be ignored, allowing symlink targets to point outside the destination directory, and the modification of some file metadata. You are affected by this vulnerability if using the tarfile module to extract untrusted tar archives using TarFile.extractall() or TarFile.extract() using the filter= parameter with a value of "data" or "tar". See the tarfile extraction filters documentation https://docs.python.org/3/library/tarfile.html#tarfile-extraction-filter for more information. Note that for Python 3.14 or later the default value of filter= changed from "no filtering" to `"data", so if you are relying on this new default behavior then your usage is also affected. Note that none of these vulnerabilities significantly affect the installation of source distributions which are tar archives as source distributions already allow arbitrary code execution during the…
Published Updated Sources: cvelistV5, PSF
Triage
Is it exploited, how likely is exploitation, what does it touch, and how severe do the scoring sources call it.
Exploitation
Public exploit
exploit code published, no use observed
EPSS
1%
chance of exploitation in 30 days
CVSS base
7.5
HIGH
CISA SSVC assessment
Three decision points CISA publishes for the CVEs it assesses · SSVC 2.0.3. A stakeholder decision, not a severity score.
Exploitation
None
none · proof-of-concept · active
Automatable
Yes
can an attacker script all four kill-chain steps
Technical impact
Partial
partial · total control of the vulnerable component
Affected scope
The catalog records vendors and products as separate lists, not pairs, so which product belongs to which vendor is not something this page can say.
Vendors (1)
Products (1)
Every base score collected
Sources score independently and disagree; each row says who scored it and under which version.
| Score | Version | Severity | Expl. | Impact | Source |
|---|---|---|---|---|---|
| 7.5 | CVSS 3.1 | HIGH | n/a | n/a | cvelistV5 |
Weakness & attack patterns
- CWE-22
Public exploit
Capability, not use: code existing is a different claim from anyone running it.
Indexed by
Detection
Read off the CVSS vector and the weakness class. Starting points, not rules we have tested.
- Search application, proxy, and WAF logs for requests touching //docs.python.org/3/library/tarfile.html#tarfile-extraction-filter.
References
12 on the record
- github.com/python/cpython/issues/135034
issue-tracking
- github.com/python/cpython/pull/135037
patch
- mail.python.org/archives/list/[email protected]/thread/MAXIJJCUUMCL7ATZNDVEGGHUMQMUUKLG/
vendor-advisory
- github.com/python/cpython/commit/3612d8f51741b11f36f8fb0494d79086bac9390a
patch
- github.com/python/cpython/commit/9e0ac76d96cf80b49055f6d6b9a6763fb9215c2a
patch
- gist.github.com/sethmlarson/52398e33eff261329a0180ac1d54f42f
mitigation
- github.com/python/cpython/commit/19de092debb3d7e832e5672cc2f7b788d35951da
patch
- github.com/python/cpython/commit/aa9eb5f757ceff461e6e996f12c89e5d9b583b01
patch
Related CVEs
Same product first, then the same weakness or threat actor.
- CVE-2026-115557 Distrust compromised intermediate certificates in ssl moduleCVSS 9.4
- CVE-2026-85706 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in GitLabCVSS 10.0 · CISA KEV
- CVE-2026-48282 ColdFusion | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (CWE-22)CVSS 10.0 · CISA KEV
- CVE-2026-34909 Ubiquiti UniFi OS Path Traversal VulnerabilityCVSS 10.0 · CISA KEV
- CVE-2025-34028 Commvault Command Center Path Traversal VulnerabilityCVSS 10.0 · CISA KEV
- CVE-2019-11510 Ivanti Pulse Connect Secure Arbitrary File Read VulnerabilityCVSS 10.0 · CISA KEV
Elsewhere on this site
- Python Software Foundationevery CVE for this vendor
- CWE-22other pages naming this weakness
Not in any source we poll
Listed rather than left blank: an empty field and an unmeasured one look identical on screen, and only one is a reason to look elsewhere.
- No confirmed IOCs, IP addresses, domains, file hashes, or malware artifacts supplied.
- No organization-specific asset inventory, compensating-control status, or patch deployment evidence supplied.
- No exploit packet captures, log samples, or incident case IDs supplied.