Extraction filter bypass for linking outside extraction directory
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- None · High · None
- Fix status
- Partial Red Hat: 28 fixed, 2 without a fix
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and Red Hat.
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Python Software Foundation | CPython | before 3.9.23; 3.10.0 to before 3.10.18; 3.11.0 to before 3.11.13; 3.12.0 to before 3.12.11; 3.13.0 to before 3.13.4; 3.14.0a1 to before 3.14.0b3 | 3.9.23, 3.10.18, 3.11.13, 3.12.11, 3.13.4, 3.14.0b3 | Patch available | CNA |
- CPython VendorPython Software Foundation Affected before 3.9.23; 3.10.0 to before 3.10.18; 3.11.0 to before 3.11.13; 3.12.0 to before 3.12.11; 3.13.0 to before 3.13.4; 3.14.0a1 to before 3.14.0b3 Fixed in 3.9.23, 3.10.18, 3.11.13, 3.12.11, 3.13.4, 3.14.0b3 Patch available CNA
CPE names Threatist (inferred) · 1
Inferred from how NVD named this product before; not given by a source.
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:python:python:*:*:*:*:*:*:*:* | — | — | python-pillow |
- cpe:2.3:a:python:python:*:*:*:*:*:*:*:* Versions — — ·python-pillow
Remediation
- Fix · CNA CPython (Python Software Foundation) Fixed in 3.9.23, 3.10.18, 3.11.13, 3.12.11, 3.13.4, 3.14.0b3
Red Hat 18 advisories
- RHSA-2026:54760 Released 2026-08-13 · Red Hat rating ImportantA Subscription Management tool for finding and reporting Red Hat product usage
- Red Hat Discovery 2 registry.redhat.io/discovery/discovery-server-rhel9, registry.redhat.io/discovery/discovery-ui-rhel9
- RHSA-2026:38091 Released 2026-07-10 · Red Hat rating ImportantRed Hat Hardened Images RPMs Security Update
- Red Hat Hardened Images python3.14-3.14.6-1.4.hum1@aarch64, python3.14-3.14.6-1.4.hum1@src, python3.14-3.14.6-1.4.hum1@x86_64 +26
- RHSA-2026:38090 Released 2026-07-10 · Red Hat rating ImportantRed Hat Hardened Images RPMs Security Update
- Red Hat Hardened Images python3.13-3.13.14-1.4.hum1@aarch64, python3.13-3.13.14-1.4.hum1@src, python3.13-3.13.14-1.4.hum1@x86_64 +16
Show 15 more Red Hat advisories
- RHSA-2026:38017 Released 2026-07-10 · Red Hat rating ImportantRed Hat Hardened Images RPMs Security Update
- Red Hat Hardened Images python3.12-3.12.13-3.5.hum1@aarch64, python3.12-3.12.13-3.5.hum1@src, python3.12-3.12.13-3.5.hum1@x86_64 +12
- RHSA-2025:23530 Released 2025-12-18 · Red Hat rating Importantpython39:3.9 security update
- Red Hat Enterprise Linux AppStream (v. 8) PyYAML-5.4.1-1.module+el8.9.0+19644+d68f775d.src::python39:3.9, mod_wsgi-4.7.1-7.module+el8.10.0+23075+0aa18782.1.src::python39:3.9, numpy-1.19.4-3.module+el8.9.0+19644+d68f775d.src::python39:3.9 +47
- Red Hat Enterprise Linux CRB (v. 8) Cython-0.29.21-5.module+el8.9.0+19644+d68f775d.src::python39-devel:3.9, pybind11-2.7.1-1.module+el8.9.0+19644+d68f775d.src::python39-devel:3.9, pytest-6.0.2-2.module+el8.9.0+19644+d68f775d.src::python39-devel:3.9 +33
- RHSA-2025:13267 Released 2025-08-06 · Red Hat rating ImportantA Subscription Management tool for finding and reporting Red Hat product usage
- Red Hat Discovery 2 registry.redhat.io/discovery/discovery-server-rhel9
- RHSA-2025:10602 Released 2025-07-08 · Red Hat rating Importantpython3 security update
- Red Hat Enterprise Linux AppStream E4S (v.8.8) platform-python-3.6.8-51.el8_8.10, platform-python-debug-3.6.8-51.el8_8.10, platform-python-devel-3.6.8-51.el8_8.10 +3
- Red Hat Enterprise Linux AppStream EUS EXTENSION (v.8.8) platform-python-3.6.8-51.el8_8.10, platform-python-debug-3.6.8-51.el8_8.10, platform-python-devel-3.6.8-51.el8_8.10 +3
- Red Hat Enterprise Linux AppStream TUS (v.8.8) platform-python-3.6.8-51.el8_8.10, platform-python-debug-3.6.8-51.el8_8.10, platform-python-devel-3.6.8-51.el8_8.10 +3
- Red Hat Enterprise Linux BaseOS E4S (v.8.8) platform-python-3.6.8-51.el8_8.10, python3-3.6.8-51.el8_8.10, python3-libs-3.6.8-51.el8_8.10 +1
- Red Hat Enterprise Linux BaseOS EUS EXTENSION (v.8.8) platform-python-3.6.8-51.el8_8.10, python3-3.6.8-51.el8_8.10, python3-libs-3.6.8-51.el8_8.10 +1
- Red Hat Enterprise Linux BaseOS TUS (v.8.8) platform-python-3.6.8-51.el8_8.10, python3-3.6.8-51.el8_8.10, python3-libs-3.6.8-51.el8_8.10 +1
- RHSA-2025:10484 Released 2025-07-07 · Red Hat rating Importantpython3 security update
- Red Hat Enterprise Linux AppStream AUS (v.8.6) platform-python-3.6.8-47.el8_6.8, platform-python-debug-3.6.8-47.el8_6.8, platform-python-devel-3.6.8-47.el8_6.8 +3
- Red Hat Enterprise Linux AppStream E4S (v.8.6) platform-python-3.6.8-47.el8_6.8, platform-python-debug-3.6.8-47.el8_6.8, platform-python-devel-3.6.8-47.el8_6.8 +3
- Red Hat Enterprise Linux AppStream EUS EXTENSION (v.8.6) platform-python-3.6.8-47.el8_6.8, platform-python-debug-3.6.8-47.el8_6.8, platform-python-devel-3.6.8-47.el8_6.8 +3
- Red Hat Enterprise Linux AppStream TUS (v.8.6) platform-python-3.6.8-47.el8_6.8, platform-python-debug-3.6.8-47.el8_6.8, platform-python-devel-3.6.8-47.el8_6.8 +3
- Red Hat Enterprise Linux BaseOS AUS (v.8.6) platform-python-3.6.8-47.el8_6.8, python3-3.6.8-47.el8_6.8, python3-libs-3.6.8-47.el8_6.8 +1
- Red Hat Enterprise Linux BaseOS E4S (v.8.6) platform-python-3.6.8-47.el8_6.8, python3-3.6.8-47.el8_6.8, python3-libs-3.6.8-47.el8_6.8 +1
- Red Hat Enterprise Linux BaseOS EUS EXTENSION (v.8.6) platform-python-3.6.8-47.el8_6.8, python3-3.6.8-47.el8_6.8, python3-libs-3.6.8-47.el8_6.8 +1
- Red Hat Enterprise Linux BaseOS TUS (v.8.6) platform-python-3.6.8-47.el8_6.8, python3-3.6.8-47.el8_6.8, python3-libs-3.6.8-47.el8_6.8 +1
- RHSA-2025:10399 Released 2025-07-07 · Red Hat rating Importantpython3.9 security update
- Red Hat CodeReady Linux Builder EUS (v.9.4) python3-3.9.18-3.el9_4.8, python3-debug-3.9.18-3.el9_4.8, python3-idle-3.9.18-3.el9_4.8 +2
- Red Hat Enterprise Linux AppStream EUS (v.9.4) python-unversioned-command-3.9.18-3.el9_4.8, python3-devel-3.9.18-3.el9_4.8, python3-tkinter-3.9.18-3.el9_4.8
- Red Hat Enterprise Linux BaseOS EUS (v.9.4) python3-3.9.18-3.el9_4.8, python3-libs-3.9.18-3.el9_4.8, python3.9-3.9.18-3.el9_4.8
- RHSA-2025:10189 Released 2025-07-02 · Red Hat rating Importantpython3.12 security update
- Red Hat Enterprise Linux AppStream (v. 9) python3.12-3.12.9-1.el9_6.1, python3.12-devel-3.12.9-1.el9_6.1, python3.12-libs-3.12.9-1.el9_6.1 +1
- Red Hat Enterprise Linux CodeReady Linux Builder (v. 9) python3.12-3.12.9-1.el9_6.1, python3.12-debug-3.12.9-1.el9_6.1, python3.12-idle-3.12.9-1.el9_6.1 +2
- RHSA-2025:10148 Released 2025-07-01 · Red Hat rating Importantpython3.11 security update
- Red Hat Enterprise Linux AppStream (v. 9) python3.11-3.11.11-2.el9_6.1, python3.11-devel-3.11.11-2.el9_6.1, python3.11-libs-3.11.11-2.el9_6.1 +1
- Red Hat Enterprise Linux CodeReady Linux Builder (v. 9) python3.11-3.11.11-2.el9_6.1, python3.11-debug-3.11.11-2.el9_6.1, python3.11-idle-3.11.11-2.el9_6.1 +2
- RHSA-2025:10140 Released 2025-07-01 · Red Hat rating Importantpython3.12 security update
- Red Hat Enterprise Linux AppStream (v. 10) python-unversioned-command-3.12.9-2.el10_0.2, python3-devel-3.12.9-2.el10_0.2, python3-tkinter-3.12.9-2.el10_0.2
- Red Hat Enterprise Linux BaseOS (v. 10) python3-3.12.9-2.el10_0.2, python3-libs-3.12.9-2.el10_0.2, python3.12-3.12.9-2.el10_0.2
- Red Hat Enterprise Linux CodeReady Linux Builder (v. 10) python3-debug-3.12.9-2.el10_0.2, python3-idle-3.12.9-2.el10_0.2, python3-test-3.12.9-2.el10_0.2
- RHSA-2025:10136 Released 2025-07-01 · Red Hat rating Importantpython3.9 security update
- Red Hat Enterprise Linux AppStream (v. 9) python-unversioned-command-3.9.21-2.el9_6.1, python3-devel-3.9.21-2.el9_6.1, python3-tkinter-3.9.21-2.el9_6.1
- Red Hat Enterprise Linux BaseOS (v. 9) python3-3.9.21-2.el9_6.1, python3-libs-3.9.21-2.el9_6.1, python3.9-3.9.21-2.el9_6.1
- Red Hat Enterprise Linux CodeReady Linux Builder (v. 9) python3-3.9.21-2.el9_6.1, python3-debug-3.9.21-2.el9_6.1, python3-idle-3.9.21-2.el9_6.1 +2
- RHSA-2025:10128 Released 2025-07-01 · Red Hat rating Importantpython3 security update
- Red Hat Enterprise Linux AppStream (v. 8) platform-python-3.6.8-70.el8_10, platform-python-debug-3.6.8-70.el8_10, platform-python-devel-3.6.8-70.el8_10 +3
- Red Hat Enterprise Linux BaseOS (v. 8) platform-python-3.6.8-70.el8_10, python3-3.6.8-70.el8_10, python3-libs-3.6.8-70.el8_10 +1
- RHSA-2025:10031 Released 2025-07-01 · Red Hat rating Importantpython3.12 security update
- Red Hat Enterprise Linux AppStream (v. 8) python3.12-3.12.11-1.el8_10, python3.12-devel-3.12.11-1.el8_10, python3.12-libs-3.12.11-1.el8_10 +2
- Red Hat Enterprise Linux CRB (v. 8) python3.12-3.12.11-1.el8_10, python3.12-debug-3.12.11-1.el8_10, python3.12-idle-3.12.11-1.el8_10 +2
- RHSA-2025:10026 Released 2025-07-01 · Red Hat rating Importantpython3.11 security update
- Red Hat Enterprise Linux AppStream (v. 8) python3.11-3.11.13-1.el8_10, python3.11-devel-3.11.13-1.el8_10, python3.11-libs-3.11.13-1.el8_10 +2
- Red Hat Enterprise Linux CRB (v. 8) python3.11-3.11.13-1.el8_10, python3.11-debug-3.11.13-1.el8_10, python3.11-idle-3.11.13-1.el8_10 +2
- RHSA-2025:10028 Released 2025-07-01 · Red Hat rating Importantpython3.12 security update
- Red Hat CodeReady Linux Builder EUS (v.9.4) python3.12-3.12.1-4.el9_4.6, python3.12-debug-3.12.1-4.el9_4.6, python3.12-idle-3.12.1-4.el9_4.6 +2
- Red Hat Enterprise Linux AppStream EUS (v.9.4) python3.12-3.12.1-4.el9_4.6, python3.12-devel-3.12.1-4.el9_4.6, python3.12-libs-3.12.1-4.el9_4.6 +1
- RHSA-2025:9918 Released 2025-06-30 · Red Hat rating Importantpython3.11 security update
- Red Hat CodeReady Linux Builder EUS (v.9.4) python3.11-3.11.7-1.el9_4.8, python3.11-debug-3.11.7-1.el9_4.8, python3.11-idle-3.11.7-1.el9_4.8 +2
- Red Hat Enterprise Linux AppStream EUS (v.9.4) python3.11-3.11.7-1.el9_4.8, python3.11-devel-3.11.7-1.el9_4.8, python3.11-libs-3.11.7-1.el9_4.8 +1
Fixed in the same release
Records fixed by the same vendor advisory or release, as the CNA lists them.
- Advisory ·
Python Software Foundation CPython — mail.python.org/archives/list/[email protected]/…
5 records Highest priority Priority MEDIUM 5 MEDIUM
Other records, highest priority first
- TI-2024-11791 Bypass extraction filter to modify file metadata outside extraction directoryPriority MEDIUM 63
- TI-2025-04033 Arbitrary writes via tarfile realpath overflowPriority MEDIUM 51
- TI-2025-03675 Bypassing extraction filter to create symlinks to arbitrary targets outside extraction directoryPriority MEDIUM 42
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Enterprise Linux 8 | Affected | No fix yet |
| Red Hat Enterprise Linux AI (RHEL AI) | Affected | No fix yet |
| Red Hat CodeReady Linux Builder EUS (v.9.4) | Fixed | RHSA-2025:10028, RHSA-2025:10399, RHSA-2025:9918 |
| Red Hat Discovery 2 | Fixed | RHSA-2025:13267, RHSA-2026:54760 |
| Red Hat Enterprise Linux AppStream (v. 10) | Fixed | RHSA-2025:10140 |
| Red Hat Enterprise Linux AppStream (v. 8) | Fixed | RHSA-2025:10026, RHSA-2025:10031, RHSA-2025:10128, RHSA-2025:23530 |
| Red Hat Enterprise Linux AppStream (v. 9) | Fixed | RHSA-2025:10136, RHSA-2025:10148, RHSA-2025:10189 |
| Red Hat Enterprise Linux AppStream AUS (v.8.6) | Fixed | RHSA-2025:10484 |
| Red Hat Enterprise Linux AppStream E4S (v.8.6) | Fixed | RHSA-2025:10484 |
| Red Hat Enterprise Linux AppStream E4S (v.8.8) | Fixed | RHSA-2025:10602 |
| Red Hat Enterprise Linux AppStream EUS (v.9.4) | Fixed | RHSA-2025:10028, RHSA-2025:10399, RHSA-2025:9918 |
| Red Hat Enterprise Linux AppStream EUS EXTENSION (v.8.6) | Fixed | RHSA-2025:10484 |
| Red Hat Enterprise Linux AppStream EUS EXTENSION (v.8.8) | Fixed | RHSA-2025:10602 |
| Red Hat Enterprise Linux AppStream TUS (v.8.6) | Fixed | RHSA-2025:10484 |
| Red Hat Enterprise Linux AppStream TUS (v.8.8) | Fixed | RHSA-2025:10602 |
| Red Hat Enterprise Linux BaseOS (v. 10) | Fixed | RHSA-2025:10140 |
| Red Hat Enterprise Linux BaseOS (v. 8) | Fixed | RHSA-2025:10128 |
| Red Hat Enterprise Linux BaseOS (v. 9) | Fixed | RHSA-2025:10136 |
| Red Hat Enterprise Linux BaseOS AUS (v.8.6) | Fixed | RHSA-2025:10484 |
| Red Hat Enterprise Linux BaseOS E4S (v.8.6) | Fixed | RHSA-2025:10484 |
| Red Hat Enterprise Linux BaseOS E4S (v.8.8) | Fixed | RHSA-2025:10602 |
| Red Hat Enterprise Linux BaseOS EUS (v.9.4) | Fixed | RHSA-2025:10399 |
| Red Hat Enterprise Linux BaseOS EUS EXTENSION (v.8.6) | Fixed | RHSA-2025:10484 |
| Red Hat Enterprise Linux BaseOS EUS EXTENSION (v.8.8) | Fixed | RHSA-2025:10602 |
| Red Hat Enterprise Linux BaseOS TUS (v.8.6) | Fixed | RHSA-2025:10484 |
| Red Hat Enterprise Linux BaseOS TUS (v.8.8) | Fixed | RHSA-2025:10602 |
| Red Hat Enterprise Linux CRB (v. 8) | Fixed | RHSA-2025:10026, RHSA-2025:10031, RHSA-2025:23530 |
| Red Hat Enterprise Linux CodeReady Linux Builder (v. 10) | Fixed | RHSA-2025:10140 |
| Red Hat Enterprise Linux CodeReady Linux Builder (v. 9) | Fixed | RHSA-2025:10136, RHSA-2025:10148, RHSA-2025:10189 |
| Red Hat Hardened Images | Fixed | RHSA-2026:38017, RHSA-2026:38090, RHSA-2026:38091 |
Not affected: 1 product
- Red Hat Discovery 2
Timeline
- 2026-10-02 Threatist record created from CVE-2025-4330
- 2026-10-03 Alias added: GHSA-68pj-xrp5-vccj
- 2026-10-16 Affected versions changed · Red Hat
References
Patch 9
- https://github.com/python/cpython/pull/135037
- https://github.com/python/cpython/commit/3612d8f51741b11f36f8fb0494d79086bac9390a
- https://github.com/python/cpython/commit/9e0ac76d96cf80b49055f6d6b9a6763fb9215c2a
- https://github.com/python/cpython/commit/19de092debb3d7e832e5672cc2f7b788d35951da
- https://github.com/python/cpython/commit/aa9eb5f757ceff461e6e996f12c89e5d9b583b01
- https://github.com/python/cpython/commit/28463dba112af719df1e8b0391c46787ad756dd9
- https://github.com/python/cpython/commit/4633f3f497b1ff70e4a35b6fe2c907cbe2d4cb2e
- https://github.com/python/cpython/commit/9c1110ef6652687d7c55f590f909720eddde965a
- https://github.com/python/cpython/commit/dd8f187d0746da151e0025c51680979ac5b4cfb1
Advisory 1
More Python Software Foundation vulnerabilities
- TI-2024-07037 Quadratic complexity parsing cookies with backslashes CVSS 3.1HIGH 7.5
- TI-2024-11791 Bypass extraction filter to modify file metadata outside extraction directory CVSS 3.1MEDIUM 5.3
- TI-2024-00411 Quoted zip-bomb protection for zipfile CVSS 3.1MEDIUM 6.2
- TI-2026-13296 `HTTPPasswordMgr` can send saved HTTPS credentials via HTTP because of incorrect scheme matching CVSS 4.0MEDIUM 6.0
- TI-2024-06422 Email header injection due to unquoted newlines CVSS 3.1MEDIUM 5.5
- TI-2026-04606 Possible to hijack modules in current working directory CVSS 4.0MEDIUM 5.6
Sources
- CVE-2025-4330 · CVE Program
- CVE-2025-4330 · NVD
- FIRST EPSS
- GHSA-68pj-xrp5-vccj · GitHub Advisory Database · CC BY 4.0
- CVE-2025-4330 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences