CVE-2025-50817: Python-Future Module Arbitrary Code Execution via Unintended Import of test.py

future Updated 14 Dec 2025

Summary

14/08/2025
No i
High
7.3

CVE-2025-50817: Python-Future Module Arbitrary Code Execution via Unintended Import of test.py. Affects future versions >= 0.14.0. No fix is published. How to fix ↓

Also tracked for

The same CVE-2025-50817 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

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

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The Python-Future package is a compatibility layer that allows developers to write code that is compatible with both Python 2 and Python 3. It provides a unified interface for various built-in functions and modules, making it easier to write cross-version code. However, a critical vulnerability has been identified in version 1.0.0 that exposes users to potential security risks due to its file import behavior.

Vulnerability Detail

A vulnerability in the Python-Future 1.0.0 module allows for arbitrary code execution via the unintended import of a file named test.py. When the module is loaded, it automatically imports test.py if present in the same directory or in the sys.path. This behavior can be exploited by an attacker who has the ability to write files to the server, allowing the execution of arbitrary code. The vulnerability is classified under CWE-22, indicating a path traversal issue that can lead to unauthorized file access.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, avoid placing any files named test.py in the same directory as your application or in any directory included in the sys.path. This will prevent the unintended import of the malicious file.

Conclusion

The vulnerability CVE-2025-50817 in the Python-Future module poses a significant risk due to its ability to allow arbitrary code execution through unintended file imports. Users are advised to update their packages promptly and implement workarounds to mitigate risks until a full update can be applied.

See every vulnerability recorded for future →

Share this vulnerability

FAQ

CVE-2025-50817 is a security vulnerability in the Python-Future module that allows for arbitrary code execution through the unintended import of a file named test.py.

You can check if your application is affected by using Vulert, which monitors and alerts for open-source vulnerabilities. Visit Vulert Scanner to use the Vulert playground without signup.

If you cannot update the package immediately, ensure that no test.py files are present in your application directories to mitigate the risk of exploitation.

Yes, a patched version of the Python-Future package is available. You can update to the latest version using the command: pip install --upgrade future.

The potential consequences include arbitrary code execution on the server, which could lead to data breaches, unauthorized access, and other security incidents.

Related vulnerabilities

Recent vulnerabilities recorded for future.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. 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