Skip to content
Fencer Intel
high 7.5

CVE-2025-4138 json

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

published last yr. modified 3mo ago also BIT-libpython-2025-4138 , BIT-python-2025-4138 , BIT-python-min-2025-4138 , EUVD-2025-16724

cvss
7.5
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
1.5%
EPSS 1.5% chance of exploitation in 30 days, percentile 74%
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-4138

  • 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-4138

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

  • numpy RHEL 8 1.19.4-3.module+el8.9.0+19644+d68f775d
  • scipy RHEL 8 1.5.4-5.module+el8.9.0+19644+d68f775d
  • Cython RHEL 8 0.29.21-5.module+el8.9.0+19644+d68f775d
  • pytest RHEL 8 6.0.2-2.module+el8.9.0+19644+d68f775d
  • PyYAML RHEL 8 5.4.1-1.module+el8.9.0+19644+d68f775d
  • mod_wsgi RHEL 8 4.7.1-7.module+el8.10.0+23075+0aa18782.1
  • pybind11 RHEL 8 2.7.1-1.module+el8.9.0+19644+d68f775d
  • python39 RHEL 8 3.9.25-2.module+el8.10.0+23718+1842ae33

red hat advisories RHSA-2025:23530RHSA-2025:10602RHSA-2025:10484RHSA-2025:10399RHSA-2025:10189RHSA-2025:10148

  • 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
  • python3-core SLE Micro 5.1 3.6.15-150000.3.182.1
  • python311 Linux Micro 6.0 3.11.13-1.1

suse advisories SUSE-SU-2026:0210-1SUSE-SU-2025:02778-1SUSE-SU-2025:20539-1SUSE-SU-2025:02427-1SUSE-SU-2025:02297-1SUSE-SU-2025:20492-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-4138

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • python3 CBL-Mariner 2.0 3.9.19-14

azure linux advisories AZL-62322

Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT

Is CVE-2025-4138 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.

Check with Fencer

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-4138 updated cvss 7.5

cpython: python: Bypassing extraction filter to create symlinks to arbitrary targets outside extraction directory

  • Red Hat cert-manager operator for Red Hat OpenShift 1.16 cert-manager v1.16.5-1760515757
    fixed: vendor fix RHSA-2025:18219
  • Red Hat Middleware Containers for OpenShift rhpam-7/rhpam-operator-bundle 7.13.5-25, rhpam-7/rhpam-rhel8-operator 7.13.5-2.1752065733, rhpam-7/rhpam-kieserver-rhel8 7.13.5-4.1752065731, rhpam-7/rhpam-controller-rhel8 7.13.5-4.1752065732, rhpam-7/rhpam-dashbuilder-rhel8 7.13.5-3.1752065737, rhpam-7/rhpam-smartrouter-rhel8 7.13.5-4.1752065755, +3 more
    fixed: vendor fix RHSA-2025:11386
  • 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 more
    fixed: vendor fix RHSA-2025:10399
  • Red Hat Discovery 2 discovery 2.0.1-1754478727
    fixed: vendor fix RHSA-2025:13267
  • 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 more
    fixed: 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 more
    fixed: 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.2
    fixed: 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.8
    fixed: vendor fix RHSA-2025:10484
show 21 more
  • 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.10
    fixed: 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 more
    fixed: 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.8
    fixed: 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.10
    fixed: 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.8
    fixed: 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.10
    fixed: 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_10
    fixed: 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.1
    fixed: 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.2
    fixed: 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.8
    fixed: 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.10
    fixed: 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.8
    fixed: 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.8
    fixed: 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.10
    fixed: 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.8
    fixed: 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.10
    fixed: 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 more
    fixed: 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.2
    fixed: 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 more
    fixed: vendor fix RHSA-2025:23530
  • Red Hat OpenShift Serverless 1.36 openshift-serverless-1/logic-rhel8-operator 1.36.0-18, openshift-serverless-1/logic-operator-bundle 1.36.0-12, openshift-serverless-1/logic-swf-devmode-rhel8 1.36.0-7, openshift-serverless-1/logic-swf-builder-rhel8 1.36.0-11, openshift-serverless-1/logic-db-migrator-tool-rhel8 1.36.0-11, openshift-serverless-1/logic-management-console-rhel8 1.36.0-9, +5 more
    fixed: vendor fix RHSA-2026:0934
  • Red Hat cert-manager operator for Red Hat OpenShift 1.16 cert-manager v1.16.5-1760509690 Red Hat Discovery 2 discovery 2.0.1-1754485705 Red Hat Enterprise Linux 8 scipy, python36, python-nose, python-wheel, python3-bson, python3-nose, +19 more Red Hat OpenShift Container Platform 4 openshift/ose-rhel-coreos-8, openshift/ose-rhel-coreos-9
    not 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.3
    affected: fixed in V3.3 support.industry.siemens.com
  • Siemens SCALANCE XC-300/XR-300/XC-400/XR-500WG/XR-500 family < 3.3
    affected: 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.3
    +8 more products
    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
    affected: fixed in V3.3 support.industry.siemens.com

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
last yr.

Exploit prediction

1.49% chance of exploitation in the next 30 days, higher than 74% of all scored CVEs (FIRST EPSS, 2026-11-09).

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:H/I:N/A:N
OSV 3.1 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/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

Sources

Fencer Intel 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.