mcp-use CodeExecutor code injection (CVE-2026-140133)
Incident date
DisclosedDec 1, 2026 (GitHub advisory)
Added hereDec 1, 8:35 AM ET
Last verifiedDec 1, 2026
Summary
Per the vendor advisory, mcp-use up to 1.7.1 has a code injection flaw in the _build_namespace function of the CodeExecutor component, reached by manipulating the code argument. The advisory says the attack can be launched remotely. The project maintainer says the built-in Python sandbox executor is not meant for production use and users should rely on external sandbox providers.
Severity
HIGH CVSS score 7.3 rates High; the GitHub advisory labels it Medium.
Timeline
Advisory GHSA-c2cv-qv6m-wqf7 (CVE-2026-140133) published. (per the vendor advisory)
How it happened
Per the vendor advisory, the function _build_namespace in libraries/python/mcp_use/client/code_executor.py (component CodeExecutor) is affected. Manipulating the code argument can lead to code injection, and the attack can be launched remotely.
How to check your app
- up to 1.7.1: Check whether the installed mcp-use package is version 1.7.1 or earlier.
- up to 1.7.1: Check whether any deployment uses the built-in Python sandbox executor (CodeExecutor) to run code.
Sources
Corrections and updates
Cite this entry
- Title
- mcp-use CodeExecutor code injection (CVE-2026-140133)
- Added
- Dec 1, 2026
- URL
- https://vibeincidents.com/incidents/mcp-use-cve-2026-140133/
- Suggested citation
VibeIncidents. "mcp-use CodeExecutor code injection (CVE-2026-140133)." Dec 1, 2026. https://vibeincidents.com/incidents/mcp-use-cve-2026-140133/