🇰🇷 한글 설명
WireMock의 프록시 모드에서 도메인 이름을 기반으로 네트워크 제한을 설정할 때 DNS 리바인딩 공격에 취약할 수 있는 결함이 발견되었습니다. DNS 서버의 응답을 조작하여 검증 단계와 실제 요청 단계 사이의 시간차(Race Condition)를 이용해 금지된 도메인으로 요청을 보낼 수 있습니다.
💡 쉬운 설명
보안 규칙을 도메인 이름으로 설정했을 때, 공격자가 DNS 정보를 중간에 바꿔치기하여 허용되지 않은 곳으로 데이터를 보내게 만드는 공격입니다. 이를 막으려면 도메인 대신 IP 주소를 직접 사용하거나 최신 버전으로 업데이트해야 합니다.
🇺🇸 원문 (English)
WireMock is a tool for mocking HTTP services. The proxy mode of WireMock, can be protected by the network restrictions configuration, as documented in Preventing proxying to and recording from specific target addresses. These restrictions can be configured using the domain names, and in such a case the configuration is vulnerable to the DNS rebinding attacks. A similar patch was applied in WireMock 3.0.0-beta-15 for the WireMock Webhook Extensions. The root cause of the attack is a defect in the logic which allows for a race condition triggered by a DNS server whose address expires in between the initial validation and the outbound network request that might go to a domain that was supposed to be prohibited. Control over a DNS service is required to exploit this attack, so it has high execution complexity and limited impact. This issue has been addressed in version 2.35.1 of wiremock-jre8 and wiremock-jre8-standalone, version 3.0.3 of wiremock and wiremock-standalone, version 2.6.1 of the python version of wiremock, and versions 2.35.1-1 and 3.0.3-1 of the wiremock/wiremock Docker container. Users are advised to upgrade. Users unable to upgrade should either configure firewall rules to define the list of permitted destinations or to configure WireMock to use IP addresses instead of the domain names.
📍 영향받는 시스템
wiremock-jre8/standalone < 2.35.1, wiremock/standalone < 3.0.3, python wiremock < 2.6.1, wiremock Docker < 2.35.1-1 또는 3.0.3-1
⚔️ 공격 벡터
DNS 리바인딩을 이용한 DNS 서버 제어 및 레이스 컨디션 유도
🛡️ 대응 방법
WireMock을 최신 보안 패치 버전으로 업그레이드하거나, 도메인 대신 IP 주소를 사용하거나, 방화벽 규칙을 통해 목적지를 제한하십시오.
🔧 검증 코드
출력된 버전이 취약한 버전 범위(예: wiremock-jre8 2.35.1 미만)에 해당하는지 확인하십시오.
java -jar wiremock-standalone.jar --version || python3 -c "import wiremock; print(wiremock.__version__)"