Skip to main content
No exploitation reportedFix available

CVE-2025-4330

Extraction filter bypass for linking outside extraction directory

No exploitation reported by the sources we read.

  • Published2025-06-03
  • Fixed in3.13.4 · 3.12.11 · 3.11.13 · 3.10.18 · 3.9.23
  • WeaknessCWE-22

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

Description

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.

Timeline

dates in UTC
  1. 2025-06-0313:15CVE publishedNVD

Versions per branch

OSV
python
BranchAffectedFixed in
3.13≥ 3.13.0, < 3.13.43.13.4
3.12≥ 3.12.0, < 3.12.113.12.11
3.11≥ 3.11.0, < 3.11.133.11.13
3.10≥ 3.10.0, < 3.10.183.10.18
3.9< 3.9.233.9.23
libpython
BranchAffectedFixed in
3.13≥ 3.13.0, < 3.13.43.13.4
3.12≥ 3.12.0, < 3.12.113.12.11
3.11≥ 3.11.0, < 3.11.133.11.13
3.10≥ 3.10.0, < 3.10.183.10.18
3.9< 3.9.233.9.23
python-min
BranchAffectedFixed in
3.13≥ 3.13.0, < 3.13.43.13.4
3.12≥ 3.12.0, < 3.12.113.12.11
3.11≥ 3.11.0, < 3.11.133.11.13
3.10≥ 3.10.0, < 3.10.183.10.18
3.9< 3.9.233.9.23

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Products declared by the CNA1 product

As PSF, the CNA that assigned this CVE, declared them in the CVE record; versions as written.

  • Python Software Foundation CPythonother versions: not affected

    https://github.com/python/cpython

    Affected
    • < 3.9.23fixed in 3.9.23python
    • ≥ 3.10.0, < 3.10.18fixed in 3.10.18python
    • ≥ 3.11.0, < 3.11.13fixed in 3.11.13python
    • ≥ 3.12.0, < 3.12.11fixed in 3.12.11python
    • ≥ 3.13.0, < 3.13.4fixed in 3.13.4python
    • ≥ 3.14.0a1, < 3.14.0b3fixed in 3.14.0b3python

Source: the CNA record (CVE Program), © The MITRE Corporation,CVE terms of useCVE recordupdated 2026-07-31

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • cassandraCleanStartall versions · fixed in 5.0.6-r2and 1 other package
  • cassandra-fipsCleanStartall versions · fixed in 4.0.19-r3
  • cassandra-fipsCleanStartall versions · fixed in 4.1.10-r2
  • CythonRocky Linux:8all versions · fixed in 0:0.29.21-5.module+el8.10.0+1582+bc278001
  • CythonRocky Linux:8all versions · fixed in 0:0.29.21-5.module+el8.10.0+1860+afcc1c71
  • CythonRed Hat:enterprise_linux:8::crball versions · fixed in 0:0.29.21-5.module+el8.9.0+19644+d68f775dand 3 other packages
  • golang-github-lusitaniae-apache_exporterSUSE:Multi Linux Manager Tools SLE-15all versions · fixed in 1.0.10-150002.3.12.1
  • golang-github-lusitaniae-apache_exporterSUSE:Multi Linux Manager Tools SLE-12all versions · fixed in 1.0.10-120002.3.12.1

435 more package ranges on OSV.dev

Vendor advisories

  • CVE-2025-4330 Red Hat Product Security1,083 products fixed · 84 known affected

    cpython: python: Extraction filter bypass for linking outside extraction directory

    Cython.src (python38:3.8) as a component of Red Hat Enterprise Linux 8 · PyYAML.src (python38:3.8) as a component of Red Hat Enterprise Linux 8 · babel.src (python38:3.8) as a component of Red Hat Enterprise Linux 8 · +81 more

  • RHSA-2026:54760 Red Hat Product Security2 products fixed

    Red Hat Security Advisory: A Subscription Management tool for finding and reporting Red Hat product usage

  • RHSA-2026:38091 Red Hat Product Security29 products fixed

    Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update

  • RHSA-2026:38090 Red Hat Product Security19 products fixed

    Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update

  • RHSA-2026:38017 Red Hat Product Security15 products fixed

    Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update

  • ICSA-26-043-06 CISA16 known affected

    Siemens SINEC OS

    RUGGEDCOM RST2428P (6GK6242-6PA00) · SCALANCE XC-300/XR-300/XC-400/XR-500WG/XR-500 family · SCALANCE XCH328 (6GK5328-4TS01-2EC2) · +13 more

15 more advisories

Full record on NVD

Fix

  1. Update python to 3.13.4 · 3.12.11 · 3.11.13 · 3.10.18 · 3.9.23
  2. Vendor fix Red Hat Product Security RHSA-2026:54760 · 2 productsThe containers required to run Discovery can be installed through discovery-installer RPM. See the official documentation for more details.
  3. Vendor fix Red Hat Product Security RHSA-2026:38091 · 29 productsFor details on how to apply this update, which includes the changes described in this advisory, refer to: https://images.redhat.com/
  4. Vendor fix CISA ICSA-26-043-06 · 14 productsUpdate to V3.3 or later version
  5. Vendor fix CISA ICSA-26-043-06 · 1 productSee Section Additional Information.
  6. Vendor fix Siemens ProductCERT SSA-089022 · 14 productsUpdate to V3.3 or later version
  7. Vendor fix Siemens ProductCERT SSA-089022 · 1 productSee Section Additional Information.

Detection

Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

Identifiers

Technical details

CVSS v3 vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Published
2025-06-03
Last modified
2026-07-31
NVD status
Deferred
GitHub advisory
GHSA-68pj-xrp5-vccj

Frequently asked questions

What is CVE-2025-4330?

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.

Is CVE-2025-4330 actively exploited?

Active exploitation of CVE-2025-4330 has not been confirmed. Its EPSS score was 1.4% on 2026-11-25, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2025-4330?

CVE-2025-4330 has a CVSS v3 base score of 7.5 (High severity), with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N.

Running Python? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website checks · 250 API requests/month

Sources for this record