If you self-host the LiteLLM proxy with Azure models, upgrade to 1.106.9, 1.108.6, 1.109.1 or later and rotate the master key if low-trust users had access

LiteLLM proxy: a normal chat request could leak the master key and provider API keys through an Azure error · Security incident · GitHub (BerriAI/litellm) · BerriAI · Nov 12, 2026

What happened

BerriAI published GHSA-2rwg-2wh4-7c4f (High, 7.7) on 12 Nov 2026. On deployments with at least one azure/ or azure_ai/ model and no AZURE_API_KEY or AZURE_OPENAI_API_KEY env var set, the proxy's request-body blocklist missed the Azure Entra credential parameters. An authenticated low-privilege caller could set client_id to a reference to a server env var such as LITELLM_MASTER_KEY; Entra rejected it and the proxy returned the error with the resolved value in it. That exposes env vars like the database URL, provider API keys and the master key, which gives full proxy admin control.

How to prevent it

Keep AI gateways patched, don't return raw upstream error messages to callers, and give each provider key its own spend limit so a leaked key can be rotated without downtime.

Fix prompt for your own AI tool

Copy this into your own AI tool (Cursor, Lovable, Claude Code, Bolt…). It's general guidance written by us. Review what the AI suggests before applying it.

I'm a beginner and want to make sure my API keys are safe in my LiteLLM project. 1) Search the code for hardcoded keys or tokens and for secrets in variables that ship to the browser (NEXT_PUBLIC_, VITE_, REACT_APP_). List the file and line, but don't print the values. 2) For each one, tell me whether it's meant to be public (like a Supabase anon key) or secret. 3) For secret ones, show me how to move them to server-side env vars and call the provider through a server route. 4) Give me the steps to rotate each exposed key in the provider's dashboard and set a spending limit. 5) Make sure .env is in .gitignore and in my AI tool's ignore file. Don't change anything until I've approved your plan. Never ask me to paste API keys, passwords or .env contents; tell me where to check them myself.

Why this keeps happening: leaked secrets & api keys

Secret keys placed in front-end code, mobile bundles or public repositories can be found by automated scanners and abused, often running up large bills on AI or cloud accounts before anyone notices.

A quick checklist before you ship

More on this: every leaked secrets & api keys story and our related guide.

Tools involved

LiteLLM stories

Related stories

Source: original post on GitHub (BerriAI/litellm) ↗. Summarised in our own words; numbers are as stated by the source. Browse all stories.

The Honest Build. Real stories, not hype.

Every week: real stories of what building with AI actually took, the one lesson worth keeping, and the security slip-ups to avoid. Free, unsubscribe anytime. Weekly, every Friday.