Security

AI Gateway Security Checklist: 17 Controls After November's LiteLLM KEV Wave

ManyLayers Team 2026-11-26 Updated 2026-12-04 12 min read

CISA added LiteLLM CVE-2026-40217 to the Known Exploited Vulnerabilities catalog on 18 November 2026. Federal civilian agencies must remediate by 2 December 2026. In the days that followed, third-party write-ups kept landing — a CSA research note on 20 November describing in-the-wild use of this class of gateway bug in LLMjacking intrusions, and a batch of further multi-tenant advisories on 23–24 November covering request-supplied endpoints, cross-user logging, stored routing rules and SSO identity handling.

Taken together, this is the clearest signal in a year that AI gateways themselves are now a primary target. Not the models behind them. The gateway. The thing that holds every team’s provider keys, every user’s traffic and every tool call in one process.

This post is a checklist, not a teardown. Seventeen controls grouped into five areas: agent surface, provider surface, tenant isolation, the data plane and agent credentials. Each control names what good looks like and what to check in your current deployment. If you run a shared AI gateway today, read it against your own configuration.

Why AI gateways are now a top target

An AI gateway sits in a uniquely sensitive spot: it brokers requests from many internal teams to many external model providers. A single compromise reads across teams, exposes long-lived provider keys, and often has write access to tool integrations (MCP) that can reach production systems. The CISA KEV listing (deadline 2 Dec 2026) and the CSA research note (20 Nov 2026) both describe this class of issue as “already exploited in the wild.” The November 2026 advisories against LiteLLM’s multi-tenant paths are a reminder that the shared gateway’s own trust boundaries — not the model API — are the exposed surface.

Sources (checked 26 November 2026):

Agent surface

1. Admin-only MCP stdio. MCP stdio servers run with the privileges of the gateway process. Any user who can register a stdio server can execute arbitrary code. Restrict stdio registration to platform administrators; keep self-serve registration limited to vetted remote (HTTP/SSE) MCP servers. In ManyLayers Workspace, tools are scoped per workflow from a central registry — see MCP in the enterprise.

2. No default API keys. The gateway must not ship with a default admin key, a default master_key, or a “demo” tenant. Every install should force key generation on first boot and refuse to start without it. Grep your deployment for literal strings like sk-1234, demo, admin-token — anything that looks like a shared bootstrap credential.

3. Sandboxed custom code. Many gateways let operators drop in Python callbacks, pre/post hooks, or custom routing logic. Execute these in a sandbox that cannot reach the orchestrator’s own secrets store or the shared routing table. If that isolation is not possible, treat custom code as privileged and require code review before deployment.

4. Role checks on test endpoints. /health, /debug, /test, /eval/* and similar routes commonly skip auth or run with elevated privileges in dev. Audit every endpoint the gateway exposes and confirm it enforces the same role check as the main /chat/completions path.

Provider surface

5. Virtual keys per team, never the raw provider key. Internal callers should authenticate with a gateway-issued virtual key. The real OPENAI_API_KEY (or equivalent) should live only in the gateway’s secrets store, never in a request header, a client config file, or a test script. Virtual keys can be scoped, rotated, and revoked without touching the underlying provider account.

6. Per-team budgets and hard caps. A compromised virtual key should spend at most the team’s remaining budget before it is auto-blocked. See token budgets and chargeback and webhook alerting for budget overruns.

7. Allow-listed models and providers. The gateway should reject any request that names a model or provider outside the caller’s allow-list. This is the control that keeps a leaked virtual key from pivoting from GPT-4 to an expensive specialty model at 10× the per-token rate.

8. Egress policies on provider endpoints. If your deployment is self-hosted, egress from the gateway should be restricted to the specific provider hostnames you route to. A compromised custom callback that tries to curl an attacker server should be blocked at the network layer, not just the application layer.

Tenant isolation

Added for the November 2026 LiteLLM advisories. Full list at https://github.com/BerriAI/litellm/security/advisories — review these against your own configuration regardless of which gateway you run.

9. No client-set endpoints or provider keys in shared routing state. A request field named api_key or api_base must not be joined into the shared deployment list for other users. If your gateway supports “client-side credentials,” confirm the setting is off unless you need it, and confirm it never leaks into the routing cache. (GHSA-m8fp-3f3g-j5p7, fixed in LiteLLM 1.103.0.)

10. Per-request settings stay per-request. Fields like callbacks, success_callback, logger_config that a request can set must never turn on a worker-wide behavior. Audit every request field the gateway accepts and confirm its blast radius is the single request. (GHSA-34v7-jqrg-944p, fixed in 1.84.4.)

11. Re-authorise stored routing rules at use time. Fallback chains, model aliases, and routing policies written to persistent storage must be re-checked against the caller’s allow-list when a request hits them — not only when they were created. Otherwise, a user who once had access to model X can keep using it as a fallback target after their access is revoked. (GHSA-wpm4-hgr2-xjwr, moderate, default-on from 1.108.0.)

12. Trust only verified, unique SSO identities; hash secrets on every write path. Accept SSO identities only from your configured IdP; do not allow a request to self-assert an email or sub claim. Secrets (virtual keys, OAuth tokens, webhook signing keys) must be hashed on every code path that writes them to storage — including migration scripts. (GHSA-w5h5-479w-p5hx, fixed in 1.111.0; GHSA-p377-4hwj-f3fh, fixed in 1.104.0.)

Data plane

13. PII redaction before egress. Every request should pass through a PII guardrail before it leaves your network. Names, emails, SSNs, card numbers, PHI identifiers. Redact (or replace with placeholders) before the prompt reaches a model provider. See PII firewall for enterprise AI.

14. Immutable audit log. Every request, response, tool call and policy decision should land in a log the gateway operator cannot silently alter. Tamper-evident hash chains make “someone edited the log” detectable. See what belongs in your AI audit log.

15. Where prompts are processed, explicitly. For every route, write down which provider will see the prompt and in which region. If prompts must not reach a third-party inference host at all, route to on-prem or air-gapped open-weight models — see self-hosted deployments.

16. Review logs after every provider advisory. When a provider or gateway vendor publishes an advisory, the first question is “who in our org used this in the last 30 days?” The audit log is the authoritative answer. Run the query. Don’t assume.

Agent credentials

Added 4 December 2026, after Docker Sandboxes CVE-2026-136998.

17. Credential approvals bind to artifact, version and destination. Any agent, kit, plug-in or MCP server that can cause a credential to be sent needs an approval tied to what was reviewed: a content digest or pinned commit, not a name or tag. Enforce the approved destination on every request, ask again when the version, destination or egress rules change, and log each credential injection with the destination and approval it used. Better still, give agents gateway virtual keys with budgets and rate limits instead of provider keys. Docker Sandboxes CVE-2026-136998 showed what happens otherwise: an approval stored against a service name let an updated agent kit send the real key to a new host with no prompt. See agent credential approvals must bind to version and host.

FAQ

Q: Are we exposed to CVE-2026-40217 if we don’t run LiteLLM? A: Not directly. The CVE is specific to LiteLLM’s MCP stdio handling. But the class of issue — a shared AI gateway with an overly privileged tool-registration path — is not unique to one project. Review controls 1 and 3 against whatever gateway you do run.

Q: Is “zero data retention” with my provider enough? A: No — it is a contractual control, not a technical one. See the companion post, When inference providers leak prompts, on the November 2026 Dragos and OpenRouter incidents.

Q: How quickly should we remediate? A: Federal civilian agencies have until 2 December 2026 to remediate CVE-2026-40217. For the November multi-tenant batch (controls 9–12), upgrade LiteLLM to at least 1.111.0 if you run it. For non-LiteLLM gateways, audit against the controls above regardless.

Takeaway

The November 2026 LiteLLM wave is a reminder that the AI gateway itself — not the model behind it — is the surface worth hardening. Seventeen controls, grouped by surface: agent, provider, tenant isolation, data plane and agent credentials. Review your current deployment against this list before you review your model routing policy. Review your tenant-isolation configuration if you run a shared gateway for multiple teams.

Review your gateway’s security posture with our team at talk-to-us.

Related articles

Deploy sovereign AI on your infrastructure.