Command InjectionWeakness · CWE-77

CVE-2025-50817

MEDIUM · 5.4 CVSS v3.1 Published 2025-08-14
Mitigation only
No fix yet — a mitigation exists. There is no fixed release. A documented workaround reduces exposure in the meantime.
See remediation →
61/100
Remediation priority · Elevated
Remotely reachable No privileges

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
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.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · moderate confidence

The Python-Future 1.0.0 module contains logic that automatically imports a file named test.py if present in the same directory or accessible via sys.path. An attacker with file write access to any directory in the Python path can place a malicious test.py file which will be executed when the module loads, achieving arbitrary code execution. This is considered by some as a documented Python import behavior rather than a flaw in python-future.

MitigationRestrict file write permissions in directories included in sys.path to prevent unauthorized test.py file creation, or avoid deploying python-future 1.0.0 in untrusted environments. Consider migrating to alternative solutions if this behavior poses unacceptable risk.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
Required
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Identify if python-future 1.0.0 is installed
    Run 'pip show future' or 'pip list | grep -i future' to check installed version
    Affected if The version listed is 1.0.0 specifically
  2. Check for test.py files in your Python path
    Run 'python -c "import sys; print(sys.path)"' to list all paths, then search each for test.py using 'find /path -name test.py 2>/dev/null'
    Affected if A test.py file exists in any directory that appears in sys.path or in the same directory as the python-future module
  3. Verify the python-future installation location
    Run 'python -c "import future; print(future.__file__)"' to find where the module is installed
    Affected if The module loads successfully and the vulnerable auto-import logic can be triggered at import time
  4. Confirm the vulnerable import behavior exists
    Inspect the future/__init__.py or related files for code that attempts to import test.py automatically
    Affected if The module contains logic that automatically imports test.py on load

You are affected if python-future version 1.0.0 is installed AND a test.py file exists in any directory accessible via sys.path or in the same directory as the python-future module, as this would be executed when the module imports.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

From vendor data
Mitigation available No clean upgrade yet — mitigate in the meantime
Mitigation

Restrict file write permissions in directories included in sys.path to prevent unauthorized test.py file creation, or avoid deploying python-future 1.0.0 in untrusted environments. Consider migrating to alternative solutions if this behavior poses unacceptable risk.

Have this fixed Scoped from the published advisory
  • Consultation4.0 h
  • Implementation8.0 h
  • Testing6.0 h
  • Review / QA3.0 h
21.0 hours of engineering $3,680
Get help mitigating

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $5,888.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2025-50817 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2025-50817 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data