NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · OpenClaw

CVE-2026-41391: OpenClaw: PIP_INDEX_URL and UV_INDEX_URL bypass host exec env sanitization and redirect Python package-index traffic

highCVSS 4.0 7.3 · 3.1 5.3GHSA-7ggg-pvrf-458v

OpenClaw 2026.3.28 and earlier let PIP_INDEX_URL and UV_INDEX_URL pass through the host exec environment sanitizer. A caller who controls those variables can point pip or uv at a package index of their choosing. Maintainers limit the exposure to approved package-management exec paths. Upgrade to 2026.3.31.

Published Apr 2, 2026 · Updated May 6, 2026 · Analysis Oct 30, 2026

What an attacker can do

OpenClaw sanitizes the environment it hands to host exec calls and blocks variables that change how a command behaves. In versions up to 2026.3.28 the blocklist missed the Python package index overrides. A request-scoped environment could therefore carry PIP_INDEX_URL or UV_INDEX_URL into a pip or uv run.

Those variables decide where Python packages are downloaded from. If an attacker sets them to a server they run, an approved install command fetches packages from that server instead of PyPI. Anything installed this way can run code at install or import time.

The maintainer triage marks this as narrow. It applies to approved or allowlisted package-management exec paths, and it is not arbitrary remote execution. The advisory does not say how an attacker gets a variable into the request. The CVSS vectors reflect that: local attack vector, high complexity, low privileges. For a team that runs OpenClaw next to AI agents, the realistic risk is an agent or prompt that influences the exec environment for a pip or uv install step.

Who is affected

The npm package openclaw, version 2026.3.28 and earlier. Version 2026.3.31 is the first stable tag with the fix. Check your install:

npm ls openclaw

The exposure only matters if your setup lets OpenClaw run pip or uv through host exec, for example through an allowlist that approves package installs.

openclaw

Ecosystem
npm
Affected
<= 2026.3.28
Fixed in
2026.3.31
Check
npm ls openclaw

How to fix it

Upgrade to openclaw 2026.3.31 or later:

npm install [email protected]

The fix is commit 7ae1bb0c. It adds seven variables to the host exec blocklist: PIP_INDEX_URL, PIP_PYPI_URL, PIP_EXTRA_INDEX_URL, UV_INDEX, UV_INDEX_URL, UV_DEFAULT_INDEX and UV_EXTRA_INDEX_URL. The advisory lists no workaround. Until you upgrade, avoid allowlisting pip or uv installs in host exec.

How to tell if you were hit

The sources give no indicators. Search your exec and agent logs for pip or uv runs where any of the seven variables above is set, and check pip.conf and uv configuration for index URLs you do not recognize. Look at network logs for pip or uv traffic going to hosts other than your normal package index. Beam records agent shell commands, so it can show pip or uv commands an agent ran and the environment context around them.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Summary

PIP_INDEX_URL and UV_INDEX_URL bypass host exec env sanitization and redirect Python package-index traffic

Current Maintainer Triage

  • Status: narrow
  • Normalized severity: high
  • Assessment: v2026.3.28 still allows Python package-index env redirection through host exec, but scope should stay limited to approved or allowlisted package-management exec paths, not arbitrary remote execution.

Affected Packages / Versions

  • Package: openclaw (npm)
  • Latest published npm version: 2026.3.31
  • Vulnerable version range: <=2026.3.28
  • Patched versions: >= 2026.3.31
  • First stable tag containing the fix: v2026.3.31

Fix Commit(s)

  • 7ae1bb0c7799fd0cbd2d4de7b0f5b8039837ab8d — 2026-03-31T09:53:32+09:00

OpenClaw thanks @nexrin for reporting.

Credited to nexrin, KeenSecurityLab, qclawer.

Questions

Is this arbitrary remote code execution in OpenClaw?

No. The maintainer triage says the scope is limited to approved or allowlisted package-management exec paths. A hostile package index can still lead to code running through installed packages.

Which OpenClaw version fixes CVE-2026-41391?

2026.3.31. Versions up to and including 2026.3.28 are vulnerable.

Which variables does the fix block?

Seven: PIP_INDEX_URL, PIP_PYPI_URL, PIP_EXTRA_INDEX_URL, UV_INDEX, UV_INDEX_URL, UV_DEFAULT_INDEX and UV_EXTRA_INDEX_URL. Lowercase forms are also flagged by the new checks.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More OpenClaw vulnerabilities

All OpenClaw entries