Edition of Sat 28 Nov 2026 UTC Free to read. No paywall. RSS · X
Infrastructure Intel

Crypto and AI agent infrastructure, read by a network architect. No hype. No shilling.

Agent Trust

Two Agent Gateway Bugs, One Old Proxy Lesson

By · · 5 min read

CISA says a LiteLLM flaw is being exploited, and IBM patched an MCP gateway that let a client header replace the credential the gateway was holding. Both are gateways built to hold credentials for AI agents, and both failed in ways network engineers have seen before.

Dec 2CISA's deadline for federal agencies to fix the LiteLLM flaw

Two security notices landed within a week of each other, both about gateways that sit between AI agents and the services they call.

On November 18, CISA added a LiteLLM vulnerability to its Known Exploited Vulnerabilities catalog. On November 12, IBM published a bulletin for its ContextForge MCP Gateway. One is being attacked now and the other isn’t known to be. I’m writing about them together because they’re the same kind of mistake.

Update, November 20: Google has described an attacker using this LiteLLM flaw in two ways that don’t match, and the patch version below may not be enough. See One CVE Number, Two Different LiteLLM Bugs.

LiteLLM: the endpoint that tests your guardrails

LiteLLM is an open-source proxy that puts one API in front of many model providers. The flaw is CVE-2026-40217, rated 8.8.

The proxy has an endpoint, POST /guardrails/test_custom_code, that takes Python so an administrator can test guardrail logic. It runs that code in a sandbox the project wrote itself. X41 D-Sec showed in April that the sandbox could be escaped by rewriting bytecode, which gets arbitrary code running in the proxy process. In the default Docker image, that process runs as root.

One fact gets dropped in a lot of the coverage. LiteLLM’s own advisory says reaching the endpoint “requires a proxy-admin credential in default configurations.” So this isn’t an anonymous attack from the internet. It turns an admin key for the proxy into root on the host the proxy runs on.

That still matters, and here’s why. An LLM gateway exists so that individual applications stop holding provider keys. It works. It also means every provider key you use is now in one process, next to the request logs, with an outbound path to every model API that your monitoring already treats as normal. An admin key for the proxy was supposed to let someone manage routing and budgets. With this bug it also reads everything the proxy knows.

X41 published on April 8 with no patch available, after two months of trying to get one. The fix is in LiteLLM 1.83.11, which replaced the home-made sandbox with RestrictedPython. CISA’s catalog entry doesn’t say who is exploiting it or against whom, and I won’t guess.

ContextForge: a header the client gets to set

IBM’s bulletin is for CVE-2026-110279, rated 8.1, in ContextForge MCP Gateway versions 1.0.0 through 1.1.0.

The gateway forwards requests from clients to upstream MCP servers and can hold the upstream credential itself. That might be a stored per-user OAuth token, a client-credentials token, or a bearer or basic header configured on the gateway. IBM’s description of the bug is one sentence long: the X-Upstream-Authorization request header “is always renamed to Authorization for upstream requests.”

So an authenticated user could hand the gateway a different credential, and the gateway would use it in place of the one it was managing.

IBM names two consequences, and people tend to skip the second. Per-user permissions can be bypassed. So can audit attribution. Your logs would show the right user making a request that the gateway carried out under someone else’s authority.

IBM doesn’t report exploitation. The fix is version 1.1.1.

The lesson we already had

Network engineers learned this with reverse proxies, a long time ago. Any header a client can set is input from the attacker. That’s why you strip X-Forwarded-For at your trust boundary and write it yourself. You don’t believe what arrived.

The LiteLLM bug is the other half of the same education. A management endpoint that executes code is a remote shell with a login page, and a sandbox you wrote yourself is a guess about what an attacker can’t do.

The agent stack is rebuilding the proxy tier right now, and it’s hitting these problems in about the order the web tier did. I don’t mean that as a criticism of either project. Both published clear advisories and both fixed the problem. I mean that the people who already made these mistakes once are mostly on the network and platform teams, and they should be in the room when the agent gateway gets designed.

What to check

  • LiteLLM: upgrade to 1.83.11 or later. The advisory text says 1.83.11 and its package metadata says 1.83.10, so take the later one. If you can’t upgrade yet, block POST /guardrails/test_custom_code at your reverse proxy.
  • Who holds a LiteLLM admin key. If that list is longer than the list of people you’d give root on the host, it has been too long since April.
  • Don’t run the proxy as root. The default image does. X41’s advisory suggests running the container as an unprivileged user.
  • Rotate provider keys if the admin API was reachable from anywhere you don’t fully control while you were on a vulnerable version.
  • ContextForge: upgrade to 1.1.1. Until then, IBM’s workaround is to remove the X-Upstream-Authorization header at the proxy in front of the gateway and restrict MCP endpoints to trusted networks.
  • Any gateway that brokers credentials for agents: allowlist the headers you forward upstream and strip the rest at ingress. Then check whether your logs record which credential was used, and not only which user asked.
  • Put the gateway in the same tier as your secrets vault on the network diagram. That’s what it’s holding.

A gateway like this has the same job as an identity provider: it decides whose authority a request carries. When that goes wrong, a request can run under an authority nobody granted it, and the logs will still look normal.

David Cooper, CCIE #14019

I build Sigvara, a reputation and bonding layer for AI agents that has its own token, so weigh my read accordingly. Educational, not financial or legal advice. Views are my own.

Sources