medium CVSS 5.3 EPSS 0.13%

CVE-2026-41391·Python vulnerability

OpenClaw before 2026.3.31 fails to properly sanitize PIP_INDEX_URL and UV_INDEX_URL environment variables in host execution contexts, allowing attackers to redirect Python package-index traffic. Attackers can exploit this bypass to intercept or manipulate package management operations by injecting malicious index URLs through unsanitized environment variables.

Severity
medium
Software
Python
Fixed in
2026.3.31
Published

How likely is exploitation

FIRST's Exploit Prediction Scoring System puts the probability of this CVE being exploited in the next 30 days at 0.13% — higher than 3% of all published CVEs. EPSS is an independent forecast of exploitation, not a severity rating: it says nothing about how much damage a successful attack does, which is what a CVSS score measures.

Affected versions

Until: 2026.3.31

Fixed in: 2026.3.31

How to fix this CVE

Update OpenClaw and Python to the patched version 2026.3.31 or later to prevent environment variable injection attacks on package index URLs. Audit your system for any custom PIP_INDEX_URL or UV_INDEX_URL environment variable configurations and replace them with official package index settings. After patching, validate that Python package installations only connect to legitimate package repositories.

sudo dnf update python3 && pip install --upgrade openclaw>=2026.3.31

Defensia detects this vulnerability

How to check if you are affected

  1. Run `python3 --version` to check your installed Python version and confirm it includes the OpenClaw security patch from version 2026.3.31 or later.
  2. Execute `env | grep -E '(PIP_INDEX_URL|UV_INDEX_URL)'` to identify any custom package index URLs set in your environment that could be exploited.
  3. Search system logs with `grep -r 'PIP_INDEX_URL\|UV_INDEX_URL' /var/log/ /home/*/.bash_history 2>/dev/null` to detect if malicious index URLs have been injected.
  4. Verify the patch by running `pip show openclaw` and confirming the version is 2026.3.31 or later; additionally, check `/proc/[python-pid]/environ` for any suspicious index configurations in running Python processes.

FAQ

What is CVE-2026-41391?

CVE-2026-41391 is a vulnerability in OpenClaw that fails to sanitize PIP_INDEX_URL and UV_INDEX_URL environment variables, allowing attackers with local access to redirect Python package installations to malicious repositories and intercept or modify packages before installation.

Is CVE-2026-41391 being actively exploited?

No, according to CISA's Known Exploited Vulnerabilities list, CVE-2026-41391 is not currently being actively exploited in the wild, and no public exploit code is available.

What versions of Python are affected by CVE-2026-41391?

All OpenClaw versions prior to 2026.3.31 are affected. The vulnerability impacts any Python installation using affected versions of OpenClaw for package management.

How do I check if my server is vulnerable to CVE-2026-41391?

Run `pip show openclaw | grep Version` to get your OpenClaw version; if it is older than 2026.3.31, your system is vulnerable. Additionally, check for suspicious environment variables with `env | grep -E '(PIP_INDEX_URL|UV_INDEX_URL)'`.

Does Defensia detect CVE-2026-41391?

Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If OpenClaw or Python is installed on a monitored server, CVE-2026-41391 will appear in your dashboard with remediation steps.

Related Python CVEs

CVE-2026-25632CVSS 10EPyT-Flow is a Python package designed for the easy generation of hydraulic and water quality scenario data of water distribution networks. Prior to 0.16.1, EPyT-Flow’s REST API parses attacker-controlled JSON request bodies using a custom deserializer (my_load_from_json) that supports a type field. When type is present, the deserializer dynamically imports an attacker-specified module/class and instantiates it with attacker-supplied arguments. This allows invoking dangerous classes such as subprocess.Popen, which can lead to OS command execution during JSON parsing. This also affects the loading of JSON files. This vulnerability is fixed in 0.16.1.
CVE-2026-34938CVSS 10PraisonAI is a multi-agent teams system. Prior to version 1.5.90, execute_code() in praisonai-agents runs attacker-controlled Python inside a three-layer sandbox that can be fully bypassed by passing a str subclass with an overridden startswith() method to the _safe_getattr wrapper, achieving arbitrary OS command execution on the host. This issue has been patched in version 1.5.90.
CVE-2026-33054CVSS 10Mesop is a Python-based UI framework that allows users to build web applications. Versions 1.2.2 and below contain a Path Traversal vulnerability that allows any user supplying an untrusted state_token through the UI stream payload to arbitrarily target files on the disk under the standard file-based runtime backend. This can result in application denial of service (via crash loops when reading non-msgpack target files as configurations), or arbitrary file manipulation. This vulnerability heavily exposes systems hosted utilizing FileStateSessionBackend. Unauthorized malicious actors could interact with arbitrary payloads overwriting or explicitly removing underlying service resources natively outside the application bounds. This issue has been fixed in version 1.2.3.
CVE-2026-28505CVSS 10Tautulli is a Python based monitoring and tracking tool for Plex Media Server. Prior to version 2.17.0, the str_eval() function in notification_handler.py implements a sandboxed eval() for notification text templates. The sandbox attempts to restrict callable names by inspecting code.co_names of the compiled code object. However, co_names only contains names from the outer code object. When a lambda expression is used, it creates a nested code object whose attribute accesses are stored in code.co_consts, NOT in code.co_names. The sandbox never inspects nested code objects. This issue has been patched in version 2.17.0.
CVE-2026-33873CVSS 9.9Langflow is a tool for building and deploying AI-powered agents and workflows. Prior to version 1.9.0, the Agentic Assistant feature in Langflow executes LLM-generated Python code during its validation phase. Although this phase appears intended to validate generated component code, the implementation reaches dynamic execution sinks and instantiates the generated class server-side. In deployments where an attacker can access the Agentic Assistant feature and influence the model output, this can result in arbitrary server-side Python execution. Version 1.9.0 fixes the issue.

References

Track CVEs across your fleet automatically

Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-41391. Free for 1 server.

Get started free