litellm - 💡(How to fix) Fix HIGH: No startup validation prevents running with default master key sk-1234 in production

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

LiteLLM starts successfully with sk-1234 as the master key without any warning, validation, or forced rotation. There is no startup check that rejects known default keys. Users who deploy from docker-compose without reading documentation will run in production with the well-known default key.

Error Message

  1. If default is detected, refuse to start and print a clear error

Root Cause

LiteLLM starts successfully with sk-1234 as the master key without any warning, validation, or forced rotation. There is no startup check that rejects known default keys. Users who deploy from docker-compose without reading documentation will run in production with the well-known default key.

RAW_BUFFERClick to expand / collapse

CWE-521: No Startup Validation That Master Key Has Been Changed

Severity: HIGH (CVSS 7.5)

Location

+ '' + docker-compose.yml + '' + and + '' + .env.example + '' + :

The .env.example shows LITELLM_MASTER_KEY=sk-1234 and the docker-compose does not enforce any change.

Description

LiteLLM starts successfully with sk-1234 as the master key without any warning, validation, or forced rotation. There is no startup check that rejects known default keys. Users who deploy from docker-compose without reading documentation will run in production with the well-known default key.

Impact

Production deployments with sk-1234 are trivially exploitable. A Shodan/Censys scan for LiteLLM instances on port 4000 combined with the default key would immediately yield full access to dozens or hundreds of production AI gateways.

Remediation

  1. On startup, check if LITELLM_MASTER_KEY matches any known default ("sk-1234", "os.environ/LLM_MASTER_KEY")
  2. If default is detected, refuse to start and print a clear error
  3. Log a prominent warning at minimum
  4. Add startup check for POSTGRES_PASSWORD=dbpassword9090

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING