Description
pymanager included the current working directory in sys.path meaning modules could be shadowed by modules in the current working directory. As a result, if a user executes a pymanager-generated command (e.g., pip, pytest)
from an attacker-controlled directory, a malicious module in that
directory can be imported and executed instead of the intended package.
Published: 2026-04-01
Score: 5.6 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Malicious module import leading to arbitrary code execution
Action: Apply patch
AI Analysis

Impact

pymanager adds the current working directory to the Python import path, allowing a local file with the same name as a legitimate module to shadow the intended package. When a user runs a pymanager‑generated command such as pip or pytest from an attacker‑controlled directory, the malicious module can be imported and executed under the user’s privileges. This represents an arbitrary code execution risk and is classified under CWE‑427 (Uncontrolled Search Path Elements).

Affected Systems

The vulnerability affects the Python Software Foundation’s pymanager, specifically version 26.0 and earlier releases. Any installation of these versions that may be invoked from an untrusted working directory is at risk. Administrators should verify the version of pymanager in use and consider the impact if the tool is executed in directories that may be controlled by untrusted parties.

Risk and Exploitability

The CVSS score of 5.6 indicates moderate damage potential, while an EPSS score of less than 1% suggests the vulnerability is currently unlikely to be exploited widely. The vulnerability is not listed in the CISA KEV catalog and no public exploit has been documented. Exploitation requires the attacker to have write access to the working directory and to trigger a pymanager command while executing from that location. The attack can execute arbitrary code with the privileges of the user launching the command. The risk is thus primarily confined to environments where pymanager is run from directories that can be influenced by external or third‑party input.

Generated by OpenCVE AI on April 7, 2026 at 23:39 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade pymanager to a version where the issue is resolved.
  • If an upgrade is not immediately possible, run pymanager commands from a directory that is not under attacker control or change to a safe directory before execution.
  • Adjust PYTHONPATH to exclude the current working directory so that local modules are not considered during import.

Generated by OpenCVE AI on April 7, 2026 at 23:39 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 07 Apr 2026 20:45:00 +0000

Type Values Removed Values Added
CPEs cpe:2.3:a:python:pymanager:26.0:*:*:*:*:*:*:*
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'}


Thu, 02 Apr 2026 20:30:00 +0000

Type Values Removed Values Added
First Time appeared Python
Python pymanager
Vendors & Products Python
Python pymanager

Thu, 02 Apr 2026 00:30:00 +0000

Type Values Removed Values Added
References

Wed, 01 Apr 2026 23:45:00 +0000

Type Values Removed Values Added
Description pymanager included the current working directory in sys.path meaning modules could be shadowed by modules in the current working directory. As a result, if a user executes a pymanager-generated command (e.g., pip, pytest) from an attacker-controlled directory, a malicious module in that directory can be imported and executed instead of the intended package.
Title Possible to hijack modules in current working directory
Weaknesses CWE-427
References
Metrics cvssV4_0

{'score': 5.6, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:A/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N'}

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Subscriptions

Python Pymanager
cve-icon MITRE

Status: PUBLISHED

Assigner: PSF

Published:

Updated: 2026-04-01T23:12:18.741Z

Reserved: 2026-03-31T20:02:35.393Z

Link: CVE-2026-5271

cve-icon Vulnrichment

Updated: 2026-04-01T23:12:18.741Z

cve-icon NVD

Status : Analyzed

Published: 2026-04-01T14:16:59.343

Modified: 2026-04-07T19:43:28.947

Link: CVE-2026-5271

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-04-08T19:57:10Z

Weaknesses