Model gateways get treated as plumbing, but keys and conversations pile up there
The gateway an enterprise sets up to manage its models in one place holds the keys to several model providers and handles the full context of every agent call. It should be governed in the same tier as the systems that hold secrets and handle identity, not treated as a piece of plumbing that works once it is installed.
The clearest evidence for this comes from attackers themselves. In a post published on 13 November, Amazon’s threat intelligence team said that from 3 October to 5 November, MadPot, its global network of decoy sensors, presented itself as popular large language model APIs and received requests from offensive AI agents. The agents treated the decoys as their model backend, and the requests carried task context, system prompts, tool histories and the findings so far. Amazon is also clear that it cannot verify the outcomes the agents reported; the records only show what the attackers were pursuing.
The attackers’ own agents had sent their operating records to a fake model server. My first reaction was not how clever the attack was. It was that enterprise agents work the same way.
Every time an agent calls a model, it sends out what it knows
A model does not remember its previous calls. An agent can carry on because the framework, with each call to the model, sends along the conversation so far, the results returned by tools, the rules, and its intermediate judgements. Amazon’s post makes the same point: these frameworks keep the history of past conversations, so a single request often contains the history of an entire campaign.
Inside an enterprise, an agent that looks up accounts, reads contracts or answers customers sends context that contains customer data, fragments of internal documents, and sometimes tokens that came back in a tool response. That content does not appear only at the model’s end. Every layer the request passes through, the gateway, a proxy, the inference server, and the logs that record requests, may see a complete copy.
A gateway puts keys and conversations in the same place
The most prominent campaign Amazon recorded was large-scale theft of keys for accessing AI models. Stolen keys were fed into the attack framework’s own model gateway, where they paid for the inference used to hunt for more keys. Targets fell into two groups: model gateways and proxies such as LiteLLM and One API, and AI application builders such as Dify, Langflow and Open WebUI. The agents went after systems that hold keys for many providers, and Amazon gives a plain reason: one weakly protected management interface can expose many accounts at once.
Amazon says none of the techniques were new. Installs that had never been initialised could be claimed by whoever got there first. Management and provider-configuration endpoints needed no login. Default administrator credentials were never changed, and the post names LiteLLM’s default master key. URL-fetch features were abused for server-side request forgery, making the server reach cloud metadata services on the attacker’s behalf. And secrets were left in client-side JavaScript, source maps and environment files.
For the side that handles conversations, look at the incident report NEAR AI published on 9 November. An attacker exploited a remote code execution vulnerability in SGLang, an open-source inference engine, to run code on one inference server. According to the report, on 8 November the attacker could also have observed requests being processed on that server, including requests running in confidential mode.
Separately, 18 agents on a legacy deployment, running outside the confidential-computing environment, had their chat history, settings and logs taken. Two customers’ API keys were exposed in those logs and have since been revoked. The logs had become another place where keys were kept. NEAR AI’s own conclusion: confidential computing protects data from the operator and the host, but not from a vulnerability in the software running inside the environment.
A gateway set up for convenience quietly becomes a master key
Take a configuration that is not unusual: an internal platform team sets up an open-source model gateway in the cloud so that departments can share models and costs stay under control. Every provider key is configured inside it, and each application gets only an internal key. To help with debugging, the gateway writes full requests and responses to its logs. So that other teams can adjust their own settings, the admin page sits at an address that is “only reachable if you know the URL”. At launch, people care about latency and the monthly bill. Whether the default admin credentials were changed is not on the acceptance checklist.
On the architecture diagram, this system is a small box between the applications and the models. In practice, the keys it holds let someone else run models on the company’s account, and its logs contain the data that every department’s agents have read. It is a more attractive target than any application next to it, yet it can easily be the last component in the architecture to come under formal security controls.
Arguing for central routing means accepting concentrated risk
I argued in Let employees pick the model, and they’ll pick the strongest that enterprises should not let each employee pick a model, and should have a layer that routes requests automatically. I have not changed that view. Keys kept in one place are easier to manage than keys scattered across the configuration files of dozens of applications, and easier to replace all at once when something goes wrong. The other side of concentration is that if this layer is compromised, the loss is concentrated too.
So in my view a gateway belongs in the same tier as the systems that hold secrets and the identity services. In practice that means: not exposed directly to the internet, no default credentials, keys kept in proper secrets management rather than a configuration file, and logs that record who called what and when, without keeping full conversation content by default. Amazon’s advice points the same way: bring AI applications, model gateways and inference endpoints under the same controls as other production systems, and watch for unexpected spend and unusual usage. Spend deserves particular attention: in this campaign the stolen keys were used to pay for things, so the bill may be the first warning sign.
Attackers using agents do not tire, and the race is over who gets there first
There is one more detail in Amazon’s post: the attackers told their agents to treat keys that had been publicly exposed for more than 30 days as low-value inventory. My reading is that they are racing defenders, betting that a freshly leaked key has not yet been revoked. The side using agents to look for weaknesses does not get tired and needs no new techniques. It only has to find these systems before we have finished taking stock of them. If a model gateway is still treated as the platform team’s convenience tool, it may well be found by someone else before it reaches the next security audit.