Code injection in mcp-use CodeExecutor lets remote attackers run code
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
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | mcp-use | 1.7.0; 1.7.1 | — | No fix listed | CNA |
- mcp-use Vendor— Affected 1.7.0; 1.7.1 Fixed in — No fix listed CNA
CPE names CNA · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| 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
- 2026-12-01 Threatist record created from CVE-2026-140133
- 2026-12-01 Alias added: GHSA-c2cv-qv6m-wqf7
References
Sources
- CVE-2026-140133 · CVE Program
- CVE-2026-140133 · NVD
- GHSA-c2cv-qv6m-wqf7 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences