Description
In the Tarfile.extract() function, the filter parameter is not passed properly when extracting hardlinks. An affected system that extracts content from untrusted tar files could end up writing files with an unexpected uid/gid despite the user passing filter='data' to the extract() function.
Published: 2026-06-30
Score: 2 Low
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Tarfile.extract() does not fully honor the filter parameter when extracting hardlinks, allowing a crafted tar archive to result in files written with arbitrary UID/GID values. Even when callers specify filter='data', the extraction process still uses the ownership information embedded in the archive. This breach of file ownership integrity can enable an attacker to create files owned by any user or group, potentially leading to privilege escalation or manipulation of protected resources.

Affected Systems

Python Software Foundation CPython, any environment that imports the tarfile module and invokes the extract() method on untrusted tar archives. No specific CPython release numbers are cited in the advisory, so all supported CPython versions that use the affected code path are potentially vulnerable until the official patch is released.

Risk and Exploitability

The CVSS score of 2 indicates a low severity assessment. EPSS data is not available, and the vulnerability is not listed in the CISA KEV catalog, suggesting it has not been actively exploited in the wild. The attack vector is likely local: an adversary needs to supply a malicious tar file to an application that performs extraction. No network-facing exposure is described, so the risk is confined to environments that process untrusted tar content. Nevertheless, because the flaw allows unauthorized file ownership changes, it can undermine isolation boundaries in multi‑tenant or privileged services.

Generated by OpenCVE AI on June 30, 2026 at 16:20 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade to the latest CPython release that contains the fix for tarfile.extract() hardlink handling.
  • When extracting untrusted tar archives, avoid using extract() on files that contain hardlinks; instead, use safer extraction routines or manually validate file ownership after extraction.
  • Implement a post‑extraction audit that verifies the UID/GID of created files matches the expected values (e.g., the current process user) and reject or correct any deviations.

Generated by OpenCVE AI on June 30, 2026 at 16:20 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 30 Jun 2026 16:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Tue, 30 Jun 2026 16:00:00 +0000


Tue, 30 Jun 2026 15:00:00 +0000

Type Values Removed Values Added
Description In the Tarfile.extract() function, the filter parameter is not passed properly when extracting hardlinks. An affected system that extracts content from untrusted tar files could end up writing files with an unexpected uid/gid despite the user passing filter='data' to the extract() function.
Title Tarfile.extract() doesn't fully respect filter parameter
Weaknesses CWE-281
References
Metrics cvssV4_0

{'score': 2, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: PSF

Published:

Updated: 2026-06-30T15:28:30.201Z

Reserved: 2026-03-17T19:25:46.527Z

Link: CVE-2026-4360

cve-icon Vulnrichment

Updated: 2026-06-30T15:28:27.269Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-06-30T16:30:16Z

Weaknesses
  • CWE-281

    Improper Preservation of Permissions