If you self-host an AI gateway or app builder, take it off the public internet, change the default admin key, and rotate every provider key stored inside

Amazon caught attackers' AI agents stealing provider keys from exposed LiteLLM, One API and Dify installs · Security incident · AWS Security Blog · AWSSecurityInfo · Nov 13, 2026

What happened

Amazon Threat Intelligence said on 13 Nov 2026 that its MadPot decoy servers, posing as LLM inference APIs, received requests from 3 Oct to 5 Nov that carried AI agents' own campaign records. It assesses with moderate confidence the agents ran on ARTEX, an open-source agentic pentest framework. The main campaign found internet-exposed LLM gateways and app builders (One API, New API, Veloera, Sub2API, LiteLLM, Dify, FastGPT, Langflow, RAGFlow, Open WebUI, LobeChat, Ollama), pulled out the upstream provider keys, checked they worked and pooled them, with stolen keys paying for the models that ran further hunting. The playbook used default admin credentials such as the LiteLLM default master key, unfinished installs, login-free settings endpoints, an isCliRequest header bypass in One API-family systems, SSRF to cloud metadata, Langflow CVE-2025-3248 and RAGFlow CVE-2026-28797, plus keys left in client-side JavaScript, source maps and env files. Amazon says none of the techniques were new and it cannot verify the outcomes the agents recorded.

How to prevent it

Never expose AI gateway or app-builder admin pages to the internet, change default master keys and finish or remove half-done installs, keep provider keys out of client-side code, and set spend limits and usage alerts on every provider key.

Fix prompt for your own AI tool

Copy this into your own AI tool (Cursor, Lovable, Claude Code, Bolt…). It's general guidance written by us. Review what the AI suggests before applying it.

I'm a beginner and want to make sure my API keys are safe in my LiteLLM project. 1) Search the code for hardcoded keys or tokens and for secrets in variables that ship to the browser (NEXT_PUBLIC_, VITE_, REACT_APP_). List the file and line, but don't print the values. 2) For each one, tell me whether it's meant to be public (like a Supabase anon key) or secret. 3) For secret ones, show me how to move them to server-side env vars and call the provider through a server route. 4) Give me the steps to rotate each exposed key in the provider's dashboard and set a spending limit. 5) Make sure .env is in .gitignore and in my AI tool's ignore file. Don't change anything until I've approved your plan. Never ask me to paste API keys, passwords or .env contents; tell me where to check them myself.

Why this keeps happening: leaked secrets & api keys

Secret keys placed in front-end code, mobile bundles or public repositories can be found by automated scanners and abused, often running up large bills on AI or cloud accounts before anyone notices.

A quick checklist before you ship

More on this: every leaked secrets & api keys story and our related guide.

Tools involved

LiteLLM stories, Dify stories, Langflow stories, Open WebUI stories, Ollama stories

Related stories

Source: original post on AWS Security Blog ↗. Summarised in our own words; numbers are as stated by the source. Browse all stories.

The Honest Build. Real stories, not hype.

Every week: real stories of what building with AI actually took, the one lesson worth keeping, and the security slip-ups to avoid. Free, unsubscribe anytime. Weekly, every Friday.