AI agents hunt API keys in exposed LiteLLM and Dify apps

Amazon says attacker AI agents scan exposed AI apps for stored provider keys. See what to check, which keys to rotate and where Stackurity helps.

AI key-theft campaign: AI agents hunt exposed API keys

TL;DR: Amazon's threat intelligence team says attackers are using AI agents to find internet-exposed AI apps and steal the provider keys stored in them. If you run LiteLLM, One API or Dify, keep them off the public internet and rotate any key they hold.

What happened

The Hacker News reports that Amazon's researchers caught the campaign with decoy servers. The attackers' agents scan for weak spots in tools like LiteLLM, Dify and One API, which sit in front of AI models and keep the keys for those providers. The captured logs show that stolen keys were then used to pay for the models that powered the hunt for more keys, so one leaked key helps the attacker find the next. No CVE is named in the report.

Am I affected?

You are exposed if one of these gateway or workflow apps is reachable from the internet, or if it stores provider keys in its configuration or database. Check which ports your servers and containers expose, who can sign in to the admin interface, and whether the app runs with default settings. Look at your AI provider's usage and billing pages for calls you do not recognise. If you see any, revoke the key at the provider first and issue a new one.

How to check with Stackurity

Be clear about the limits: Stackurity does not detect this campaign or a weak setup. It can help in two ways. It finds keys, tokens and passwords written in files on your servers and in repositories, grades each by where it sits, and tracks a rotate-by date, so you know which keys to replace and can see when a new scan confirms the old one is gone. It also matches the packages and libraries it inventories against advisories every hour, so a known flaw in an AI app you deploy as a package or image can surface as an upgrade. See the remediation documentation for how fixes are tracked, and our guide to responding to a leaked key. Stackurity Cloud has a 14-day trial: start a free trial.