CVE-2023-41329Domain restrictions bypass via DNS Rebinding in WireMock and WireMock Studio
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.
What to do
Fixed builds are available from Maven, PyPI: see the table below for the fixed version per release.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Maven library | com.github.tomakehurst:wiremock-jre8 | Fixed | 2.35.1 | GHSA-pmxq-pj47-j8j4 |
| Maven library | com.github.tomakehurst:wiremock-jre8-standalone | Fixed | 2.35.1 | GHSA-pmxq-pj47-j8j4 |
| Maven library | org.wiremock:wiremock | Fixed | 3.0.3 | GHSA-pmxq-pj47-j8j4 |
| Maven library | org.wiremock:wiremock-standalone | Fixed | 3.0.3 | GHSA-pmxq-pj47-j8j4 |
| PyPI library | wiremock | Fixed | 2.6.1 | GHSA-pmxq-pj47-j8j4 |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- wiremock: affected: org.wiremock:wiremock: < 3.0.3, org.wiremock:wiremock-standalone: < 3.0.3, com.tomakehurst.wiremock:wiremock-jre8: < 2.35.1, com.tomakehurst.wiremock:wiremock-jre8-standalone: < 2.35.1, pypi: wiremock: < 2.6.1, wiremock/wiremock: < 2.35.1-1
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
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.