LIVE FEED
ATLAS OWASP CRITICAL Active exploitation · Immediate action required RELEVANCE ▲ 9.2

AI Agents Steal LLM API Keys from LiteLLM, Dify, and Peers

TL;DR CRITICAL
  • What happened: Autonomous AI agents targeted LLM gateway apps to steal and recycle API keys at scale.
  • Who's at risk: Any organisation running internet-exposed LLM proxies or AI app-builders such as LiteLLM, Dify, Langflow, or One API is directly at risk of API key theft.
  • Act now: Rotate all API keys stored in LiteLLM, Dify, One API, and related LLM gateway deployments immediately · Remove default master keys and restrict admin endpoints to authenticated, IP-allowlisted access only · Block unauthenticated access to environment files, source maps, debug routes, and cloud metadata endpoints
AI Agents Steal LLM API Keys from LiteLLM, Dify, and Peers

Overview

Amazon’s threat intelligence team has disclosed an active campaign in which autonomous AI agents systematically hunted for internet-exposed LLM gateway and AI application-builder platforms to extract stored API keys. Using decoy servers within its MadPot honeypot network, Amazon captured detailed agent logs between October 3 and mid-November 2026 that reveal a self-funding attack loop: stolen keys were immediately pooled and used to pay for the LLM calls powering further reconnaissance. The team attributes the activity with moderate confidence to separate China-linked operators, citing Simplified Chinese-language prompts and China-aligned time zone settings embedded in captured records.

Technical Analysis

The tooling assessed to underlie the campaign is ARTEX, an open-source penetration testing framework built around AI agents. An operator provides a target and an objective; a planner agent decomposes the goal into discrete tasks delegated to worker agents that invoke security tooling. At each decision point the agents query an LLM, allowing adaptive, context-aware traversal of a target’s attack surface.

The agents carried a structured playbook of known entry points across targeted products:

  • Default credentials: LiteLLM’s well-known default master key and similar shipped-default secrets.
  • Incomplete installations: Setup wizards left accessible to unauthenticated outsiders.
  • Authentication bypass: The isCliRequest header bypass affecting One API family systems.
  • SSRF via URL-fetch features: Used to reach AWS/cloud metadata services and retrieve instance credentials.
  • Client-side secret leakage: API keys embedded in JavaScript bundles, source maps, debug routes, and .env files.
  • Known CVEs: Specific flaws in Langflow and RAGFlow were listed in the playbook.

Targeted platforms included LLM proxies and gateways (One API, New API, Veloera, Sub2API, LiteLLM) and AI app-builders (Dify, FastGPT, Langflow, RAGFlow, Open WebUI, LobeChat, Ollama). These were prioritised because a single compromised admin interface can expose keys for dozens of upstream AI providers simultaneously.

In a corroborating incident, Cloudflare’s responders observed ARTEX leverage a compromised CI/CD API token with no IP restrictions or rate limiting, triggering 400 database dump requests within a single hour.

Framework Mapping

FrameworkTechniqueRationale
ATLAS AML.T0083Credentials from AI Agent ConfigurationAgents extracted keys from app config and environment files
ATLAS AML.T0098AI Agent Tool Credential HarvestingPooling stolen keys to fund further agent operations
ATLAS AML.T0103Deploy AI AgentARTEX deployed worker agents autonomously against targets
ATLAS AML.T0040AI Model Inference API AccessStolen keys abused for direct model API calls
OWASP LLM06Sensitive Information DisclosureAPI keys leaked via source maps, env files, debug routes
OWASP LLM08Excessive AgencyAutonomous agents acted without human authorisation checkpoints

Impact Assessment

Organisations hosting any of the named platforms on internet-facing infrastructure face immediate risk of full API key compromise across every AI provider integrated into those platforms. Cloud credentials harvested via SSRF extend the blast radius to managed AI services and secret stores. The self-funding nature of the campaign means operators face minimal marginal cost per additional target, enabling indefinite scale.

Mitigation & Recommendations

  1. Rotate all API keys stored in LiteLLM, Dify, One API, and related platforms without delay.
  2. Eliminate default credentials: Change or disable shipped default master keys before any internet exposure.
  3. Restrict admin endpoints to authenticated sessions with IP allowlisting and MFA.
  4. Block metadata service access: Apply IMDSv2 enforcement and network-level controls to prevent SSRF to 169.254.169.254.
  5. Audit client-side assets: Scan JavaScript bundles, source maps, and static files for embedded secrets.
  6. Apply rate limiting and IP restrictions to all CI/CD and programmatic API tokens.
  7. Monitor for ARTEX signatures: Review logs for unusual sequential scanning of AI app admin paths and bulk database query patterns.

References

◉ AI THREAT BRIEFING

Stay ahead of the threat.

Twice-weekly digest of critical AI security developments — every story mapped to MITRE ATLAS and OWASP LLM Top 10. Free.

No spam. Unsubscribe anytime.