CVE-2025-4330 json
Extraction filter bypass for linking outside extraction directory
published 2025-06-03 17 mo ago modified 2026-08-04 3 mo ago also BIT-libpython-2025-4330 , BIT-python-2025-4330 , BIT-python-min-2025-4330 , EUVD-2025-16737
- cvss
- 7.5
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.0%
- EPSS 1.0% chance of exploitation in 30 days, percentile 62%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- bitnami libpython 3.9.23, 3.10.18, 3.11.13, 3.12.11, 3.13.4
- bitnami python 3.9.23, 3.10.18, 3.11.13, 3.12.11, 3.13.4
- bitnami python-min 3.9.23, 3.10.18, 3.11.13, 3.12.11, 3.13.4
- Python Software Foundation CPython 3.9.23, 3.10.18, 3.11.13, 3.12.11, 3.13.4, 3.14.0b3
- pypy3 Debian 14 7.3.20+dfsg-2
- python3.13 Debian 13 3.13.4-1
debian advisories DEBIAN-CVE-2025-4330
- python3.12 Ubuntu 24.04 LTS 3.12.3-1ubuntu0.7
- python3.14 Ubuntu 25.10 3.14.0-1
ubuntu advisories UBUNTU-CVE-2025-4330
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- python3.13 hummingbird 1 3.13.14-1.4.hum1
- python3.13-idle hummingbird 1 3.13.14-1.4.hum1
- python3.13-libs hummingbird 1 3.13.14-1.4.hum1
- python3.13-test hummingbird 1 3.13.14-1.4.hum1
- python3.13-tkinter hummingbird 1 3.13.14-1.4.hum1
- python3.13-freethreading hummingbird 1 3.13.14-1.4.hum1
- python3.14 hummingbird 1 3.14.6-1.4.hum1
- python3.14-idle hummingbird 1 3.14.6-1.4.hum1
red hat advisories RHSA-2026:38090RHSA-2026:38091RHSA-2026:38017RHSA-2025:23530RHSA-2025:10602RHSA-2025:10484
- python311 Linux Micro 6.1 3.11.16-slfo.1.1_1.1
- python311-core Linux Micro 6.1 3.11.16-slfo.1.1_1.1
- python3 SLES for SAP 15 SP5, SLES for SAP 15 SP4, SLES for SAP 15 SP3 +18 more 3.6.15-150300.10.97.2
- python3-core SLES for SAP 15 SP5, SLES for SAP 15 SP4, SLES for SAP 15 SP3 +20 more 3.6.15-150300.10.97.1
- python3-documentation openSUSE Leap 15.6 3.6.15-150300.10.97.1
- python311 Linux Micro 6.1 3.11.13-slfo.1.1_1.1
- python311-core Linux Micro 6.1 3.11.13-slfo.1.1_1.1
- python3 SLE Micro 5.1 3.6.15-150000.3.182.1
suse advisories SUSE-SU-2026:4534-1SUSE-SU-2026:23743-1SUSE-SU-2026:0210-1SUSE-SU-2025:02778-1SUSE-SU-2025:20539-1SUSE-SU-2025:02427-1
- python310 openSUSE Tumbleweed 3.10.18-3.1
- python311 openSUSE Tumbleweed 3.11.13-2.1
- python312 openSUSE Tumbleweed 3.12.11-2.1
- python313 openSUSE Tumbleweed 3.13.5-2.1
- python39 openSUSE Tumbleweed 3.9.23-3.1
opensuse advisories openSUSE-SU-2025:15285-1openSUSE-SU-2025:15286-1openSUSE-SU-2025:15287-1openSUSE-SU-2025:15288-1openSUSE-SU-2025:15290-1
- python39 AlmaLinux 8 3.9.25-2.module_el8.10.0+4083+53cad1fb
- python39-py AlmaLinux 8 1.10.0-1.module_el8.6.0+2780+a40f65e1
- python39-pip AlmaLinux 8 20.2.4-9.module_el8.10.0+3765+2f9a457d
- python39-ply AlmaLinux 8 3.11-10.module_el8.6.0+2780+a40f65e1
- python39-six AlmaLinux 8 1.15.0-3.module_el8.6.0+2780+a40f65e1
- python39-cffi AlmaLinux 8 1.14.3-2.module_el8.6.0+2780+a40f65e1
- python39-cffi AlmaLinux 8 1.14.3-2.module_el8.6.0+3248+c431e88c
- python39-idle AlmaLinux 8 3.9.25-2.module_el8.10.0+4083+53cad1fb
almalinux advisories ALSA-2025:23530ALSA-2025:10189ALSA-2025:10026ALSA-2025:10031ALSA-2025:10128ALSA-2025:10136
- python3 Rocky Linux 8 3.6.8-70.el8_10.rocky.0
- numpy Rocky Linux 8 1.19.4-3.module+el8.10.0+1582+bc278001
- numpy Rocky Linux 8 1.19.4-3.module+el8.10.0+1860+afcc1c71
- scipy Rocky Linux 8 1.5.4-5.module+el8.10.0+1860+afcc1c71
- scipy Rocky Linux 8 1.5.4-5.module+el8.10.0+1582+bc278001
- Cython Rocky Linux 8 0.29.21-5.module+el8.10.0+1582+bc278001
- Cython Rocky Linux 8 0.29.21-5.module+el8.10.0+1860+afcc1c71
- pytest Rocky Linux 8 6.0.2-2.module+el8.10.0+1860+afcc1c71
rocky linux advisories RLSA-2025:10128RLSA-2025:23530RLSA-2025:10136RLSA-2025:10148RLSA-2025:10189RLSA-2025:10140
- python3 Alpine 3.19 3.11.13-r0
- python3 Alpine 3.24, Alpine 3.23, Alpine 3.22 +2 more 3.12.11-r0
- python3-tkinter Alpine 3.24, Alpine 3.23, Alpine 3.22 +2 more 3.12.11-r0
alpine advisories ALPINE-CVE-2025-4330
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- github.com/python/cpython@3612d8f commit
- github.com/python/cpython@9e0ac76 commit
- github.com/python/cpython@19de092 commit
- github.com/python/cpython@aa9eb5f commit
- github.com/python/cpython@28463db commit
- github.com/python/cpython@4633f3f commit
- github.com/python/cpython@9c1110e commit
- github.com/python/cpython@dd8f187 commit
- github.com/python/cpython#135037 pull request
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2025-4330 updated cvss 7.3
cpython: python: Extraction filter bypass for linking outside extraction directory
-
Red Hat Enterprise Linux 8 pytz, babel, numpy, scipy, Cython, PyYAML, +82 moreaffected: workaround, no fix available, no fix planned “Will not fix”
-
Red Hat Enterprise Linux AI (RHEL AI) rhelai1/bootc-amd-rhel9, rhelai1/bootc-intel-rhel9, rhelai1/bootc-nvidia-rhel9, rhelai1/bootc-azure-amd-rhel9, rhelai1/instructlab-amd-rhel9, rhelai1/bootc-aws-nvidia-rhel9, +7 moreaffected: workaround, no fix available
-
Red Hat CodeReady Linux Builder EUS (v.9.4) python3 3.9.18-3.el9_4.8, python3.11 3.11.7-1.el9_4.8, python3.12 3.12.1-4.el9_4.6, python3-idle 3.9.18-3.el9_4.8, python3-test 3.9.18-3.el9_4.8, python3-tkinter 3.9.18-3.el9_4.8, +6 morefixed: vendor fix RHSA-2025:10399
-
Red Hat Discovery 2 discovery 2.0.1-1754478727, discovery/discovery-server-rhel9 1786638573fixed: vendor fix RHSA-2026:54760
-
Red Hat Enterprise Linux AppStream (v. 8) python3.11 3.11.13-1.el8_10, python3.12 3.12.11-1.el8_10, python3-idle 3.6.8-70.el8_10, python3-test 3.6.8-70.el8_10, platform-python 3.6.8-70.el8_10, python3-tkinter 3.6.8-70.el8_10, +61 morefixed: vendor fix RHSA-2025:23530
-
Red Hat Enterprise Linux AppStream (v. 9) python3.12 3.12.9-1.el9_6.1, python3.11 3.11.11-2.el9_6.1, python3-tkinter 3.9.21-2.el9_6.1, python3.12-libs 3.12.9-1.el9_6.1, python3.11-libs 3.11.11-2.el9_6.1, python3.12-tkinter 3.12.9-1.el9_6.1, +2 morefixed: vendor fix RHSA-2025:10136
-
Red Hat Enterprise Linux AppStream (v. 10) python3-tkinter 3.12.9-2.el10_0.2, python-unversioned-command 3.12.9-2.el10_0.2fixed: vendor fix RHSA-2025:10140
-
Red Hat Enterprise Linux AppStream AUS (v.8.6) python3-idle 3.6.8-47.el8_6.8, python3-test 3.6.8-47.el8_6.8, platform-python 3.6.8-47.el8_6.8, python3-tkinter 3.6.8-47.el8_6.8 Red Hat Enterprise Linux AppStream E4S (v.8.6) python3-idle 3.6.8-47.el8_6.8, python3-test 3.6.8-47.el8_6.8, platform-python 3.6.8-47.el8_6.8, python3-tkinter 3.6.8-47.el8_6.8fixed: vendor fix RHSA-2025:10484
show 21 moreshow fewer
-
Red Hat Enterprise Linux AppStream E4S (v.8.8) python3-idle 3.6.8-51.el8_8.10, python3-test 3.6.8-51.el8_8.10, platform-python 3.6.8-51.el8_8.10, python3-tkinter 3.6.8-51.el8_8.10fixed: vendor fix RHSA-2025:10602
-
Red Hat Enterprise Linux AppStream EUS (v.9.4) python3.11 3.11.7-1.el9_4.8, python3.12 3.12.1-4.el9_4.6, python3-tkinter 3.9.18-3.el9_4.8, python3.11-libs 3.11.7-1.el9_4.8, python3.12-libs 3.12.1-4.el9_4.6, python3.11-tkinter 3.11.7-1.el9_4.8, +2 morefixed: vendor fix RHSA-2025:10399
-
Red Hat Enterprise Linux AppStream EUS EXTENSION (v.8.6) python3-idle 3.6.8-47.el8_6.8, python3-test 3.6.8-47.el8_6.8, platform-python 3.6.8-47.el8_6.8, python3-tkinter 3.6.8-47.el8_6.8fixed: vendor fix RHSA-2025:10484
-
Red Hat Enterprise Linux AppStream EUS EXTENSION (v.8.8) python3-idle 3.6.8-51.el8_8.10, python3-test 3.6.8-51.el8_8.10, platform-python 3.6.8-51.el8_8.10, python3-tkinter 3.6.8-51.el8_8.10fixed: vendor fix RHSA-2025:10602
-
Red Hat Enterprise Linux AppStream TUS (v.8.6) python3-idle 3.6.8-47.el8_6.8, python3-test 3.6.8-47.el8_6.8, platform-python 3.6.8-47.el8_6.8, python3-tkinter 3.6.8-47.el8_6.8fixed: vendor fix RHSA-2025:10484
-
Red Hat Enterprise Linux AppStream TUS (v.8.8) python3-idle 3.6.8-51.el8_8.10, python3-test 3.6.8-51.el8_8.10, platform-python 3.6.8-51.el8_8.10, python3-tkinter 3.6.8-51.el8_8.10fixed: vendor fix RHSA-2025:10602
-
Red Hat Enterprise Linux BaseOS (v. 8) python3 3.6.8-70.el8_10, python3-libs 3.6.8-70.el8_10, python3-test 3.6.8-70.el8_10, platform-python 3.6.8-70.el8_10fixed: vendor fix RHSA-2025:10128
-
Red Hat Enterprise Linux BaseOS (v. 9) python3 3.9.21-2.el9_6.1, python3.9 3.9.21-2.el9_6.1, python3-libs 3.9.21-2.el9_6.1fixed: vendor fix RHSA-2025:10136
-
Red Hat Enterprise Linux BaseOS (v. 10) python3 3.12.9-2.el10_0.2, python3.12 3.12.9-2.el10_0.2, python3-libs 3.12.9-2.el10_0.2fixed: vendor fix RHSA-2025:10140
-
Red Hat Enterprise Linux BaseOS AUS (v.8.6) python3 3.6.8-47.el8_6.8, python3-libs 3.6.8-47.el8_6.8, python3-test 3.6.8-47.el8_6.8, platform-python 3.6.8-47.el8_6.8 Red Hat Enterprise Linux BaseOS E4S (v.8.6) python3 3.6.8-47.el8_6.8, python3-libs 3.6.8-47.el8_6.8, python3-test 3.6.8-47.el8_6.8, platform-python 3.6.8-47.el8_6.8fixed: vendor fix RHSA-2025:10484
-
Red Hat Enterprise Linux BaseOS E4S (v.8.8) python3 3.6.8-51.el8_8.10, python3-libs 3.6.8-51.el8_8.10, python3-test 3.6.8-51.el8_8.10, platform-python 3.6.8-51.el8_8.10fixed: vendor fix RHSA-2025:10602
-
Red Hat Enterprise Linux BaseOS EUS (v.9.4) python3 3.9.18-3.el9_4.8, python3.9 3.9.18-3.el9_4.8, python3-libs 3.9.18-3.el9_4.8fixed: vendor fix RHSA-2025:10399
-
Red Hat Enterprise Linux BaseOS EUS EXTENSION (v.8.6) python3 3.6.8-47.el8_6.8, python3-libs 3.6.8-47.el8_6.8, python3-test 3.6.8-47.el8_6.8, platform-python 3.6.8-47.el8_6.8fixed: vendor fix RHSA-2025:10484
-
Red Hat Enterprise Linux BaseOS EUS EXTENSION (v.8.8) python3 3.6.8-51.el8_8.10, python3-libs 3.6.8-51.el8_8.10, python3-test 3.6.8-51.el8_8.10, platform-python 3.6.8-51.el8_8.10fixed: vendor fix RHSA-2025:10602
-
Red Hat Enterprise Linux BaseOS TUS (v.8.6) python3 3.6.8-47.el8_6.8, python3-libs 3.6.8-47.el8_6.8, python3-test 3.6.8-47.el8_6.8, platform-python 3.6.8-47.el8_6.8fixed: vendor fix RHSA-2025:10484
-
Red Hat Enterprise Linux BaseOS TUS (v.8.8) python3 3.6.8-51.el8_8.10, python3-libs 3.6.8-51.el8_8.10, python3-test 3.6.8-51.el8_8.10, platform-python 3.6.8-51.el8_8.10fixed: vendor fix RHSA-2025:10602
-
Red Hat Enterprise Linux CodeReady Linux Builder (v. 9) python3 3.9.21-2.el9_6.1, python3.12 3.12.9-1.el9_6.1, python3.11 3.11.11-2.el9_6.1, python3-idle 3.9.21-2.el9_6.1, python3-test 3.9.21-2.el9_6.1, python3-tkinter 3.9.21-2.el9_6.1, +6 morefixed: vendor fix RHSA-2025:10136
-
Red Hat Enterprise Linux CodeReady Linux Builder (v. 10) python3-idle 3.12.9-2.el10_0.2, python3-test 3.12.9-2.el10_0.2fixed: vendor fix RHSA-2025:10140
-
Red Hat Enterprise Linux CRB (v. 8) python3.11 3.11.13-1.el8_10, python3.12 3.12.11-1.el8_10, python3.11-idle 3.11.13-1.el8_10, python3.11-test 3.11.13-1.el8_10, python3.12-idle 3.12.11-1.el8_10, python3.12-test 3.12.11-1.el8_10, +24 morefixed: vendor fix RHSA-2025:23530
-
Red Hat Hardened Images python3.14 3.14.6-1.4.hum1, python3.12 3.12.13-3.5.hum1, python3.13 3.13.14-1.4.hum1, python3.14-idle 3.14.6-1.4.hum1, python3.14-libs 3.14.6-1.4.hum1, python3.14-test 3.14.6-1.4.hum1, +15 morefixed: vendor fix RHSA-2026:38017
-
Red Hat Discovery 2 discovery 2.0.1-1754485705, discovery/discovery-ui-rhel9 1786634825not affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
cisa ICSA-26-043-06 updated cvss 7.5
Siemens SINEC OS
-
Siemens RUGGEDCOM RST2428P (6GK6242-6PA00) < 3.3affected: fixed in V3.3 support.industry.siemens.com
-
Siemens SCALANCE XC-300/XR-300/XC-400/XR-500WG/XR-500 family < 3.3affected: fixed in V3.3
-
Siemens SCALANCE XCH328 (6GK5328-4TS01-2EC2) < 3.3 Siemens SCALANCE XCM324 (6GK5324-8TS01-2AC2) < 3.3 Siemens SCALANCE XCM328 (6GK5328-4TS01-2AC2) < 3.3 Siemens SCALANCE XCM332 (6GK5332-0GA01-2AC2) < 3.3 Siemens SCALANCE XRH334 (24 V DC, 8xFO, CC) (6GK5334-2TS01-2ER3) < 3.3 Siemens SCALANCE XRM334 (2x230 V AC, 8xFO) (6GK5334-2TS01-4AR3) < 3.3affected: fixed in V3.3 support.industry.siemens.com
+8 more productsfewer
Siemens SCALANCE XRM334 (2x230 V AC, 12xFO) (6GK5334-3TS01-4AR3) < 3.3 Siemens SCALANCE XRM334 (2x230V AC, 2x10G, 24xSFP, 8xSFP+) (6GK5334-5TS01-4AR3) < 3.3 Siemens SCALANCE XRM334 (24 V DC, 8xFO) (6GK5334-2TS01-2AR3) < 3.3 Siemens SCALANCE XRM334 (24 V DC, 12xFO) (6GK5334-3TS01-2AR3) < 3.3 Siemens SCALANCE XRM334 (24V DC, 2x10G, 24xSFP, 8xSFP+) (6GK5334-5TS01-2AR3) < 3.3 Siemens SCALANCE XRM334 (230 V AC, 8xFO) (6GK5334-2TS01-3AR3) < 3.3 Siemens SCALANCE XRM334 (230 V AC, 12xFO) (6GK5334-3TS01-3AR3) < 3.3 Siemens SCALANCE XRM334 (230V AC, 2x10G, 24xSFP, 8xSFP+) (6GK5334-5TS01-3AR3) < 3.3
Facts from CISA's republication of the vendor's own advisory (CSAF); the linked advisory is the authoritative source. CISA notification · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- yes
- Technical impact
- partial
- Assessed
- 17 mo ago
Exploit prediction
0.97% chance of exploitation in the next 30 days, higher than 62% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| OSV | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| bitnami | libpython | <3.9.23 >=3.10.0, <3.10.18 >=3.11.0, <3.11.13 >=3.12.0, <3.12.11 >=3.13.0, <3.13.4 |
3.9.23 3.10.18 3.11.13 3.12.11 3.13.4 |
| bitnami | python | <3.9.23 >=3.10.0, <3.10.18 >=3.11.0, <3.11.13 >=3.12.0, <3.12.11 >=3.13.0, <3.13.4 |
3.9.23 3.10.18 3.11.13 3.12.11 3.13.4 |
| bitnami | python-min | <3.9.23 >=3.10.0, <3.10.18 >=3.11.0, <3.11.13 >=3.12.0, <3.12.11 >=3.13.0, <3.13.4 |
3.9.23 3.10.18 3.11.13 3.12.11 3.13.4 |
Affected products
- Python Software Foundation CPython
Classification
- Weakness
-
- CWE-22 Improper Limitation of a Pathname to a Restricted Directory
References
-
github.com
/python/cpython/pull/135037
patch, web
-
github.com
/python/cpython/commit/3612d8f51741b11f36f8fb0494d79086bac9390a
patch, web
-
github.com
/python/cpython/commit/9e0ac76d96cf80b49055f6d6b9a6763fb9215c2a
patch, web
-
github.com
/python/cpython/commit/19de092debb3d7e832e5672cc2f7b788d35951da
patch, web
-
github.com
/python/cpython/commit/aa9eb5f757ceff461e6e996f12c89e5d9b583b01
patch, web
-
github.com
/python/cpython/commit/28463dba112af719df1e8b0391c46787ad756dd9
patch, web
-
github.com
/python/cpython/commit/4633f3f497b1ff70e4a35b6fe2c907cbe2d4cb2e
patch, web
-
github.com
/python/cpython/commit/9c1110ef6652687d7c55f590f909720eddde965a
patch, web
-
github.com
/python/cpython/commit/dd8f187d0746da151e0025c51680979ac5b4cfb1
patch, web
-
mail.python.org
/archives/list/security-announce@python.org/thread/MAXIJJCUUMCL7ATZNDVEGGHUMQMUUKLG/
vendor-advisory, web
-
github.com
/python/cpython/issues/135034
issue-tracking, web
-
gist.github.com
/sethmlarson/52398e33eff261329a0180ac1d54f42f
mitigation, web
-
nvd.nist.gov
/vuln/detail/CVE-2025-4330
web
Sources
- CVE List CVE-2025-4330
- NVD CVE-2025-4330
- OSV BIT-libpython-2025-4330
- OSV BIT-python-2025-4330
- OSV BIT-python-min-2025-4330
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.