
CVE catalog
CVE-2025-4138
Python vulnerabilities
- Severity
- High · CVSS 8.2
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N - Published
- Source
- [NVD] · [CVE record]
- EPSS
- 1.39% · Oct 25, 2026
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.
Vulnerable and fixed packages
Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.
| Distribution | Package | Release | Version | Status |
|---|---|---|---|---|
| Debian | pypy3 | sid | 8.0.1+dfsg-1 | fixed |
| Debian | pypy3 | forky | 8.0.1+dfsg-1 | fixed |
| Debian | pypy3 | trixie | 7.3.19+dfsg-2 | vulnerable |
| Debian | pypy3 | bookworm | 7.3.11+dfsg-2+deb12u3 | vulnerable |
| Debian | jython | sid | 2.7.3+repack1-1 | not affected |
| Debian | jython | forky | 2.7.3+repack1-1 | not affected |
| Debian | jython | trixie | 2.7.3+repack1-1 | not affected |
| Debian | jython | bookworm | 2.7.3+repack1-1 | not affected |
| Debian | python3.11 | bookworm | 3.11.2-6+deb12u8 | not affected |
| Debian | python3.11 | bookworm-security | 3.11.2-6+deb12u9 | not affected |
| Ubuntu | pypy3 | noble | Not reported | vulnerable |
| Ubuntu | python3.11 | noble | Not reported | not affected |
| Ubuntu | python3.12 | noble | 3.12.3-1ubuntu0.7 | fixed |
| Ubuntu | idle-python3.12 | noble | 3.12.3-1ubuntu0.7 | fixed |
| Ubuntu | libpython3.12-dev | noble | 3.12.3-1ubuntu0.7 | fixed |
| Ubuntu | libpython3.12-minimal | noble | 3.12.3-1ubuntu0.7 | fixed |
| Ubuntu | libpython3.12-stdlib | noble | 3.12.3-1ubuntu0.7 | fixed |
| Ubuntu | libpython3.12-testsuite | noble | 3.12.3-1ubuntu0.7 | fixed |
| Ubuntu | libpython3.12t64 | noble | 3.12.3-1ubuntu0.7 | fixed |
| Ubuntu | python3.12-dev | noble | 3.12.3-1ubuntu0.7 | fixed |
| Ubuntu | python3.12-doc | noble | 3.12.3-1ubuntu0.7 | fixed |
| Ubuntu | python3.12-examples | noble | 3.12.3-1ubuntu0.7 | fixed |
| Ubuntu | python3.12-full | noble | 3.12.3-1ubuntu0.7 | fixed |
| Ubuntu | python3.12-minimal | noble | 3.12.3-1ubuntu0.7 | fixed |
| Ubuntu | python3.12-nopie | noble | 3.12.3-1ubuntu0.7 | fixed |
| Ubuntu | python3.12-venv | noble | 3.12.3-1ubuntu0.7 | fixed |
| Alpine | python3 | 3.19 | 3.11.13-r0 | fixed |
| Alpine | python3 | 3.20 | 3.12.11-r0 | fixed |
| Alpine | python3 | 3.21 | 3.12.11-r0 | fixed |
| Alpine | python3 | 3.22 | 3.12.11-r0 | fixed |
| Alpine | python3 | 3.23 | 3.12.11-r0 | fixed |
| Alpine | python3 | 3.24 | 3.12.11-r0 | fixed |
| Alpine | python3-tkinter | 3.23 | 3.12.11-r0 | fixed |
| Alpine | python3-tkinter | 3.24 | 3.12.11-r0 | fixed |
| Ubuntu | python3.12 | 24.04 | 3.12.0-1 | vulnerable |
| Ubuntu | python3.12 | 24.04 | 3.12.0-5 | vulnerable |
| Ubuntu | python3.12 | 24.04 | 3.12.0-6 | vulnerable |
| Ubuntu | python3.12 | 24.04 | 3.12.0-7 | vulnerable |
| Ubuntu | python3.12 | 24.04 | 3.12.1-2 | vulnerable |
| Ubuntu | python3.12 | 24.04 | 3.12.2-1 | vulnerable |
| Ubuntu | python3.12 | 24.04 | 3.12.2-4build3 | vulnerable |
| Ubuntu | python3.12 | 24.04 | 3.12.2-4build4 | vulnerable |
| Ubuntu | python3.12 | 24.04 | 3.12.2-5ubuntu3 | vulnerable |
| Ubuntu | python3.12 | 24.04 | 3.12.3-1 | vulnerable |
| Ubuntu | python3.12 | 24.04 | 3.12.3-1ubuntu0.1 | vulnerable |
| Ubuntu | python3.12 | 24.04 | 3.12.3-1ubuntu0.2 | vulnerable |
| Ubuntu | python3.12 | 24.04 | 3.12.3-1ubuntu0.3 | vulnerable |
| Ubuntu | python3.12 | 24.04 | 3.12.3-1ubuntu0.4 | vulnerable |
| Ubuntu | python3.12 | 24.04 | 3.12.3-1ubuntu0.5 | vulnerable |
| Ubuntu | python3.12 | 24.04 | 3.12.3-1ubuntu0.6 | vulnerable |
| Ubuntu | python3.12 | 24.04 | 3.12.3-1ubuntu0.7 | fixed |
| Ubuntu | python3.14 | 25.10 | 3.14.0~a7-0ubuntu1 | vulnerable |
| Ubuntu | python3.14 | 25.10 | 3.14.0~b1-1 | vulnerable |
| Ubuntu | python3.14 | 25.10 | 3.14.0~b3-1 | vulnerable |
| Ubuntu | python3.14 | 25.10 | 3.14.0~rc1-1 | vulnerable |
| Ubuntu | python3.14 | 25.10 | 3.14.0~rc2-1 | vulnerable |
| Ubuntu | python3.14 | 25.10 | 3.14.0~rc3-1 | vulnerable |
| Ubuntu | python3.14 | 25.10 | 3.14.0-1 | fixed |
Fixed-version evidence
| Distribution | Package | Type | Release | Fixed version | Urgency | Origin | Bugs |
|---|---|---|---|---|---|---|---|
| Debian | pypy3 | source | sid | 7.3.20+dfsg-2 | not yet assigned | Not reported | Not reported |
| Debian | pypy3 | source | forky | 7.3.20+dfsg-2 | not yet assigned | Not reported | Not reported |
| Debian | pypy3 | source | trixie | (unfixed) | not yet assigned | Not reported | Not reported |
| Debian | pypy3 | source | bookworm | (unfixed) | not yet assigned | Not reported | Not reported |
| Debian | jython | source | sid | Not affected | unimportant | Not reported | Not reported |
| Debian | jython | source | forky | Not affected | unimportant | Not reported | Not reported |
| Debian | jython | source | trixie | Not affected | unimportant | Not reported | Not reported |
| Debian | jython | source | bookworm | Not affected | unimportant | Not reported | Not reported |
| Debian | python3.11 | source | bookworm | Not affected | unimportant | Not reported | Not reported |
| Ubuntu | python3.12 | deb | noble | 3.12.3-1ubuntu0.7 | Not reported | Not reported | Not reported |
| Ubuntu | idle-python3.12 | deb | noble | 3.12.3-1ubuntu0.7 | Not reported | Not reported | Not reported |
| Ubuntu | libpython3.12-dev | deb | noble | 3.12.3-1ubuntu0.7 | Not reported | Not reported | Not reported |
| Ubuntu | libpython3.12-minimal | deb | noble | 3.12.3-1ubuntu0.7 | Not reported | Not reported | Not reported |
| Ubuntu | libpython3.12-stdlib | deb | noble | 3.12.3-1ubuntu0.7 | Not reported | Not reported | Not reported |
| Ubuntu | libpython3.12-testsuite | deb | noble | 3.12.3-1ubuntu0.7 | Not reported | Not reported | Not reported |
| Ubuntu | libpython3.12t64 | deb | noble | 3.12.3-1ubuntu0.7 | Not reported | Not reported | Not reported |
| Ubuntu | python3.12-dev | deb | noble | 3.12.3-1ubuntu0.7 | Not reported | Not reported | Not reported |
| Ubuntu | python3.12-doc | deb | noble | 3.12.3-1ubuntu0.7 | Not reported | Not reported | Not reported |
| Ubuntu | python3.12-examples | deb | noble | 3.12.3-1ubuntu0.7 | Not reported | Not reported | Not reported |
| Ubuntu | python3.12-full | deb | noble | 3.12.3-1ubuntu0.7 | Not reported | Not reported | Not reported |
| Ubuntu | python3.12-minimal | deb | noble | 3.12.3-1ubuntu0.7 | Not reported | Not reported | Not reported |
| Ubuntu | python3.12-nopie | deb | noble | 3.12.3-1ubuntu0.7 | Not reported | Not reported | Not reported |
| Ubuntu | python3.12-venv | deb | noble | 3.12.3-1ubuntu0.7 | Not reported | Not reported | Not reported |
| Alpine | python3 | apk | 3.19 | 3.11.13-r0 | Not reported | ALPINE-CVE-2025-4138 | Not reported |
| Alpine | python3 | apk | 3.20 | 3.12.11-r0 | Not reported | ALPINE-CVE-2025-4138 | Not reported |
| Alpine | python3 | apk | 3.21 | 3.12.11-r0 | Not reported | ALPINE-CVE-2025-4138 | Not reported |
| Alpine | python3 | apk | 3.22 | 3.12.11-r0 | Not reported | ALPINE-CVE-2025-4138 | Not reported |
| Alpine | python3 | apk | 3.23 | 3.12.11-r0 | Not reported | ALPINE-CVE-2025-4138 | Not reported |
| Alpine | python3 | apk | 3.24 | 3.12.11-r0 | Not reported | ALPINE-CVE-2025-4138 | Not reported |
| Alpine | python3-tkinter | apk | 3.23 | 3.12.11-r0 | Not reported | ALPINE-CVE-2025-4138 | Not reported |
| Alpine | python3-tkinter | apk | 3.24 | 3.12.11-r0 | Not reported | ALPINE-CVE-2025-4138 | Not reported |
| Ubuntu | python3.12 | deb | 24.04 | 3.12.3-1ubuntu0.7 | Not reported | UBUNTU-CVE-2025-4138 | Not reported |
| Ubuntu | python3.14 | deb | 25.10 | 3.14.0-1 | Not reported | UBUNTU-CVE-2025-4138 | Not reported |
Notes
[trixie] pypy3: Minor issue [bookworm] pypy3: Minor issue
OpenFactory catalog packages
[Debian 12 (Bookworm)]
- [pypy3]Affected
Details (2)
7.3.11+dfsg-2+deb12u3· amd64 · bookwormAffected
usn · pypy3 · debian · bookworm; usn · pypy3 · debian · 12
7.3.11+dfsg-2+deb12u3· arm64 · bookwormAffected
usn · pypy3 · debian · bookworm; usn · pypy3 · debian · 12
- [pypy3-dev]Affected
Source package: [pypy3]
Details (2)
7.3.11+dfsg-2+deb12u3· all · bookwormAffected
usn · pypy3 · debian · bookworm; usn · pypy3 · debian · 12
7.3.11+dfsg-2+deb12u3· all · bookwormAffected
usn · pypy3 · debian · bookworm; usn · pypy3 · debian · 12
- [pypy3-doc]Affected
Source package: [pypy3]
Details (2)
7.3.11+dfsg-2+deb12u3· all · bookwormAffected
usn · pypy3 · debian · bookworm; usn · pypy3 · debian · 12
7.3.11+dfsg-2+deb12u3· all · bookwormAffected
usn · pypy3 · debian · bookworm; usn · pypy3 · debian · 12
- [pypy3-lib]Affected
Source package: [pypy3]
Details (2)
7.3.11+dfsg-2+deb12u3· amd64 · bookwormAffected
usn · pypy3 · debian · bookworm; usn · pypy3 · debian · 12
7.3.11+dfsg-2+deb12u3· arm64 · bookwormAffected
usn · pypy3 · debian · bookworm; usn · pypy3 · debian · 12
- [pypy3-lib-testsuite]Affected
Source package: [pypy3]
Details (2)
7.3.11+dfsg-2+deb12u3· all · bookwormAffected
usn · pypy3 · debian · bookworm; usn · pypy3 · debian · 12
7.3.11+dfsg-2+deb12u3· all · bookwormAffected
usn · pypy3 · debian · bookworm; usn · pypy3 · debian · 12
- [pypy3-tk]Affected
Source package: [pypy3]
Details (2)
7.3.11+dfsg-2+deb12u3· amd64 · bookwormAffected
usn · pypy3 · debian · bookworm; usn · pypy3 · debian · 12
7.3.11+dfsg-2+deb12u3· arm64 · bookwormAffected
usn · pypy3 · debian · bookworm; usn · pypy3 · debian · 12
- [pypy3-venv]Affected
Source package: [pypy3]
Details (2)
7.3.11+dfsg-2+deb12u3· all · bookwormAffected
usn · pypy3 · debian · bookworm; usn · pypy3 · debian · 12
7.3.11+dfsg-2+deb12u3· all · bookwormAffected
usn · pypy3 · debian · bookworm; usn · pypy3 · debian · 12
- [idle-python3.11]Not affected
Source package: [python3.11]
Details (4)
3.11.2-6+deb12u8· all · bookwormNot affected
usn · python3.11 · debian · bookworm
3.11.2-6+deb12u8· all · bookwormNot affected
usn · python3.11 · debian · bookworm
3.11.2-6+deb12u3· all · bookworm-securityNot affected
usn · python3.11 · debian · bookworm
3.11.2-6+deb12u3· all · bookworm-securityNot affected
usn · python3.11 · debian · bookworm
- [jython]Not affected
Details (2)
2.7.3+repack1-1· all · bookwormNot affected
usn · jython · debian · bookworm
2.7.3+repack1-1· all · bookwormNot affected
usn · jython · debian · bookworm
- [jython-doc]Not affected
Source package: [jython]
Details (2)
2.7.3+repack1-1· all · bookwormNot affected
usn · jython · debian · bookworm
2.7.3+repack1-1· all · bookwormNot affected
usn · jython · debian · bookworm
- [libpython3.11]Not affected
Source package: [python3.11]
Details (4)
3.11.2-6+deb12u8· amd64 · bookwormNot affected
usn · python3.11 · debian · bookworm
3.11.2-6+deb12u8· arm64 · bookwormNot affected
usn · python3.11 · debian · bookworm
3.11.2-6+deb12u3· amd64 · bookworm-securityNot affected
usn · python3.11 · debian · bookworm
3.11.2-6+deb12u3· arm64 · bookworm-securityNot affected
usn · python3.11 · debian · bookworm
- [libpython3.11-dbg]Not affected
Source package: [python3.11]
Details (4)
3.11.2-6+deb12u8· amd64 · bookwormNot affected
usn · python3.11 · debian · bookworm
3.11.2-6+deb12u8· arm64 · bookwormNot affected
usn · python3.11 · debian · bookworm
3.11.2-6+deb12u3· amd64 · bookworm-securityNot affected
usn · python3.11 · debian · bookworm
3.11.2-6+deb12u3· arm64 · bookworm-securityNot affected
usn · python3.11 · debian · bookworm
- [libpython3.11-dev]Not affected
Source package: [python3.11]
Details (4)
3.11.2-6+deb12u8· amd64 · bookwormNot affected
usn · python3.11 · debian · bookworm
3.11.2-6+deb12u8· arm64 · bookwormNot affected
usn · python3.11 · debian · bookworm
3.11.2-6+deb12u3· amd64 · bookworm-securityNot affected
usn · python3.11 · debian · bookworm
3.11.2-6+deb12u3· arm64 · bookworm-securityNot affected
usn · python3.11 · debian · bookworm
[Debian 13 (Trixie)]
- [pypy3]Affected
Details (2)
7.3.19+dfsg-2· amd64 · trixieAffected
usn · pypy3 · debian · 13
7.3.19+dfsg-2· arm64 · trixieAffected
usn · pypy3 · debian · 13
- [pypy3-dev]Affected
Source package: [pypy3]
Details (2)
7.3.19+dfsg-2· all · trixieAffected
usn · pypy3 · debian · 13
7.3.19+dfsg-2· all · trixieAffected
usn · pypy3 · debian · 13
- [pypy3-doc]Affected
Source package: [pypy3]
Details (2)
7.3.19+dfsg-2· all · trixieAffected
usn · pypy3 · debian · 13
7.3.19+dfsg-2· all · trixieAffected
usn · pypy3 · debian · 13
- [pypy3-lib]Affected
Source package: [pypy3]
Details (2)
7.3.19+dfsg-2· amd64 · trixieAffected
usn · pypy3 · debian · 13
7.3.19+dfsg-2· arm64 · trixieAffected
usn · pypy3 · debian · 13
- [pypy3-lib-testsuite]Affected
Source package: [pypy3]
Details (2)
7.3.19+dfsg-2· all · trixieAffected
usn · pypy3 · debian · 13
7.3.19+dfsg-2· all · trixieAffected
usn · pypy3 · debian · 13
- [pypy3-tk]Affected
Source package: [pypy3]
Details (2)
7.3.19+dfsg-2· amd64 · trixieAffected
usn · pypy3 · debian · 13
7.3.19+dfsg-2· arm64 · trixieAffected
usn · pypy3 · debian · 13
- [pypy3-venv]Affected
Source package: [pypy3]
Details (2)
7.3.19+dfsg-2· all · trixieAffected
usn · pypy3 · debian · 13
7.3.19+dfsg-2· all · trixieAffected
usn · pypy3 · debian · 13
Observed:
References
- [https://cert-portal.siemens.com/productcert/csaf/ssa-089022.json]
- [https://ftp.suse.com/pub/projects/security/csaf/rhsa-2025_10026.json]
- [https://osv.dev/vulnerability/ALPINE-CVE-2025-4138]
- [https://osv.dev/vulnerability/DEBIAN-CVE-2025-4138]
- [https://osv.dev/vulnerability/UBUNTU-CVE-2025-4138]
- [https://security-tracker.debian.org/tracker/CVE-2025-4138]
- [https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-4138.json]
- [https://ubuntu.com/security/notices/USN-7583-1]
- [https://wid.cert-bund.de/.well-known/csaf/white/2025/wid-sec-w-2025-1318.json]
[CERT-Bund public advisories] · [CISA cybersecurity advisories] · [Debian Security Tracker] · [FIRST EPSS] · [OSV Package Vulnerability Database] · [Red Hat security advisories and VEX] · [SUSE security advisories and VEX] · [Ubuntu Security Notices (USN)]