Read the docs
TI-2025-03675 Aliases CVE-2025-4138GHSA-4g4g-fqw4-prp2

Bypassing extraction filter to create symlinks to arbitrary targets outside extraction directory

Priority MEDIUM 42CWE-22Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
Information disclosure
Confidentiality · integrity · availability
High · None · None
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and Red Hat. Impact type from CWE-22 and the CVSS impact.

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

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.01487 74th percentileScored 2026-11-07
Fix Fixed CPython (Python Software Foundation): 3.9.23, 3.10.18, 3.11.13 +3Red Hat: 17 advisories

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

VendorProductAffected versionsFixed inStatusSource
Python Software FoundationCPythonbefore 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.0b33.9.23, 3.10.18, 3.11.13, 3.12.11, 3.13.4, 3.14.0b3Patch availableCNA
  • 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.

CPEVersionsRoleVendor
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 17 advisories

  • RHSA-2026:0934 Released 2026-01-22 · Red Hat rating Important
    Release of OpenShift Serverless Logic 1.36.0 security update & enhancements
    • 8Base-Openshift-Serverless-1.36 openshift-serverless-1/logic-data-index-ephemeral-rhel8, openshift-serverless-1/logic-data-index-postgresql-rhel8, openshift-serverless-1/logic-db-migrator-tool-rhel8 +8
  • RHSA-2025:23530 Released 2025-12-18 · Red Hat rating Important
    python39: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:18219 Released 2025-10-16 · Red Hat rating Important
    cert-manager Operator for Red Hat OpenShift 1.16.0
    • cert-manager operator for Red Hat OpenShift 1.16 registry.redhat.io/cert-manager/jetstack-cert-manager-rhel9
Show 14 more Red Hat advisories
  • RHSA-2025:13267 Released 2025-08-06 · Red Hat rating Important
    A Subscription Management tool for finding and reporting Red Hat product usage
    • Red Hat Discovery 2 registry.redhat.io/discovery/discovery-server-rhel9
  • RHSA-2025:11386 Released 2025-07-17 · Red Hat rating Important
    updated RHEL-8 based Middleware Containers container images
    • Middleware Containers for OpenShift rhpam-7/rhpam-businesscentral-monitoring-rhel8, rhpam-7/rhpam-businesscentral-rhel8, rhpam-7/rhpam-controller-rhel8 +6
  • RHSA-2025:10602 Released 2025-07-08 · Red Hat rating Important
    python3 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 Important
    python3 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 Important
    python3.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 Important
    python3.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 Important
    python3.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 Important
    python3.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 Important
    python3.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 Important
    python3 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 Important
    python3.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 Important
    python3.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 Important
    python3.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 Important
    python3.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-03859 Extraction filter bypass for linking outside extraction directoryPriority MEDIUM 41

Vendor assessments

Red Hat

Red Hat rating: Important. Red Hat's page for this CVE →

ProductStatusPlan or fix
8Base-Openshift-Serverless-1.36Fixed RHSA-2026:0934
Middleware Containers for OpenShiftFixed RHSA-2025:11386
Red Hat CodeReady Linux Builder EUS (v.9.4)Fixed RHSA-2025:10028, RHSA-2025:10399, RHSA-2025:9918
Red Hat Discovery 2Fixed RHSA-2025:13267
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
cert-manager operator for Red Hat OpenShift 1.16Fixed RHSA-2025:18219
Not affected: 4 products
  • Red Hat Discovery 2
  • Red Hat Enterprise Linux 8
  • Red Hat OpenShift Container Platform 4
  • cert-manager operator for Red Hat OpenShift 1.16

Timeline

  1. 2026-10-02 Threatist record created from CVE-2025-4138
  2. 2026-10-03 Alias added: GHSA-4g4g-fqw4-prp2

References

  • 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
See all 83 →

Sources