Read the docs

Code injection in mcp-use CodeExecutor lets remote attackers run code

Priority MEDIUM 46CWE-74Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Attack requirements
None
Impact type
Code execution
Confidentiality · integrity · availability
Low · Low · Low
Fix status
No fix listed

Attack profile from CVSS 4.0 · CNA. Fix status from CNA. Impact type from CWE-94.

Summary

mcp-use versions 1.7.0 and 1.7.1 contain a code injection flaw in the _build_namespace function of the CodeExecutor component. Manipulating the code argument lets a remote attacker inject code (CWE-94) without authentication or user interaction. The maintainer states that the built-in Python sandbox executor is not meant for production use.

Written with Claude Haiku 5.5 from the sources below · 2026-12-01

Description from the CNA

A vulnerability was determined in mcp-use up to 1.7.1. Affected by this vulnerability is the function _build_namespace of the file libraries/python/mcp_use/client/code_executor.py of the component CodeExecutor. Executing a manipulation of the argument code can lead to code injection. The attack can be launched remotely. The project maintainer explains, that the built-in Python sandbox executor is not meant for production use and users should rely on external sandbox providers.

Why it matters now

Fix No fix listed No fixed version in the sources yet

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
—mcp-use1.7.0; 1.7.1—No fix listedCNA
  • mcp-use Vendor— Affected 1.7.0; 1.7.1 Fixed in — No fix listed CNA

CPE names CNA · 1

CPEVersionsRoleVendor
cpe:2.3:a:mcp-use:mcp-use:*:*:*:*:*:*:*:*———
  • cpe:2.3:a:mcp-use:mcp-use:*:*:*:*:*:*:*:* Versions — — ·—

Remediation

The sources list no fixed version for mcp-use. The maintainer advises using external sandbox providers instead of the built-in Python sandbox executor.

Written with Claude Haiku 5.5 from the sources below · 2026-12-01

Timeline

  1. 2026-12-01 Threatist record created from CVE-2026-140133
  2. 2026-12-01 Alias added: GHSA-c2cv-qv6m-wqf7

References

Sources