LiveActive security incident?Get immediate response
CVE Record

CVE-2025-4330: Extraction filter bypass for linking outside extraction directory

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.

HighCVSS 7.5Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

A flaw in Python’s archive extraction protections can let a malicious tar archive create links pointing outside the intended destination and alter some file metadata. This could allow unauthorized file changes under the extracting process’s permissions. Risk is concentrated in systems that automatically accept and unpack untrusted archives.

Executive priority

Treat as a high-priority integrity issue where customers, partners, or automated feeds can supply tar archives. Prioritize internet-facing upload workflows and privileged extraction services. Accelerate remediation if extraction can reach application files, configuration, deployment assets, or shared storage; otherwise schedule prompt patching after confirming actual tarfile use.

Technical view

CVE-2025-4330 is a CWE-22 path-control flaw in CPython’s tarfile module. The "data" and "tar" extraction filters can be bypassed through link targets outside the extraction directory. Affected usage includes TarFile.extractall() or TarFile.extract() with those filters, plus Python 3.14 users relying on the new default "data" filter.

Likely exposure

Exposure requires affected CPython code to extract attacker-controlled or otherwise untrusted tar archives. Upload processors, conversion services, build systems, and automation pipelines warrant review. Systems that never extract untrusted archives through tarfile are less likely exposed. The supplied affected-version data is incomplete, so confirm exact versions through vendor guidance.

Exploitation context

The CVSS 3.1 score is 7.5, reflecting remotely supplied input, low complexity, no privileges, no user interaction, and high integrity impact. The source bundle marks this CVE as absent from KEV and provides no evidence of active exploitation. Network reachability depends on how an application obtains archives; tarfile itself is not necessarily network-facing.

Researcher notes

The reported behavior concerns extraction-filter enforcement for link destinations and some metadata changes. The source bundle lists CPython branches beginning with 3.10 through 3.14 alpha, but does not clearly express complete affected ranges or fixed release numbers. Review branch-specific commits and the Python security advisory before making precise version determinations. Source-distribution installation already permits build-time code execution, limiting this CVE’s incremental impact there.

Mitigation direction

  • Apply the vendor-provided CPython fix for the installed supported branch.
  • Pause or isolate extraction of untrusted tar archives until affected runtimes are remediated.
  • Follow the vendor-linked mitigation guidance where immediate patching is unavailable.
  • Run extraction with minimal filesystem permissions and segregate destination storage.

Validation and detection

  • Inventory CPython versions in applications, containers, build workers, and automation hosts.
  • Find TarFile.extractall() and TarFile.extract() calls, including wrappers and indirect library usage.
  • Identify calls using "data", "tar", or Python 3.14 default filtering with untrusted archives.
  • Confirm installed packages contain the applicable vendor patch using trusted package provenance.
  • Regression-test that archive links cannot affect paths outside an isolated extraction directory.
Prepared
Confidence
high
Sources
6

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · medium confidence lookup

CWE-22: File access and web shell behavior lookup

File traversal and upload weaknesses can lead teams to review file, web shell, execution, and collection telemetry. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
description · low confidence lookup

Execution behavior lookup

The CVE wording references code or command execution, so execution technique review may help defensive triage. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2025-4330 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
High
CVSS
7.5 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
3Timeline events
1ADP providers
13Source links

SSVC decision data

CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: yesTechnical Impact: partial

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
7.5CVSS 3.1HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N3.93.6PSF

Vulnerability scoring details

Base CVSS 3.1 score

7.5High
CVSS 3.1 vector shape for CVE-2025-4330Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone

Vulnerability timeline

Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.

  1. CVE reservedCVE Program

    The CVE ID was reserved by the assigning CNA.

  2. CVE publishedCVE Program

    The CVE record was published.

  3. CVE updatedCVE Program

    The CVE record metadata indicates this as the latest update time.

ADP provider summaries

CISA-ADPCISA ADP Vulnrichment
other:ssvc
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
Python Software FoundationCPython0, 3.10.0, 3.11.0, 3.12.0, 3.13.0, 3.14.0a1unaffected
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.