🇰🇷 한글 설명
Kimi Code(@moonshot-ai/kimi-code) 0.27.0 이전 버전의 FetchURL 기능은 assertSafeFetchTarget에서 호스트명과 IP 리터럴 거부 목록(denylist)만으로 SSRF를 방어하며, DNS 해석이나 HTTP 리다이렉트 이후 재검증을 수행하지 않습니다. 이로 인해 공격자가 내부 주소로 연결되는 공개 호스트명이나 리다이렉트를 이용해 차단 대상인 내부 네트워크 서비스에 접근할 수 있습니다. FetchURL은 기본 자동 승인 도구에 포함되어 수동 모드에서도 사용자 확인 없이 실행됩니다.
💡 쉬운 설명
AI 코딩 도구가 웹 주소를 대신 열어보는 기능에 보안 허점이 있어, 악의적인 웹 페이지가 이 기능을 이용해 회사 내부망의 서버에 접근하도록 만들 수 있습니다. 사용자가 확인하지 않아도 이런 요청이 자동으로 실행될 수 있습니다.
🇺🇸 원문 (English)
Kimi Code (@moonshot-ai/kimi-code) before 0.27.0 implements FetchURL SSRF hardening as a static hostname and IP-literal denylist in assertSafeFetchTarget, without resolving DNS or re-validating hosts after HTTP redirects. An attacker who can influence a FetchURL call (for example via prompt injection) can supply a crafted public hostname that resolves to loopback or another internal address, or a public URL that redirects to such a target, and thereby reach internal network services that the denylist was intended to block. FetchURL is included in the default auto-approve tool set, so the call does not require interactive user confirmation in manual mode.
📍 영향받는 시스템
@moonshot-ai/kimi-code 0.27.0 미만 버전
⚔️ 공격 벡터
프롬프트 인젝션 등으로 FetchURL 호출을 유도하고, 내부 주소로 해석되는 공개 호스트명이나 내부로 리다이렉트되는 URL을 전달하여 내부 서비스에 접근
🛡️ 대응 방법
@moonshot-ai/kimi-code를 0.27.0 이상으로 업그레이드하고, 신뢰할 수 없는 콘텐츠 처리 시 FetchURL 자동 승인을 비활성화
🔧 검증 코드
출력된 버전이 0.27.0 미만이면 취약하므로 업그레이드가 필요하며, 0.27.0 이상이면 패치가 적용된 것입니다. 설치되어 있지 않으면 결과가 비어 있습니다.
npm ls -g @moonshot-ai/kimi-code 2>/dev/null | grep kimi-code