BuildNot yet confirmed elsewhere1 publisher3 min readPublished
An exposed LiteLLM gateway hands over every key in PID 1's environment
Microsoft Security Research says intruders who reached exposed LiteLLM, RAGFlow and Kestra deployments went for provider keys and database URLs first. It can name a confident initial vector in only one of the three cases.
The Engineer · Build desk

What happened
- In RAGFlow, a hidden Python hook under the application path altered startup and import routes and wrapped TenantLLM configuration handling, so providers registered after infection leaked their keys.
- In Kestra, a malicious workflow spawned a shell in a worker, and a mounted Docker socket was used to enumerate other containers' Config.Env for cloud keys, database passwords and API tokens.
- Microsoft rates the Kestra authentication bypass CVE-2026-49869 a high-confidence initial vector, calls the LiteLLM CVE chain consistent but unconfirmed, and names no CVE at all for RAGFlow.
Why it matters
- exposure One gateway compromise reaches past the operator's own upstream accounts to the virtual keys handed to internal teams, so the rotation scope is the whole issued key inventory rather than a single credential.
- constraint Microsoft's own condition list puts keys in the process environment, which means the fix is a secrets-management change to how the service is started, not a version bump anyone can ship in a maintenance window.
- decision The offered signals are behavioural: shells and curl under AI service processes, execution from /tmp, Docker socket access, egress after a key registration. Teams now have to decide whether they collect process ancestry inside these containers at all.
- contradiction With no named RAGFlow vector even at low confidence, patching cannot be shown to close that path, which leaves network exposure reduction as the only control an operator can verify.
One file read carries the LiteLLM case. PID 1 inside the container is the service process, so `/proc/1/environ` is the gateway's configuration exactly as it was handed over at startup: provider API keys, master keys, and `DATABASE_URL` in one blob [2]. That last string is what turns a credential read into a credential inventory. With it, the attacker connected to LiteLLM's PostgreSQL and harvested and exfiltrated model configurations and virtual keys [5]. The keys your teams were issued through the gateway are in scope, not only the upstream keys the gateway holds for itself [22].
Read the confidence gradient before the mitigations. Microsoft evaluates the LiteLLM initial access as consistent with a chain of CVE-2026-42271 and CVE-2026-48710, while saying it is not definitively confirmed [1]. For RAGFlow it declines to name a CVE at all, even at low confidence [10]. Only Kestra gets a high-confidence vector, the authentication bypass CVE-2026-49869 [11]. That is one confident entry point across three platforms [25].
The RAGFlow tradecraft is the part worth studying. A hidden Python hook is placed under the application path to alter startup and import routes [8], and the TenantLLM configuration handling is wrapped so that any LLM provider registered after infection leaks its key [9]. Nothing visibly breaks; configuration operations keep working normally while new keys are stolen [15]. The detection signal there is outbound traffic that follows a key registration, not a file hash [16].
Kestra fails in a different direction. A malicious workflow spawns a shell in a worker [12], and a mounted Docker socket lets the attacker enumerate `Config.Env` of other containers for cloud keys, database passwords and API tokens [13]. Persistence, meanwhile, went to the service account's `authorized_keys`, cron, hidden files, and immutable attributes [6]. Immutable attributes mean your cleanup script exits zero and deletes nothing.
Microsoft's control list is four separate deployment decisions. Each lands on a specific step. Keeping the management plane private with authentication, patching and source IP restrictions removes the reach [19]. Moving secrets into a dedicated store instead of the process environment devalues the `/proc/1/environ` read [20][2]. Mounting `/tmp` with `noexec` breaks the drop of an ELF binary executed under a service-like name [21][3], but not the Python hook, which needs no temp file because it runs inside an interpreter that is already up [8]. Not mounting the Docker socket contains the Kestra pivot [21][13]. Default-deny egress is the expensive one, and also the one that stops mining pool and OAST traffic [21][24].
These observations only transfer to your deployment if the management plane is reachable from outside, keys sit in the process environment, `/tmp` is executable, the Docker socket is mounted, and outbound traffic is unrestricted [18]. The mining payload itself is the cheap part; an XMRig-based miner was deployed and competing miners removed [4], and in the Kestra case script output was parked in the platform's own KV API [14]. I would fix reach first and the environment block second, because `/proc/1/environ` and `Config.Env` are the same weakness read from two sides [2][13].
What to watch
- Whether Microsoft later names a specific CVE for the RAGFlow initial breach, which it currently declines to do even at low confidence.
- A LiteLLM release that pulls master and provider keys from a secret store rather than the process environment would remove the /proc/1/environ payoff.
- Whether storing operator script output in a platform's own KV API, as seen in the Kestra case, turns up as a staging channel elsewhere.
Clarity's read
What the record supports and how the coverage leans. The claims behind it follow.
Reality
- Evidence45
- Adoption30
- Hype gap+10
- Incentives55
- Confidence42
Claim ledger
Ranked by verification strength, evidence, and original report placement.
- [1]
Command execution was achieved through an externally exposed LiteLLM gateway; Microsoft evaluates this as consistent with a chain of CVE-2026-42271 and CVE-2026-48710, though it is not definitively confirmed.
- [2]
The attacker reads /proc/1/environ, which holds the environment variables of the PID 1 process inside the container, to gather model provider API keys, master keys, and DATABASE_URL.
- [3]
Python, curl, and wget are used as alternatives to place an ELF binary in /tmp and execute it with a service-like name.
- [4]
An XMRig-based miner is deployed, and competing miners are removed.
- [5]
The attacker connects to the LiteLLM PostgreSQL database using the retrieved DATABASE_URL to harvest and exfiltrate model configurations and virtual keys.
- [6]
Persistence is established using the service account's authorized_keys, cron, hidden files, and immutable attributes.
- [7]
An OAST callback originates from the HTTP client of the RAGFlow application itself, and code execution is observed within the same service context a few days later.
- [8]
The attacker places a hidden Python hook under the RAGFlow application path to alter startup and import routes.
- [9]
The TenantLLM configuration handling is wrapped to steal API keys and model information for LLM providers registered after infection.
- [10]
Microsoft does not confirm the specific CVE that caused the initial RAGFlow breach, even with low confidence.
- [11]
Microsoft assesses the authentication bypass vulnerability CVE-2026-49869 as a high-confidence initial vector.
- [12]
In the Kestra case, a worker spawns a shell from a malicious workflow.
- [13]
The Config.Env of other containers is enumerated via a mounted Docker socket to harvest potential cloud keys, database passwords, and API tokens.
- [14]
XMRig is deployed and subsequent script outputs are stored in the Kestra KV API.
- [15]
Regular AI users have difficulty noticing the compromise; in RAGFlow, configuration operations continue normally while new API keys are being stolen.
- [16]
Observable indicators include the launch of shells, Python, curl, and wget under AI service processes, execution from /tmp, access to the Docker socket, and outbound traffic following API key registration.
- [17]
CPU load from cryptomining and modifications to authorized_keys, cron, or application startup files may also be visible.
- [18]
The stated conditions are that attackers can reach vulnerable or improperly exposed AI management planes, that AI services have access to model keys, database connection strings, virtual keys and the environment variables of other containers, and that outbound communication, execution in /tmp and Docker socket use are not sufficiently restricted.
- [19]
Recommended mitigation: AI management planes are kept private, with authentication, patching, and source IP restrictions applied.
- [20]
Recommended mitigation: API keys are not constantly held in the process environment, using dedicated secret stores and least privilege instead.
- [21]
Recommended mitigation: outbound traffic is denied by default, temporary directories are configured with noexec, and Docker sockets are not mounted.
- [22]
Reported impact includes theft of model provider API keys, LiteLLM master keys, virtual keys and database credentials, persistent access to the AI infrastructure and other containers, unauthorized compute use for cryptomining, and continuous theft of newly registered LLM credentials in RAGFlow after infection.
- [23]
The report is attributed to Microsoft Security Research, dated 2026-08-26, and rated severity High; the affected products named are LiteLLM, RAGFlow and Kestra.
- [24]
Network-side detection guidance covers external access to AI management planes and communications to OAST domains, C2, raw IPs and mining pools, including correlating traffic to sslip.io and non-standard ports.
- [25]
Across the three platforms described, exactly one intrusion has an initial access vector Microsoft assesses with high confidence.
Sources
1 independent publisher whose own reporting we read for this story.
- dev.toWhen AI Infrastructure Becomes the Target: Attacks Observed on LiteLLM, RAGFlow, and Kestra
1 article · August 27, 2026
Topics and entities
Follow any of these and your For You feed starts watching them — no settings page required.
Topics
- Application-Level PersistenceFollow
- LLM Credential and API Key TheftFollow
- AI Infrastructure SecurityFollow
- Detection EngineeringFollow
- CryptojackingFollow
- Container Runtime HardeningFollow