Skip to content
RCE Write-up Advanced

Inside 90 days of attacks on AI infrastructure

Wiz observed attacks on AI infrastructure honeypots, including exploitation of an authentication bypass in LiteLLM's MCP gateway and a command injection in MCP test endpoints, allowing remote code execution and cryptomining. Attackers also used blind prompt injection against AI agent frameworks and AI-specific post-exploitation to steal credentials.

Yaara Shriki Follow

Published on wiz.io

Wiz Threat Research operates honeypots across AI and ML services including LiteLLM, Flowise, LangChain, Langflow, ChromaDB, Ollama, and others. Over 90 days of telemetry, we observed sustained attack activity against AI infrastructure, with tooling adapted to the specific internals of each service.

Yaara Shriki, on wiz.io

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the authentication bypass was due to returning an empty authenticated object on token validation failure, and the command injection was due to passing user-supplied command strings directly to subprocess execution without validation.

Impact

Attackers could achieve remote code execution, deploy cryptominers, steal credentials, and abuse inference quotas; the report notes that a Starlette host header validation bypass can chain with the command injection for unauthenticated RCE.

What the attacker needed

Internet-facing LiteLLM MCP gateway; Internet-facing MCP server test endpoint; AI agent with shell tool and external input; No authentication required

The fix

The vulnerabilities were fixed in LiteLLM (CVE-2026-59822 and CVE-2026-42271), and defenders should require authentication by default, restrict lateral reach, and monitor at the runtime layer.

How it was found

  1. Send a request to the LiteLLM MCP gateway with any Bearer token, even a single character, to bypass authentication.
  2. Submit a fake MCP stdio server configuration with a command field containing a malicious script to the MCP server test endpoint.
  3. The script downloads and executes a cryptominer, then returns a valid MCP handshake to make the test appear successful.
  4. For blind prompt injection, inject a prompt that instructs the AI agent to run a shell command that triggers a DNS callback to an attacker-controlled domain.
  5. After confirming execution, fetch a payload from Pastebin and execute base64-encoded commands to deploy XMRig.
  6. For post-exploitation, query the running LiteLLM process's Python module state to extract the master key from memory.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

This report describes how attackers break into AI tools that are left exposed on the internet. They found a way to bypass login on a popular AI gateway and a way to run their own commands on the server, then used those to install cryptocurrency miners. They also tricked AI agents into running commands by hiding instructions in prompts.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by Yaara Shriki

View all

2 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.