CVE-2025-4138
Reported by psf · Published June 3, 2025
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 build process. However when evaluating source distributions it's important to avoid installing source distributions with suspicious links.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| python3.11-devel | Amazon Linux | 3.11.13-1.amzn2023.0.1 |
| python3-tkinter | Amazon Linux | 3.9.23-1.amzn2023.0.1 |
| platform-python-debug | errata.rockylinux.org | 3.6.8-70.el8 |
| platform-python-devel | errata.rockylinux.org | 3.6.8-70.el8 |
| python3-test | Amazon Linux | 3.9.23-1.amzn2023.0.1 |
| libpython | Bitnami | 3.13.4, 3.12.11, 3.11.13, 3.10.18, 3.9.23 |
| python3-libs | Amazon Linux | 3.9.23-1.amzn2023.0.1 |
| platform-python | errata.rockylinux.org | 3.6.8-70.el8 |
| python3-tkinter | errata.rockylinux.org | 3.6.8-70.el8 |
| python3.12-devel | Amazon Linux | 3.12.10-2.amzn2023.0.2 |
| python3.12-libs | Amazon Linux | 3.12.10-2.amzn2023.0.2 |
| python3-idle | Amazon Linux | 3.9.23-1.amzn2023.0.1 |
42 more packages have a fixed version. See every fix in Lookup.
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Python Software Foundation | CPython | 0, 3.10.0, 3.11.0 |
| amazon:2023 | python3.11-devel | 0 |
| amazon:2023 | python3-tkinter | 0 |
| amazon:2023 | python3-test | 0 |
| amazon:2023 | python3-libs | 0 |
| amazon:2023 | python3.12-devel | 0 |
| amazon:2023 | python3.12-libs | 0 |
| amazon:2023 | python3-idle | 0 |
| amazon:2023 | python3.12-tkinter | 0 |
| chainguard | python-3.13 | 0 |
| amazon:2023 | python3-debug | 0 |
| alpine | python3 | 0, 0 |
| wolfi | python-3.13 | 0 |
| amazon:2023 | python3.12-idle | 0 |
| amazon:2023 | python3.12-debug | 0 |
| amazon:2023 | python3.12-test | 0 |
| amazon:2023 | python-unversioned-command | 0 |
| Python Software Foundation | CPython | 3.13.0, 0, 3.10.0 |
| amazon:2023 | python3.11-test | 0 |
| amazon:2023 | python3-devel | 0 |
…and 8 more
Timeline
- Jun 3, 2025 Coalition ESS Score (15 in total, the first dated here)
- Jun 3, 2025 Fix PR Merged
- Jun 3, 2025 CVE Published
- Jun 3, 2025 GitHub Gist PoC
- Jun 4, 2025 EPSS Score (30 in total, the first dated here)
- May 22, 2026 Security Advisory (14 in total, the first dated here)
- May 28, 2026 Distribution Patch (14 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2025-4138
vulnetix vdb fixes CVE-2025-4138
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2025-4138/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart