High

mcp-use code executor allows remote code injection (CVE-2026-140133)

An attacker can manipulate the code argument of the _build_namespace function in mcp-use's built-in Python code executor to inject code, and the attack can be launched remotely. This lets them run arbitrary code on the machine running mcp-use.

Product
mcp-use
Systems
macOSWindowsLinux
CVSS
7.3
Weakness
CWE-74CWE-94
Source
Get the fix in Telegram

Affected software and versions

PackageEcosystemAffectedFixed in
mcp-useothernot statednot verified

A fixed version is shown only when it is verified against a vendor or advisory source.

Who should check

Anyone running mcp-use on macOS, Windows or Linux and using the built-in Python code executor; there is no fixed version, and the maintainer says the built-in sandbox executor is not meant for production use.

Expected outcome after remediation

Report whether mcp-use is installed, whether the built-in Python code executor is in use, and confirm it has been disabled or replaced with an external sandbox provider.

Get the fix

FixLane has a reviewed fix procedure for this incident: a read-only check first, then the fix. Ask the Telegram bot, or connect an AI agent to the FixLane MCP server and call get_fix_prompt with incident id 5357 and your operating system.