Vulnerability · Published Sep 6, 2023 · Assigned by GitHub_M
CVE-2023-41329Domain restrictions bypass via DNS Rebinding in WireMock and WireMock Studio
Low 3.9
In plain English
A low-severity authentication bypass by spoofing in wiremock from wiremock. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.6% (higher than 50% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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 packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Maven | com.github.tomakehurst:wiremock-jre8 | 2.35.1 | GHSA-pmxq-pj47-j8j4 |
| Maven | com.github.tomakehurst:wiremock-jre8-standalone | 2.35.1 | GHSA-pmxq-pj47-j8j4 |
| Maven | org.wiremock:wiremock | 3.0.3 | GHSA-pmxq-pj47-j8j4 |
| Maven | org.wiremock:wiremock-standalone | 3.0.3 | GHSA-pmxq-pj47-j8j4 |
| PyPI | wiremock | 2.6.1 | GHSA-pmxq-pj47-j8j4 |
| PyPI | wiremock | 2.6.1 | PYSEC-2026-2050 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| wiremock | wiremock | org.wiremock:wiremock: < 3.0.3 org.wiremock:wiremock-standalone: < 3.0.3com.tomakehurst.wiremock:wiremock-jre8: < 2.35.1com.tomakehurst.wiremock:wiremock-jre8-standalone: < 2.35.1pypi: wiremock: < 2.6.1wiremock/wiremock: < 2.35.1-1wiremock/wiremock: >= 3.0.0, < 3.0.3-1 |
Weakness: CWE-290 · Vector: CVSS:3.1/AV:A/AC:H/PR:H/UI:N/S:U/C:L/I:L/A:L