🇰🇷 한글 설명
Chainlit 프레임워크에서 MCP 기능이 활성화된 경우, 인증 없이 POST /mcp 엔드포인트에 접근할 수 있는 취약점이 존재합니다. 공격자는 검증되지 않은 URL과 헤더를 사용하여 서버가 내부 네트워크나 클라우드 메타데이터 엔드포인트로 임의의 요청을 보내도록 유도할 수 있습니다. 이는 인증된 상태 변경 요청, 내부 서비스 탐색 및 포트 스캔으로 이어질 수 있습니다.
💡 쉬운 설명
대화형 AI 앱을 만드는 도구인 Chainlit의 설정 오류로 인해, 해커가 서버를 조종하여 내부 네트워크를 공격하게 만들 수 있습니다. 해커가 보낸 명령을 서버가 대신 수행하게 함으로써 중요한 정보를 빼내거나 내부 시스템을 망가뜨릴 수 있습니다.
🇺🇸 원문 (English)
Chainlit is a Python framework for building production-ready conversational AI applications. From 2.4.0rc0 until 2.12.0, Chainlit deployments with features.mcp.enabled set to true in .chainlit/config.toml expose the POST /mcp endpoint without requiring authentication. For sse and streamable-http transports, ConnectSseMCPRequest and ConnectStreamableHttpMCPRequest in backend/chainlit/types.py accept a user-controlled url and optional headers dictionary without scheme validation, private-address filtering, or an allowlist. The connect_mcp handler in backend/chainlit/server.py passes these values to sse_client() or streamablehttp_client(), allowing the Chainlit server to make blind outbound requests to arbitrary internal or external services, including cloud metadata endpoints, with attacker-controlled Authorization and Cookie headers. The SSE URL sink has existed since 2.4.0rc0, while attacker-controlled header forwarding and streamable-http support were added in 2.6.4. The response is consumed internally and not returned, but the attacker can issue state-changing authenticated requests, discover internal services, scan ports, and probe metadata endpoints. This issue is fixed in version 2.12.0.
📍 영향받는 시스템
Chainlit versions 2.4.0rc0 to 2.12.0 (with features.mcp.enabled set to true)
⚔️ 공격 벡터
인증되지 않은 POST /mcp 요청을 통해 서버가 임의의 내부/외부 URL로 조작된 헤더를 포함한 요청을 보내도록 유도 (SSRF)
🛡️ 대응 방법
Chainlit를 최신 버전인 2.12.0 이상으로 업데이트하십시오.
🔧 검증 코드
출력된 버전이 2.12.0 미만(2.4.0rc0 이상)이면 취약한 상태입니다.
pip show chainlit | grep Version