🇰🇷 한글 설명
cors-anywhere 인스턴스가 오픈 프록시로 설정된 경우, 인증되지 않은 외부 사용자가 서버를 통해 임의의 대상에 HTTP 요청을 보내는 SSRF 공격이 가능합니다. 공격자는 이를 통해 내부 전용 엔드포인트나 클라우드 메타데이터 서비스에 접근하여 자격 증명을 탈취하거나 내부 API를 조작할 수 있습니다.
💡 쉬운 설명
누구나 사용할 수 있게 열려 있는 대리 서버(프록시)를 이용해, 공격자가 내부 네트워크에 몰래 침입하는 공격입니다. 이를 통해 회사의 중요한 비밀 정보나 관리자 권한을 훔쳐갈 수 있습니다.
🇺🇸 원문 (English)
Rob--W cors-anywhere instances configured as an open proxy allow unauthenticated external users to induce the server to make HTTP requests to arbitrary targets (SSRF). Because the proxy forwards requests and headers, an attacker can reach internal-only endpoints and link-local metadata services, retrieve instance role credentials or other sensitive metadata, and interact with internal APIs and services that are not intended to be internet-facing. The vulnerability is exploitable by sending crafted requests to the proxy with the target resource encoded in the URL; many cors-anywhere deployments forward arbitrary methods and headers (including PUT), which can permit exploitation of IMDSv2 workflows as well as access to internal management APIs. Successful exploitation can result in theft of cloud credentials, unauthorized access to internal services, remote code execution or privilege escalation (depending on reachable backends), data exfiltration, and full compromise of cloud resources. Mitigation includes: restricting the proxy to trusted origins or authentication, whitelisting allowed target hosts, preventing access to link-local and internal IP ranges, removing support for unsafe HTTP methods/headers, enabling cloud provider mitigations, and deploying network-level protections.
📍 영향받는 시스템
Open Proxy로 설정된 모든 cors-anywhere 인스턴스
⚔️ 공격 벡터
조작된 URL을 포함한 HTTP 요청을 프록시 서버로 전송하여 내부 네트워크로 요청을 전달
🛡️ 대응 방법
신뢰할 수 있는 도메인만 허용하도록 설정하거나, 내부 IP 대역 및 메타데이터 서비스 접근을 차단해야 합니다.
🔧 검증 코드
응답 결과가 200 OK이거나 내부 메타데이터 정보가 포함되어 있다면 SSRF 취약점이 존재하는 것입니다.
curl -I http://<target-proxy-url>/https://169.254.169.254/latest/meta-data/