AI Agents Hunt for API Keys in Exposed Apps: Stolen Keys
Amazon detects AI agents searching for provider keys in apps like LiteLLM, One API, and Dify. We analyze the risk for SMBs and what to do.
4 min read

In this article
When the Attacker Is Also an AI Agent
Amazon's threat intelligence team has documented a campaign in which the attackers' own AI agents scan AI applications exposed to the internet —such as LiteLLM, One API, and Dify— in search of weak points. The goal is none other than to obtain the AI provider keys stored inside those tools. What stands out about this case is that the evidence comes from the agents' own logs, captured by honeypot servers deployed by Amazon.
According to those logs, the stolen keys were not simply stored away: they were used to run the AI models that powered the search for more keys. In other words, the attack feeds on itself. Each stolen credential becomes fuel for locating the next one. A loop that, in a business environment, can go unnoticed for weeks if no one reviews consumption or access to AI providers.
Why This Matters to an SMB
Two years ago, an SMB that wanted to try AI would set up a proxy like LiteLLM or deploy Dify on a virtual machine to centralize access to OpenAI, Anthropic, or local models. It was fast, cheap, and it worked. The problem is that many of those installations are still there, exposed, with an API key inside that is worth real money and that no one has rotated since demo day.
These tools are not toys: they manage credentials, route requests, and, in many cases, are deployed with default configurations designed for lab environments. If the admin panel is accessible from the internet without strong authentication, the attacker does not need a zero-day. They just need to find the open door. And now they have agents that look for it on their behalf, at scale and without rest.
The impact for an SMB plays out on three fronts. First, the bill: stolen keys are used to consume tokens at your expense, and providers usually charge by usage. Second, data leakage: if the key grants access to an assistant with business context, the attacker can query sensitive information. Third, reputation: a compromised key that appears on forums or is used for illicit activities leaves a mark on your account.
What We Recommend at ForgeNEX
This is not about demonizing AI, but about treating it like any other exposed service. These are the actions we prioritize with the SMBs we work with:
- A real inventory of AI deployments. Before patching, know what is there. LiteLLM, One API, Dify, homegrown proxies, notebooks with API keys in environment variables. If it is not inventoried, it is not protected.
- No admin panels on the internet. Restrict access via VPN, IP allowlist, or, at a minimum, multi-factor authentication. An open key management panel is a breach waiting to happen.
- Key rotation and least privilege. Each application should have its own key, with spending limits and scoped permissions. If one is compromised, it can be revoked without taking down the rest of the business.
- Anomalous consumption alerts. A spike in tokens at three in the morning is not an early-bird user. Configure thresholds at the provider and review access logs.
- Updates and hardening. Apply the fixed versions and review the default configuration of each tool. Critical flaws in management software are not exclusive to this case: we have already seen how N-able had to fix 17 critical flaws in N-central and how the SANSAR malware hid GPU mining in SMBs. The pattern repeats: exposed software, valuable credentials, and a rush to deploy.
ForgeNEX's Analysis
The novelty here is not that there are attackers looking for keys. That has been happening for years. The novelty is that the search is carried out by AI agents that learn and fund themselves with what they steal. For an SMB's IT team, this changes the time equation: the window between exposing a tool and being found is shrinking. What used to require a manual scan is now an automated process that never sleeps.
Our core recommendation is to treat AI keys as production secrets, not as test passwords. That means secrets management, scheduled rotation, network segmentation, and monitoring. And, above all, assuming that any service with a key inside and a public URL is a target. If your team has set up an AI proxy for a pilot, make sure that pilot has an expiration date and a security review before it goes into production.
Generative AI has lowered the barrier to innovation, but also to exposing credentials. The difference between a pilot and an incident is often a configuration review in time.
At ForgeNEX we help SMBs bring order to their AI infrastructure: inventory, hardening, secrets management, and consumption monitoring. If you have LiteLLM, Dify, or another exposed AI proxy, it is worth reviewing it before someone else does.
Source: The Hacker News. Analysis and adaptation: ForgeNEX.
Keep reading
- Cybersecurity and AI: the investment that boosts your results18 November 2026
- AI Pentesting: 15 Questions Before Choosing a Vendor18 November 2026
- SANSAR: Linux malware that hides GPU mining in your SMB16 November 2026
- Nvidia without Jensen Huang: what it means for your SME14 November 2026
- TypoPrompting: 186 fake AI domains that hijack your browser13 November 2026