AI agents target exposed AI applications to harvest provider keys

src-7fe54da3

Amazon Threat Intelligence says operators used AI penetration-testing agents to search internet-exposed AI applications for provider credentials, then reported using the keys to access models and continue looking for additional secrets. The team captured the agents’ records through decoy servers, but cautioned that it did not observe the reported activity on the target systems and cannot verify whether the agents’ claimed results were accurate.

The records were sent to MadPot, Amazon’s network of decoy servers configured to resemble popular large language model services. From October 3 through late the following week, requests from the agents sometimes included their campaign history, operator instructions and reported findings. Amazon assessed with moderate confidence that the activity used ARTEX, an open-source AI penetration-testing tool. It also assessed, with moderate confidence, that separate China-linked groups operated the agents, citing evidence including Simplified Chinese prompts and China time-zone settings.

Credential hunting focused on AI services

The campaign sought exposed AI applications that store credentials for multiple model providers. Targets named in the captured records included gateways and proxies such as LiteLLM, One API, New API, Veloera and Sub2API, as well as application platforms including Dify, FastGPT, Langflow, RAGFlow, Open WebUI, LobeChat and Ollama. The agents’ playbook described ways to find weak or unauthenticated administrative and provider-settings interfaces, exploit unfinished installations, and search for secrets in client-side JavaScript, source maps, debug routes and environment files.

Other approaches listed in the records included use of LiteLLM’s default master key, an authentication bypass involving the isCliRequest header in One API family systems, and server-side request forgery through URL-fetch features to reach cloud metadata services. The playbook also identified known flaws in Langflow and RAGFlow. Where cloud credentials were found, the agents reportedly prioritized managed services used to host AI models, secret stores and application identities, with premium AI models favored over general cloud access.

To locate exposed credentials, the agents reportedly searched internet scanning services and certificate transparency logs, as well as GitHub repositories, event archives, npm and PyPI packages, container image layers, notebooks, model-hosting spaces, paste sites and Telegram channels. Amazon said the records span hundreds of targets across AI platforms and other systems. It said it notified AWS customers who may have been affected.

Related activity highlights token exposure risks

Separately, Cloudflare incident responders described an ARTEX case involving a compromised account-level API token previously used for CI/CD. The token lacked IP restrictions and rate limiting. Activity associated with it included 400 database dump requests within an hour; Cloudflare has not said whether the requests returned data. The company said the compromise most likely originated through a third-party cloud provider, but did not disclose how the token was initially stolen.

Cloudflare reported that scripts with names matching different ARTEX tasks appeared as new Workers in the account. The activity exceeded 69 requests per minute across several account areas and included attempts to establish persistence and validate session tokens for third-party applications. The company has not disclosed whether persistence succeeded. It said static CI/CD tokens that did not expire and had broad permissions were a common root cause in multiple investigations involving customer environments and Cloudflare accounts.

Amazon’s findings add to earlier reporting by Microsoft about agentic tools used to search GitHub for exposed secrets, including AI inference keys. Microsoft also described an earlier RAGFlow incident involving a hidden hook that captured provider keys as users entered them, and a LiteLLM gateway compromise that exposed keys. Those incidents were not attributed to ARTEX.

Defensive checks for AI and identity credentials

The captured playbook included Langflow CVE-2025-3248, an unauthenticated remote code execution flaw affecting versions before 1.3.0; version 1.3.0 is the fixed release. CISA added the vulnerability to its Known Exploited Vulnerabilities catalog on May 5, 2025. For RAGFlow, the playbook referenced CVE-2026-28797, a server-side template injection issue that can allow operating system command execution by a logged-in user. The advisory says self-registration is enabled by default; it identifies version 0.24.0 and earlier as affected and recommends sandboxed template rendering. The source advisory lists no patched version, while RAGFlow’s 0.25.0 release notes describe an SSTI fix.

Amazon said the techniques depended on familiar security gaps, while automation increased attackers’ speed and persistence. Organizations should treat AI applications, model gateways and inference endpoints as production systems: replace default credentials, secure or remove unfinished installations, and require authentication for management interfaces and inference endpoints. Teams should search source repositories, configuration files, environment variables, deployment scripts, CI/CD pipelines, databases and container images for embedded secrets, then rotate credentials that may have been exposed.

Cloudflare recommends setting expiration dates and client IP restrictions on its API tokens; both controls are optional. Defenders can also review Worker deployments for names beginning with artex-, artex-pgrecon-, artex-pgw- or artex-do-, and monitor for unexpected token use, unusual model consumption and unexplained spending. Amazon’s report underscores that provider keys are identity-bearing credentials: if they are exposed, attackers may be able to act through the accounts and services those keys authorize.