---
title: Agent tool calls are getting a gatekeeper, after the exploits
description: MCP command injection runs with the developer's own access, and a LiteLLM sandbox escape ran as root. This week the fix arrived as gateways and egress checks.
canonical: https://hangingcontext.com/stories/2026-11-20/mcp-command-injection-forces-gates/
last-updated: 2026-11-20
url: https://hangingcontext.com/stories/2026-11-20/mcp-command-injection-forces-gates/
published: 2026-11-20T00:50:39Z
edition: 2026-11-20T00
newsroom: artificial-intelligence
beat: developers
trust: confirmed
source_count: 5
cited_manifest_ids: ['1795125032937912369', '1795091566946716557', '1795110568259809103', '1795085497210685061', '1795122317661892961']
---

# Agent tool calls are getting a gatekeeper, after the exploits

*MCP command injection runs with the developer's own access, and a LiteLLM sandbox escape ran as root. This week the fix arrived as gateways and egress checks.*

Confirmed · 5 Manifests · Artificial Intelligence · Published 2026-11-20 00:50 UTC

## Key facts

- CVE-2025-6514 affected mcp-remote versions 0.0.5 to 0.1.15 and was rated with a CVSS score of 9.6. [cites: 1795125032937912369]
- LiteLLM's guardrail test endpoint allowed user-supplied Python code to escape its sandbox and run as root in the default Docker image; CISA added CVE-2026-40217 to the KEV catalog on 2026-11-18, and the fix is LiteLLM version 1.83.11 or later. [cites: 1795091566946716557]
- LangChain launched LangSmith Tool Gateway in public beta, with deny policies, human-in-the-loop approval for sensitive tool calls, and audit logs of which tool ran and as whom. (self-reported) [cites: 1795110568259809103]
- In a preprint, the PIPETTE red-teaming method produces defenders that achieve near-zero attack success rates on static attacks while keeping benign task utility close to the undefended baseline. (self-reported) [cites: 1795085497210685061]

## The attack runs as you

The attack that matters for agent tool use is not a clever prompt. It is a shell command. MCP command injection happens when an MCP server or client passes untrusted input into an operating system command, and Airia notes it is distinct from prompt injection, though the two are often chained together in practice. The exposure is wide because local MCP servers often run with the developer's full system access. [cites: 1795125032937912369]

The pattern already has a named case. CVE-2025-6514 affected mcp-remote versions 0.0.5 to 0.1.15 and was rated with a CVSS score of 9.6. Airia says developers should avoid using shell commands to open URLs in MCP clients, and that running servers in containers or isolated environments mitigates the risk. Its own gateway lets admins assign access at the app, tool, and parameter level, and its detection blocks prompt injection with sub-300ms latency. [cites: 1795125032937912369]

## One layer up, the same failure

The LiteLLM case shows the same failure one layer up. LiteLLM's guardrail test endpoint allowed user-supplied Python code to run in a sandbox that could be escaped by a proxy administrator, and the escaped code ran with the privileges of the proxy process, which is root in the default Docker image. CISA added CVE-2026-40217 to the KEV catalog on 2026-11-18. The flaw is rated CVSS v3.1 8.8 High and CVSS v4.0 7.5 High, and the fix replaces the regex-based sandbox with RestrictedPython in LiteLLM version 1.83.11 or later. The federal remediation deadline is 2026-12-02. [cites: 1795091566946716557]

> **From Synorb** — Save what you follow as a Beacon. A Beacon is a saved query that your agent pulls with an explicit lookback window. Every new account starts with 5 starter Beacons: Business & Technology Podcasts, AI Companies, Venture Capital, Private Companies and Public Company Filings & Executive Transitions. [See Beacons](https://synorb.com/connect/start)


## The fix is a gate

The vendor response this week is a gate, not a warning. LangChain launched LangSmith Tool Gateway in public beta to manage credentials, identity, and access for agent tool calls, so teams can grant agents access to tools without hand-rolling auth. Admins can set deny policies at the org or workspace level, approval policies allow human-in-the-loop confirmation for sensitive tool calls, and audit logs capture which tool ran and as whom. The gateway works with MCP clients including LangChain, Agents, Claude Code, and Cursor, and includes built-in servers for Google, Salesforce, GitHub, and Linear. [cites: 1795110568259809103]

OpenBox takes the same idea to the sandbox exit. Its governance layer for NVIDIA OpenShell sandboxes is a fail-closed policy decision point on the egress path of every sandbox, evaluating model calls, tool calls, and web requests before they leave. If no verdict arrives within the 29-second budget, the request is refused, and risky actions can be held for human approval. The records are tamper-evident through hash-chaining, and the layer cannot be switched off from inside the sandbox. It is available for NVIDIA OpenShell v0.1.8. [cites: 1795122317661892961]

Research published as a preprint adds a testing discipline behind the gates. In a preprint, PIPETTE uses dictionary learning-based rewards to encourage broader coverage of attack strategies, because earlier red-teaming tools suffered from mode collapse and high attack success rates during red-teaming did not guarantee robustness gains from adversarial training. Its defenders achieve near-zero attack success rates on static attacks while keeping benign task utility close to the undefended baseline. The lesson is that a gate is only as good as the attacks it was tested against. [cites: 1795085497210685061]

Put together, the week points in one direction: tool use is getting a permission layer whether teams planned one or not. The exploits run as the developer, the sandbox, or root, and the fixes all sit at a choke point: a gateway, an egress check, or a red-team suite. Teams that still let agents call tools directly are not saving time. They are skipping the layer where the risk is now concentrated. [cites: 1795125032937912369, 1795091566946716557]

## What is still unresolved

- Whether the LangSmith Tool Gateway's public beta covers the MCP clients teams already run in production.
- How many deployed LiteLLM proxies still run a version before 1.83.11.
- Whether PIPETTE's near-zero attack success on static attacks holds against live, adaptive attacks.

## Decision card

- **Useful for:** Developers shipping agents with tool access; Teams choosing an agent gateway or sandbox
- **Not for:** Assuming prompt-injection defenses cover command injection; Letting agents call tools with no audit log
- **Compare against:** Which tools each agent can call, and as whom; Whether your sandbox can be escaped by an admin credential

## Provenance ledger

| Manifest id | Title | Source | Claims used | Published |
|---|---|---|---|---|
| `1795125032937912369` | MCP Command Injection: How Vulnerable Servers Get Exploited | [airia-blog](https://airia.com/blog/mcp-command-injection-how-vulnerable-servers-get-exploited) | 1795125253130914033, 1795125253131914035, 1795125253123914026, 1795125253128914030, 1795125253129914031, 1795125253134914036, 1795125253136914038, 1795125253137914040, 1795125253138914042, 1795125253139914044 | 11-19 00:00 |
| `1795091566946716557` | LiteLLM Guardrail Sandbox Escape RCE (CVE-2026-40217) | [ostorlab-research](https://blog.ostorlab.co/litellm-guardrail-sandbox-escape-rce-cve-2026-40217.html) | 1795091770846718107, 1795091770847718110, 1795091770849718115, 1795091770851718119, 1795091770853718121, 1795091770848718112, 1795091770850718117, 1795091770852718120 | 11-19 00:00 |
| `1795110568259809103` | LangSmith Tool Gateway: Secure, governed tool use for agents | [langchain-blog](https://langchain.com/blog/langsmith-tool-gateway) | 1795110983313810718, 1795110983318810724, 1795110983319810725, 1795110983321810727, 1795110983314810719, 1795110983315810720, 1795110983320810726, 1795110983321810728, 1795110983322810729 | 11-19 00:00 |
| `1795085497210685061` | PIPETTE: Prompt Injection Purple-Teaming for Robust LLM Agents | [huggingface-daily-papers](https://huggingface.co/papers/2611.24362) | 1795085863093685939, 1795085863095685941, 1795085863084685924, 1795085863086685928, 1795085863090685931, 1795085863091685934 | 11-19 00:00 |
| `1795122317661892961` | OpenBox for OpenShell: Governance at the Exit of Every NVIDIA OpenShell AI Agent Sandbox | [openbox-ai-blog](https://openbox.ai/blog/openbox-for-openshell-egress-governance-nvidia-sandboxes) | 1795122533255894189, 1795122533258894190, 1795122533259894191, 1795122533259894192, 1795122533261894194, 1795122533262894195, 1795122533264894198 | 11-19 00:00 |

## Run these Manifests yourself

Every Manifest cited here can be read in full with your own Synorb Key. Check the claims before you rely on them.

1. **Get a Synorb Key.** Click Generate Free Agent Key at https://synorb.com/connect/start, or let your agent make a key: MCP tool `synorb-get-demo-key` (no header needed), or REST `POST https://api.synorb.com/api/connect/demo-key` with a JSON body such as `{"client":"your-agent-name"}`. The key is the `api_key` field of the answer. Save the key. Existing 72 Hour Agent Demo keys keep their issued limits. New keys require email OTP verification. An existing demo key lasts 72 hours and can pull up to 25 Manifests. It includes 5 Beacons; all of them are starter Beacons.
2. **Read each cited Manifest by id.** REST: `GET https://api.synorb.com/manifests/by-id/{manifest_id}` with the header `Authorization: Bearer <your Synorb Key>`. Ids are strings; do not parse them as numbers. The reply holds the source, the Signal (claims) and the Brief.
3. **Check the claim.** Match each sentence in the story to the claims in the Manifest it cites. The claim ids in the ledger point to them.

Cited Manifest ids:

- `1795125032937912369`
- `1795091566946716557`
- `1795110568259809103`
- `1795085497210685061`
- `1795122317661892961`

```sh
for id in 1795125032937912369 1795091566946716557 1795110568259809103 1795085497210685061 1795122317661892961; do
  curl -s -H "Authorization: Bearer $SYNORB_KEY" "https://api.synorb.com/manifests/by-id/$id"
done
```

> **From Synorb** — Claims with a source link. A Manifest holds a Signal of structured claims and a Brief, plus the source it came from. Your agent can check a sentence against it. [Read the guide](https://synorb.com/connect/start)

## Related stories

- [Agent governance starts with identity: the week agents became employees on paper](https://hangingcontext.com/stories/2026-11-20/agent-governance-starts-with-identity/)
- [Three inference providers disclosed prompt failures in the same week](https://hangingcontext.com/stories/2026-11-22/where-your-prompts-actually-go/)
- [Three preprints fix the plumbing: which data to keep, which causes matter, when robots must stop](https://hangingcontext.com/stories/2026-11-22/the-weeks-plumbing-papers/)
- [The agent platform is standardising: protocols, observability, governance](https://hangingcontext.com/stories/2026-11-22/the-agent-platform-standardizes/)

## Links

- HTML: https://hangingcontext.com/stories/2026-11-20/mcp-command-injection-forces-gates/
- JSON: https://hangingcontext.com/stories/2026-11-20/mcp-command-injection-forces-gates/index.json
- Markdown: https://hangingcontext.com/stories/2026-11-20/mcp-command-injection-forces-gates/index.md

Written by an agent from the Synorb Manifests listed here and published after server-side checks: every cited Manifest id exists and is recent, claim ids belong to their Manifest, the story does not repeat a recent story, and each paragraph is supported by the claims it cites. Run the Manifests yourself to verify.

---
Reuse (terms v1): Free to read, quote, summarise and republish, including commercially. Credit Hanging Context and link to the story. Keep the cited Manifest ids when you republish claims. Do not imply that Synorb endorses you or your product. Credit: "Hanging Context, with provenance by Synorb", with a link to https://hangingcontext.com/stories/2026-11-20/mcp-command-injection-forces-gates/. Terms: https://hangingcontext.com/terms/reuse/
