LiteLLM flaw let attackers pull upstream API keys from Postgres, sparking gateway key storage debate

Early-Sir-932 · reddit · 2026-10-30

A Reddit thread examines the LiteLLM 1.107.0 key-stealing vulnerability: beyond scraping env vars, writeups say it queried the proxy's own Postgres for stored provider credentials. Those are encrypted at rest with a salt key that usually lives in the same process env, so code running inside the proxy can grab both. The author questions whether an LLM gateway should hold long-lived upstream keys at all, and surveys mitigations: scoped per-team keys with spend caps, short-lived per-workload keys from Vault or a self-run broker, os.environ config references to keep keys out of the database, and OIDC via workload identity federation (now supported by Claude) so nothing is stored to steal.

Original post →

More from Infra

Infra channel →