Vulnerabilities in pkg:pypi/future

PACKAGE
Advisory Identifier: GHSA-xqrq-4mgf-ff32
Advisory Summary

CVE-2025-50817 is a HIGH python-future module arbitrary code execution vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Withdrawn Advisory libraries in the PyPI ecosystem. The issue involves python-future module arbitrary code execution via unintended import of test.py. Remediation is available in the latest vendor maintenance releases.

2 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/future

2 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/future. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-xqrq-4mgf-ff32 CVE-2025-50817 HIGH Withdrawn Advisory: Python-Future Module Arbitrary Code Execution via Unintended Import of test.py
GHSA-v3c5-jqr6-7qm8 CVE-2022-40899 HIGH Python Charmers Future denial of service vulnerability

CVE-2025-50817 at a Glance

CVE Identifier CVE-2025-50817
GHSA Identifier GHSA-xqrq-4mgf-ff32
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Withdrawn Advisory
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix CVE-2025-50817

To remediate this vulnerability, upgrade all affected Withdrawn Advisory dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

future fixed: Latest secure release
pip install future>=Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show future

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2025-50817, inspect your installed packages using pip:

pip show future

Analyze the terminal output to locate any version of Withdrawn Advisory in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: The pip show future command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Withdrawn Advisory, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Withdrawn Advisory This advisory has been withdrawn because it describes a documented feature of Python’s import system in the handling of sys.path. For more information, see https://github.com/PythonCharmers/python-future/issues/650. ## Original Description 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. NOTE: Multiple third parties have disputed this issue and stated that it is not a security flaw in python-future and is a documented feature of Python’s import system in the handling of sys.path.

CVE-2025-50817 Affected Withdrawn Advisory Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
future
PyPI
≥ 0.14.0

References

Frequently Asked Questions

What is CVE-2025-50817?
CVE-2025-50817 is a security vulnerability in Withdrawn Advisory involving Python-Future Module Arbitrary Code Execution via Unintended Import of test.py under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Withdrawn Advisory versions are affected?
Affected versions include releases prior to current release patches across affected packages: future.
What version fixes CVE-2025-50817?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is future affected?
Yes, future is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What CWE is associated with CVE-2025-50817?
CVE-2025-50817 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check PyPI dependencies for CVE-2025-50817?
Run the dependency tree command: 'pip show future'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-xqrq-4mgf-ff32",
  "modified" : "2025-10-06T20:33:43Z",
  "published" : "2025-08-14T18:31:30Z",
  "withdrawn" : "2025-10-06T20:33:43Z",
  "aliases" : [ "CVE-2025-50817" ],
  "summary" : "Withdrawn Advisory: Python-Future Module Arbitrary Code Execution via Unintended Import of test.py",
  "details" : "## Withdrawn Advisory\nThis advisory has been withdrawn because it describes a documented feature of Python’s import system in the handling of sys.path. For more information, see https://github.com/PythonCharmers/python-future/issues/650.\n\n## Original Description\n\nA 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. NOTE: Multiple third parties have disputed this issue and stated that it is not a security flaw in python-future and is a documented feature of Python’s import system in the handling of sys.path.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "future"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.14.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-50817"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/PythonCharmers/python-future/issues/650#issuecomment-3251016598"
  }, {
    "type" : "WEB",
    "url" : "https://gist.github.com/fried/d2108a4932f3a22712dfc04598b5b8ce"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/PythonCharmers/python-future"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/PythonCharmers/python-future/blob/v1.0.0/src/future/standard_library/__init__.py#L491"
  }, {
    "type" : "WEB",
    "url" : "https://medium.com/@abcd_68700/cve-2025-50817-python-future-module-arbitrary-code-execution-via-unintended-import-of-test-py-f0818ea93cf4"
  }, {
    "type" : "WEB",
    "url" : "https://pypi.org/project/future"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-08-14T20:36:51Z",
    "nvd_published_at" : "2025-08-14T17:15:40Z"
  }
}