🇰🇷 한글 설명
python-utcp의 utcp-http 플러그인에서 URL 검증 시 신뢰 경계 불일치로 인한 SSRF 취약점입니다. register_manual()은 HTTPS/루프백만 허용하지만, call_tool() 함수들이 재검증하지 않고 OpenAPI 컨버터가 공격자가 선언한 내부 주소를 맹목적으로 신뢰하여 에이전트가 내부 서비스에 접근할 수 있게 됩니다. 1.1.3에서 수정됨.
💡 쉬운 설명
python-utcp 라이브러리가 외부 API 명세를 읽을 때 서버 주소를 제대로 검증하지 않습니다. 공격자가 정상으로 보이는 사이트에 악성 명세를 올려두면, 이를 신뢰하는 시스템이 내부 서비스(로컬호스트, 메타데이터 서비스)에 접근하게 됩니다.
🇺🇸 원문 (English)
python-utcp is the python implementation of UTCP. Prior to 1.1.3, the utcp-http plugin is vulnerable to a blind Server-Side Request Forgery (SSRF) caused by a trust-boundary inconsistency between manual discovery and tool invocation. register_manual() validates the discovery URL against an HTTPS / loopback allowlist, but call_tool() and call_tool_streaming() reuse the resolved tool_call_template.url directly without revalidating, and the OpenAPI converter blindly trusts whatever servers[0].url an attacker-hosted spec declares. An attacker who hosts a malicious OpenAPI spec on a legitimate HTTPS endpoint can declare e.g. servers: [{ url: "http://127.0.0.1:9090" }] or servers: [{ url: "http://169.254.169.254" }]; the OpenAPI converter then produces tools whose URL points at internal services on the agent host. All three HTTP-class protocols (utcp_http.http, utcp_http.streamable_http, utcp_http.sse) shared the same gap. This vulnerability is fixed in 1.1.3.
📍 영향받는 시스템
python-utcp < 1.1.3의 utcp_http.http, utcp_http.streamable_http, utcp_http.sse 프로토콜
⚔️ 공격 벡터
정상 HTTPS 엔드포인트에서 악성 OpenAPI 스펙을 호스팅하고 servers 배열에 http://127.0.0.1:9090 또는 http://169.254.169.254 같은 내부 주소를 선언
🛡️ 대응 방법
python-utcp를 1.1.3 이상으로 업그레이드
🔧 검증 코드
Version이 1.1.3 이상이면 안전, 미만이면 업그레이드 필요
pip show python-utcp | grep Version