CVE-2023-41329 Domain restrictions bypass via DNS Rebinding in WireMock and WireMock Studio

Low 3.9 Published Updated

Attackers can bypass domain restrictions in WireMock proxy mode via DNS rebinding, allowing access to prohibited internal network targets.

Exploited in the wild
Not known
Login needed
An administrator
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2023-41329?

CVE-2023-41329 is a low-severity server-side request forgery vulnerability in wiremock, published on 6 Sep 2023. It can only be exploited from the same machine or local network, with no action from the victim.

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.

Weakness: CWE-290

Which versions are affected by CVE-2023-41329?

12 open source packages ship an affected version, including wiremock, com.github.tomakehurst:wiremock-jre8 and com.github.tomakehurst:wiremock-jre8-standalone. It affects 4 products.

PackageAffectedFixed in
wiremock BitnamiAll versions2.35.1, 3.0.3
wiremock PyPIAll versions2.6.1
wiremock PyPIAll versions2.6.1
wiremock PyPIAll versions2.6.1
com.github.tomakehurst:wiremock-jre8 MavenAll versions2.35.1
com.github.tomakehurst:wiremock-jre8 MavenAll versions2.35.1
6 more packages
com.github.tomakehurst:wiremock-jre8-standalone MavenAll versions2.35.1
com.github.tomakehurst:wiremock-jre8-standalone MavenAll versions2.35.1
org.wiremock:wiremock MavenAll versions3.0.3
org.wiremock:wiremock MavenAll versions3.0.3
org.wiremock:wiremock-standalone MavenAll versions3.0.3
org.wiremock:wiremock-standalone MavenAll versions3.0.3

Products include Wiremock Python Wiremock, Wiremock Studio, Wiremock Wiremock, Wiremock Wiremock Docker.

How do I fix CVE-2023-41329?

Upgrade wiremock to a fixed version for your release line: 2.35.1, 3.0.3 or 2.6.1.

Upgrade, and send outbound requests through an allow-list that blocks internal addresses. More about Server-side request forgery.

Is CVE-2023-41329 being exploited?

There is no known exploitation of CVE-2023-41329 in the wild and no public exploit code.

Sources

Also known as BIT-wiremock-2023-41329, GHSA-pmxq-pj47-j8j4, PYSEC-2026-2050.

Is CVE-2023-41329 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free