WireMock is a tool for mocking HTTP services. The proxy mode of WireMock, can be protected by the network restrictions configuration, as…
GitHub_M·CWE-290·Published 2023-09-06
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 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.
### Impact 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](https://wiremock.org/docs/configuration/#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. ### Affected versions - WireMock 3,x until 3.0.3 (security patch), on default settings in environments with access to the network - WireMock 2.x until 2.35.1 (security patch), on default settings in environments with access to the network - Python WireMock until 2.6.1 - WireMock Studio - all versions, this proprietary product was discontinued in 2022 ### Patches - WireMock 3.0.3 + the 3.0.3-1 Docker image - WireMock 2.35.1 + the 2.35.1-1 Docker image - backport to WireMock 2.x - Python WireMock 2.6.1 ### Workarounds For WireMock: - Option 1: Configure WireMock to use IP addresses instead of the domain names in the outbound URLs subject to DNS rebinding - Option 2: Use external firewall rules to define the list of permitted destinations For WireMock Studio: N/A. Switch to another distribution, there will be no fix provided. The vendor of former WireMock Studio recommends migration to [WireMock Cloud](https://www.wiremock.io/product) ### References - CVE-2023-41327 - Related issue in the WireMock Webhooks Extension
### Impact 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](https://wiremock.org/docs/configuration/#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. ### Affected versions - WireMock 3,x until 3.0.3 (security patch), on default settings in environments with access to the network - WireMock 2.x until 2.35.1 (security patch), on default settings in environments with access to the network - Python WireMock until 2.6.1 - WireMock Studio - all versions, this proprietary product was discontinued in 2022 ### Patches - WireMock 3.0.3 + the 3.0.3-1 Docker image - WireMock 2.35.1 + the 2.35.1-1 Docker image - backport to WireMock 2.x - Python WireMock 2.6.1 ### Workarounds For WireMock: - Option 1: Configure WireMock to use IP addresses instead of the domain names in the outbound URLs subject to DNS rebinding - Option 2: Use external firewall rules to define the list of permitted destinations For WireMock Studio: N/A. Switch to another distribution, there will be no fix provided. The vendor of former WireMock Studio recommends migration to [WireMock Cloud](https://www.wiremock.io/product) ### References - CVE-2023-41327 - Related issue in the WireMock Webhooks Extension
WireMock es una herramienta para imitar servicios HTTP. El modo proxy de WireMock se puede proteger mediante la configuración de restricciones de red, como se documenta en Preventing proxying y la grabación desde direcciones de destino específicas. Estas restricciones se pueden configurar utilizando los nombres de dominio y, en tal caso, la configuración es vulnerable a los ataques de vinculación de DNS. Se aplicó un parche similar en WireMock 3.0.0-beta-15 para las extensiones WireMock Webhook. La causa principal del ataque es un defecto en la lógica que permite una condición de ejecución desencadenada por un servidor DNS cuya dirección expira entre la validación inicial y la solicitud de red saliente que podría ir a un dominio que se suponía estaba prohibido. Se requiere control sobre un servicio DNS para explotar este ataque, por lo que tiene una alta complejidad de ejecución y un impacto limitado. Este problema se solucionó en la versión 2.35.1 de wiremock-jre8 y wiremock-jre8-standalone, la versión 3.0.3 de wiremock y wiremock-standalone, la versión 2.6.1 de la versión Python de wiremock y las versiones 2.35.1-1 y 3.0.3-1 del contenedor Docker wiremock/wiremock. Se recomienda a los usuarios que actualicen. Los usuarios que no puedan actualizar deben configurar reglas de firewall para definir la lista de destinos permitidos o configurar WireMock para usar direcciones IP en lugar de nombres de dominio.
| Version | Type | Source | Base | Exp | Impact | Vector |
|---|---|---|---|---|---|---|
| 3.1 | Primary | NVD | 6.6 | 0.7 | 5.9 | CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H |
| 3.1 | Primary | cve.org | 3.9 | — | — | CVSS:3.1/AV:A/AC:H/PR:H/UI:N/S:U/C:L/I:L/A:L |
| 3.1 | Primary | cve.org | 3.9 | — | — | CVSS:3.1/AV:A/AC:H/PR:H/UI:N/S:U/C:L/I:L/A:L |
| 3.1 | Secondary | NVD | 3.9 | 0.5 | 3.4 | CVSS:3.1/AV:A/AC:H/PR:H/UI:N/S:U/C:L/I:L/A:L |
| 3.1 | Secondary | GHSA | 3.9 | — | — | CVSS:3.1/AV:A/AC:H/PR:H/UI:N/S:U/C:L/I:L/A:L |