
Amazon identifies campaign of AI agents targeting AI apps to steal API keys
Amazon's intelligence team detected AI agents that exploit vulnerabilities in apps such as LiteLLM, Dify, and One API to capture provider keys and use them in automated attacks.
Amazon Threat Intelligence revealed, this Friday, a coordinated campaign by artificial intelligence agents that seeks vulnerabilities in AI applications exposed on the internet, with the aim of stealing API keys from providers such as OpenAI, Anthropic and others.
AI Agent Campaign
Logs captured by decoy servers – part of a network called MadPot – show that the agents, developed using the ARTEX penetration testing tool, continuously scan services like LiteLLM, One API, Dify, Langflow, and RAGFlow in search of stored credentials. When they find a functional key, they add it to a shared pool for later use.
The agents operate under instructions from human operators who define goals; a planner divides the goal into tasks for worker agents, who execute security tools and send results to a large language model (LLM) to decide the next step.
Targets include LLM gateways and proxies (One API, New API, Veloera, Sub2API, LiteLLM) and AI application builders (Dify, FastGPT, Langflow, RAGFlow, Open WebUI, LobeChat, Ollama). The disclosed playbook lists default credentials – such as LiteLLM's default master key – incomplete installations, authentication failures (e.g., bypass via the isCliRequest header in One API), and SSRF vulnerabilities that allow access to cloud metadata.
In a separate case, the Cloudflare team observed that ARTEX obtained a compromised API token used in CI/CD pipelines without IP restriction or rate limiting. The token was used to trigger about 400 database dump requests in one hour, although Cloudflare has not confirmed whether data was effectively extracted.
Amazon attributes, with moderate confidence, the campaign to China-linked groups, based on prompts in simplified Chinese and regional time zones. The team emphasizes that it could not validate the results reported by the agents, but the logs clearly demonstrate the techniques and targets pursued.
Recommendations for Defenders
Experts recommend treating AI applications, gateways, and inference endpoints as critical production systems: change default credentials, complete installations, apply patches (e.g., Langflow CVE‑2025‑3248, RAGFlow CVE‑2026‑28797), and monitor for unexpected usage or anomalous spending. It is also advisable to quickly rotate exposed keys, apply IP restrictions to Cloudflare API tokens, and watch for Worker scripts with names containing the prefix artex‑.
CyberX Technical Analysis
ARTEX, an open-source AI-based penetration testing tool, functions as an orchestrator that combines automatic planning, task execution by specialized agents, and results evaluation by an LLM. In the observed campaign, the typical flow includes:
- Target Discovery: scanning public AI services using internet scanning services, certificate transparency logs, and searches in code repositories (GitHub, npm, PyPI).
- Credential Extraction: exploiting default credentials (e.g., LiteLLM's master key), authentication failures (bypass via isCliRequest), and SSRF vulnerabilities to access cloud metadata containing tokens.
- Key Validation: agents test stolen keys against AI provider endpoints to confirm their functionality before adding them to the pool.
- Automated Use: valid keys are employed to generate queries to language models, fueling the campaign itself to collect more credentials.
From an attack surface perspective, the main vectors are:
- Incomplete or misconfigured AI application installations that expose configuration files containing keys.
- Management endpoints without authentication or with weak authentication.
- Custom headers that can be manipulated to bypass identity checks.
- Cloud metadata services accessible via SSRF.
Potential impacts include unauthorized use of AI models (generating unexpected costs), exfiltration of sensitive data processed by the models, and, in cases of integration with CI/CD pipelines, compromise of production environments.
Technical Recommendations:
- Immediately apply patches for known vulnerabilities (e.g., Langflow CVE‑2025‑3248, RAGFlow CVE‑2026‑28797).
- Eliminate default credentials and require key rotation after deployment.
- Implement Identity and Access Management (IAM) and limit API token usage by IP and rate.
- Monitor AI endpoint access logs for anomalous usage patterns, such as call spikes or model requests outside business hours.
- Utilize secret scanning tools in repositories and container images to detect exposed keys before publication.
There is no public evidence of successful exploitation that caused data leakage beyond the key collection tests described in the decoy logs.
CyberX SOC Intelligence Bulletin
The ARTEX-based AI agent campaign demonstrates an automated attack model that combines surface scanning, credential extraction, and API key usage to operate at scale. Although there are no confirmed Indicators of Compromise (IoCs) in public sources, Amazon has disclosed a set of IP addresses associated with the traffic observed on the decoy servers.
Indicators of Compromise (IoCs)
- IP Addresses: list of 11 addresses published in the FBI FLASH alert (not reproduced here due to disclosure policy).
- Cloudflare Worker scripts with the prefix artex‑ (e.g., artex‑pgrecon‑001, artex‑pgw‑alpha).
- Request headers isCliRequest used for bypass in One API family APIs.
Recommended Mitigations
- Revoke and regenerate all exposed API keys in listed AI applications (LiteLLM, Dify, One API, etc.).
- Immediately apply patches for CVE‑2025‑3248 (Langflow) and CVE‑2026‑28797 (RAGFlow).
- Disable default credentials and complete pending AI application installations.
- Configure IP restrictions and rate limits for Cloudflare and other providers' API tokens.
- Implement monitoring for anomalies in AI model consumption (call spikes, non-standard usage).
Response Procedures
- Immediately isolate suspicious accounts or tokens from unauthorized use.
- Collect access logs to AI endpoints and compare with disclosed IPs.
- Run secret scanning on internal repositories and container images to detect similar keys.
- Notify cloud provider security teams if there is evidence of account-level token compromise.
- Document all actions and preserve evidence for potential forensic investigation.
Frequently Asked Questions
What is the ARTEX tool?
ARTEX is an open-source AI-based penetration testing tool that orchestrates automated planning, task execution, and result evaluation by an LLM.
Which AI applications were targeted?
The campaign targeted AI gateways and proxies such as One API, LiteLLM, and AI builders like Dify, Langflow, and RAGFlow.
How did the attackers use the stolen API keys?
They added functional keys to a shared pool for later use in automated attacks, including triggering database dump requests.
Who is suspected to be behind the campaign?
Amazon attributes the campaign to China‑linked groups based on Chinese prompts and regional time zones.
What are the recommended mitigations?
Experts recommend changing default credentials, completing installations, patching vulnerabilities, rotating exposed keys, applying IP restrictions, and monitoring for anomalous usage.


