Arbitrary Filesystem Write Vulnerability in Jython and Python Packages

python3 Updated 02 Oct 2025

Summary

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

CVE-2025-4517: Allows arbitrary filesystem writes outside the extraction directory during extraction with filter="data". 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 Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The Jython package is an implementation of the Python programming language that runs on the Java platform, allowing seamless integration of Java and Python code. The tarfile module in Python is used for reading and writing tar archive files. This vulnerability affects versions of Jython and Python that utilize the tarfile module to extract untrusted tar archives, particularly when using the filter parameter.

Vulnerability Detail

CVE-2025-4517 allows arbitrary filesystem writes outside the extraction directory during extraction with filter="data". This vulnerability arises when the tarfile module is used to extract untrusted tar archives with the filter parameter set to 'data' or 'tar'. Only Python versions 3.12 and later are affected, with Python 3.14 changing the default filter value to 'data', increasing the risk for users relying on this behavior. The vulnerability does not significantly affect the installation of source distributions, but caution is advised when evaluating such distributions.

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 when extracting tar archives with the tarfile module. Instead, use the default behavior without filtering, or ensure that the tar archives being extracted are from trusted sources.

Conclusion

CVE-2025-4517 presents a serious risk for users of Jython and Python packages that utilize the tarfile module for extracting untrusted tar archives. Users are encouraged to update their packages to patched versions and to exercise caution when handling tar archives.

See every vulnerability recorded for python3 →

Share this vulnerability

FAQ

CVE-2025-4517 is a vulnerability that allows arbitrary filesystem writes outside the extraction directory when using the tarfile module in Python and Jython.

Only Python versions 3.12 and later are affected by this vulnerability, with Python 3.14 changing the default filter value to 'data'.

You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected without requiring access to the code.

If immediate updates are not possible, avoid using the filter parameter when extracting tar archives and ensure that the archives are from trusted sources.

While this vulnerability does not significantly affect the installation of source distributions, caution is advised when evaluating such distributions with suspicious links.

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