What’s Vulnerable › Vulnerabilities
CVE-2023-41329: Domain restrictions bypass via DNS Rebinding in WireMock and WireMock Studio
- Severity: medium (CVSS 6.6 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.6% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2023-09-06 · updated 2026-06-17
- Weakness: CWE-290
Description
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.
Affected products
- wiremock Python Wiremock: before 2.6.1 — fixed in 2.6.1
- wiremock Studio: through 2.32.0-17
- wiremock: before 2.35.1; from 3.0.0 before 3.0.3 — fixed in 2.35.1, 3.0.3
- Wiremock Docker: from 2.0.0 before 2.35.1-1; from 3.0.0 before 3.0.3-1 — fixed in 2.35.1-1, 3.0.3-1
How to fix
Upgrade to a fixed version: wiremock Python Wiremock 2.6.1; wiremock 2.35.1, 3.0.3; Wiremock Docker 2.35.1-1, 3.0.3-1. Check the vendor advisory for mitigations.
References
- https://github.com/wiremock/wiremock/security/advisories/GHSA-pmxq-pj47-j8j4
- https://wiremock.org/docs/configuration/#preventing-proxying-to-and-recording-from-specific-target-addresses
- https://github.com/wiremock/wiremock/security/advisories/GHSA-pmxq-pj47-j8j4
- https://wiremock.org/docs/configuration/#preventing-proxying-to-and-recording-from-specific-target-addresses
Get alerted when CVE-2023-41329 or the next vulnerability affects your stack