CVE-2025-4330 Extraction filter bypass for linking outside extraction directory
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- No known exploitation · automatable: yes · technical impact: partial
- Technology
- UbuntuDebian
Description
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.
Upgrade path
18 packages: 17 fixed, 1 with no fix yet.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| debian/pypy3(Debian 13) | = 7.3.19+dfsg-2; = 7.3.20+dfsg-1; = 7.3.20+dfsg-2; = 7.3.20+dfsg-3 +11 more | No fix listed | No fix yet |
| alpine/python3(Alpine v3.19) | < 3.11.13-r0 | 3.11.13-r0 | Fixed |
| alpine/python3(Alpine v3.20) | < 3.12.11-r0 | 3.12.11-r0 | Fixed |
| alpine/python3(Alpine v3.21) | < 3.12.11-r0 | 3.12.11-r0 | Fixed |
| alpine/python3(Alpine v3.22) | < 3.12.11-r0 | 3.12.11-r0 | Fixed |
| alpine/python3(Alpine v3.23) | < 3.12.11-r0 | 3.12.11-r0 | Fixed |
| alpine/python3(Alpine v3.24) | < 3.12.11-r0 | 3.12.11-r0 | Fixed |
| alpine/python3-tkinter(Alpine v3.20) | < 3.12.11-r0 | 3.12.11-r0 | Fixed |
| alpine/python3-tkinter(Alpine v3.21) | < 3.12.11-r0 | 3.12.11-r0 | Fixed |
| alpine/python3-tkinter(Alpine v3.22) | < 3.12.11-r0 | 3.12.11-r0 | Fixed |
| alpine/python3-tkinter(Alpine v3.23) | < 3.12.11-r0 | 3.12.11-r0 | Fixed |
| alpine/python3-tkinter(Alpine v3.24) | < 3.12.11-r0 | 3.12.11-r0 | Fixed |
| azure linux python3(Azure Linux 3.0) | < 3.12.9-2 | 3.12.9-2 | Fixed |
| cbl-mariner python3(CBL-Mariner 2.0) | < 3.9.19-14 | 3.9.19-14 | Fixed |
| debian/pypy3(Debian 14) | < 7.3.20+dfsg-2; = 7.3.19+dfsg-2; = 7.3.20+dfsg-1 | 7.3.20+dfsg-2 | Fixed |
| debian/python3.13(Debian 13) | < 3.13.4-1 | 3.13.4-1 | Fixed |
| Python Software Foundation CPython | < 3.9.23; >= 3.10.0, < 3.10.18; >= 3.11.0, < 3.11.13; >= 3.12.0, < 3.12.11 +2 more | 3.9.23, 3.10.18, 3.11.13, 3.12.11, 3.13.4, 3.14.0b3 | Fixed |
| ubuntu/python3.12(Ubuntu 24.04) | < 3.12.3-1ubuntu0.7 | 3.12.3-1ubuntu0.7 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| cbl-mariner python3(CBL-Mariner:2.0) | < 3.9.19-14 | 3.9.19-14 |
| azure linux python3(Azure Linux:3.0) | < 3.12.9-2 | 3.12.9-2 |
| debian/pypy3(Debian:13) | All versions | No fix listed |
| debian/pypy3(Debian:13) | = 7.3.19+dfsg-2 | No fix listed |
| debian/pypy3(Debian:13) | = 7.3.20+dfsg-1 | No fix listed |
| debian/pypy3(Debian:13) | = 7.3.20+dfsg-2 | No fix listed |
| debian/pypy3(Debian:13) | = 7.3.20+dfsg-3 | No fix listed |
| debian/pypy3(Debian:13) | = 7.3.20+dfsg-4 | No fix listed |
| debian/pypy3(Debian:13) | = 7.3.21+dfsg-1 | No fix listed |
| debian/pypy3(Debian:13) | = 7.3.21+dfsg-2 | No fix listed |
| debian/pypy3(Debian:13) | = 7.3.21+dfsg-3 | No fix listed |
| debian/pypy3(Debian:13) | = 7.3.21+dfsg-4 | No fix listed |
| debian/pypy3(Debian:13) | = 7.3.22+dfsg-1 | No fix listed |
| debian/pypy3(Debian:13) | = 7.3.23+dfsg-1 | No fix listed |
| debian/pypy3(Debian:13) | = 7.3.23+dfsg-2 | No fix listed |
| debian/pypy3(Debian:13) | = 8.0.0+dfsg-1 | No fix listed |
| debian/pypy3(Debian:13) | = 8.0.1+dfsg-1 | No fix listed |
| debian/pypy3(Debian:14) | < 7.3.20+dfsg-2 | 7.3.20+dfsg-2 |
| debian/pypy3(Debian:14) | = 7.3.19+dfsg-2 | No fix listed |
| debian/pypy3(Debian:14) | = 7.3.20+dfsg-1 | No fix listed |
| debian/python3.13(Debian:13) | < 3.13.4-1 | 3.13.4-1 |
| Python Software Foundation CPython | < 3.9.23 | 3.9.23 |
| Python Software Foundation CPython | >= 3.10.0, < 3.10.18 | 3.10.18 |
| Python Software Foundation CPython | >= 3.11.0, < 3.11.13 | 3.11.13 |
| Python Software Foundation CPython | >= 3.12.0, < 3.12.11 | 3.12.11 |
Show 14 more
| Product | Affected versions | Fixed in |
|---|---|---|
| Python Software Foundation CPython | >= 3.13.0, < 3.13.4 | 3.13.4 |
| Python Software Foundation CPython | >= 3.14.0a1, < 3.14.0b3 | 3.14.0b3 |
| alpine/python3(Alpine:v3.19) | < 3.11.13-r0 | 3.11.13-r0 |
| alpine/python3(Alpine:v3.20) | < 3.12.11-r0 | 3.12.11-r0 |
| alpine/python3(Alpine:v3.21) | < 3.12.11-r0 | 3.12.11-r0 |
| alpine/python3(Alpine:v3.22) | < 3.12.11-r0 | 3.12.11-r0 |
| alpine/python3(Alpine:v3.23) | < 3.12.11-r0 | 3.12.11-r0 |
| alpine/python3(Alpine:v3.24) | < 3.12.11-r0 | 3.12.11-r0 |
| alpine/python3-tkinter(Alpine:v3.20) | < 3.12.11-r0 | 3.12.11-r0 |
| alpine/python3-tkinter(Alpine:v3.21) | < 3.12.11-r0 | 3.12.11-r0 |
| alpine/python3-tkinter(Alpine:v3.22) | < 3.12.11-r0 | 3.12.11-r0 |
| alpine/python3-tkinter(Alpine:v3.23) | < 3.12.11-r0 | 3.12.11-r0 |
| alpine/python3-tkinter(Alpine:v3.24) | < 3.12.11-r0 | 3.12.11-r0 |
| ubuntu/python3.12(Ubuntu:24.04) | < 3.12.3-1ubuntu0.7 | 3.12.3-1ubuntu0.7 |
References
- MSRC Security Update Guide vendor-advisory
- CBL-Mariner Releases vendor-advisory
- Debian Security Tracker CVE-2025-4330 vendor-advisory
- github.com issue-tracking
- github.com patch
- mail.python.org vendor-advisory
- github.com patch
- github.com patch
- gist.github.com mitigation
- github.com patch
- github.com patch
- github.com patch
- github.com patch
- github.com patch
- github.com patch
- security.alpinelinux.org vendor-advisory
- Ubuntu CVE tracker vendor-advisory
- USN-7583-1 vendor-advisory
- www.cve.org
- ENISA EUVD EUVD-2025-16737 third-party-advisory