Skip to content

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

How we use AISend a correction

Illustration accompanying An exposed LiteLLM gateway hands over every key in PID 1's environment
Generated illustration

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
Why these scores

Claim ledger

Ranked by verification strength, evidence, and original report placement.

  1. [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.

    ReportedSupportedSource: Microsoft Security Research, as summarised by dev.toView cited source
  2. [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.

    ReportedSupportedView cited source
  3. [3]

    Python, curl, and wget are used as alternatives to place an ELF binary in /tmp and execute it with a service-like name.

    ReportedSupportedView cited source

Sources

1 independent publisher whose own reporting we read for this story.

  1. dev.to

    1 article · August 27, 2026

    When AI Infrastructure Becomes the Target: Attacks Observed on LiteLLM, RAGFlow, and Kestra

Share your take

Let Clarity write the post for you.

Signed-in readers get a short post drafted on this story in the register they choose — narrative, analytical, or a direct position — editable to the last word before it goes anywhere. The share buttons at the top of this story work without an account.

Topics and entities

Follow any of these and your For You feed starts watching them — no settings page required.

Topics

Loading related stories