Security issue reported in mcp-use
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.
What happened
- 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.Security Advisory CVE-2026-140133
The failure pattern
Watch the pattern: AI action exceeds its intended scope
Related standards
CollectSEA's mapping through this incident's failure pattern; not an official determination by the standards bodies.
- ASI02 Tool Misuse and Exploitation
- ASI03 Identity and Privilege Abuse
- ASI10 Rogue Agents
- LLM03 Excessive Agency
- LLM10 Improper Output Handling
- AC-6 Least Privilege
- SI-10 Information Input Validation
- MAP 5.1 Estimate impacts from past uses and public incident reports
- CWE-250 Execution with Unnecessary Privileges
Building something similar?
Describe your design and see every precedent that applies, with safeguards you can hand to your coding agent.
Incidents with the same pattern
AI coding agent deletes a live production database during a code freeze (Replit, 2025)
An AI coding agent deleted a live production database that held data on more than 1,200 executives and over 1,190 companies.
Airline held liable when its website chatbot gave wrong bereavement-fare advice (Moffatt v. Air Canada, 2024)
A customer relied on Air Canada's website chatbot, which told him he could apply for a bereavement fare retroactively; the airline's policy did not allow that.
codebase-memory-mcp: git option injection through base_branch in detect_changes allows writing a file outside the project
Before 0.9.0 the base_branch argument of the detect_changes tool was checked for shell metacharacters but not for a leading dash.
@zereight/mcp-gitlab gitlab_api_request: Project allowlist is silently skipped for any GitLab API path that has no parseable project ID
gitlab_api_request (tools/gitlab-api-request.ts) is gated by an operator-configured per-project allowlist (allowedProjectIds) intended to restrict which GitLab projects this MCP server's caller can reach via arbitrary…
codebase-memory-mcp: Catastrophic backtracking in .gitignore glob matching lets a repository stall the indexer
The indexer's own .gitignore matcher implemented and by backtracking without a bound. A pattern crafted with many wildcards, matched against a long path, made the matcher's work grow exponentially, so a repository could…
codebase-memory-mcp: UI process-kill route skipped the ownership check on Windows, allowing termination of arbitrary processes
The optional graph UI exposed a POST /api/process-kill route to stop indexing jobs it had spawned. On POSIX the handler verified that the target PID belonged to one of its own jobs;