Symlink Target Vulnerability in Jython and Python Packages

python3 Updated 02 Oct 2025

Summary

03/06/2025
N/A
Yes i
Unrated
Not published

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. Affects python3 across 9 version ranges.

< 3.11.13-r0 < 9c1110ef6652687d7c55f590f909720eddde965a < 9e0ac76d96cf80b49055f6d6b9a6763fb9215c2a < 19de092debb3d7e832e5672cc2f7b788d35951da < 3612d8f51741b11f36f8fb0494d79086bac9390a < 4633f3f497b1ff70e4a35b6fe2c907cbe2d4cb2e < 28463dba112af719df1e8b0391c46787ad756dd9 < aa9eb5f757ceff461e6e996f12c89e5d9b583b01 < dd8f187d0746da151e0025c51680979ac5b4cfb1

Fixed in 3.11.13-r0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Jython is an implementation of the Python programming language designed to run on the Java platform. It allows seamless integration of Java and Python code. The tarfile module in Python is used for reading and writing tar archive files. This vulnerability affects the tarfile module's extraction filters, which can be exploited to manipulate file metadata and symlink targets during the extraction of untrusted tar archives.

Vulnerability Detail

The vulnerability (CVE-2025-4330) allows the extraction filter in the tarfile module to be bypassed, enabling symlink targets to point outside the intended destination directory. This can lead to unauthorized access to sensitive files or modification of file metadata. The issue arises when using TarFile.extractall() or TarFile.extract() with the filter parameter set to 'data' or 'tar'. Only Python versions 3.12 and later are affected, with a notable change in Python 3.14 where the default filter value changed to 'data'. This vulnerability does not significantly impact the installation of source distributions, but caution is advised when handling untrusted archives.

How To Fix

Minimum fixed version

3.11.13-r0

This is the first release that contains the fix.

sudo apk add --upgrade python3

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, avoid using the filter parameter with TarFile.extractall() or TarFile.extract() when extracting untrusted tar archives. Instead, consider extracting archives in a controlled environment where symlink manipulation is restricted.

Conclusion

The CVE-2025-4330 vulnerability poses a significant risk to users of the tarfile module in Python and Jython. It is crucial to update affected packages and exercise caution when handling untrusted tar archives. Utilizing tools like Vulert can help monitor and manage vulnerabilities effectively.

See every vulnerability recorded for python3 →

Share this vulnerability

FAQ

CVE-2025-4330 is a vulnerability in the tarfile module of Python that allows symlink targets to be manipulated, potentially leading to unauthorized file access.

Only Python versions 3.12 and later are affected by this vulnerability, with specific changes in behavior starting from Python 3.14.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected without requiring any signup.

If immediate updates are not possible, avoid using the tarfile extraction methods with untrusted archives as a temporary workaround.

While this vulnerability does not significantly affect the installation of source distributions, caution is advised when evaluating and installing them.

Related vulnerabilities

Recent vulnerabilities recorded for python3.

How To Fix

Minimum fixed version

3.11.13-r0

This is the first release that contains the fix.

sudo apk add --upgrade python3

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback