Domain restrictions bypass via DNS Rebinding in WireMock and WireMock Studio webhooks, proxy and recorder modes

Description

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. 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

References

  • CVE-2023-41327 - Related issue in the WireMock Webhooks Extension

Basic information

Type
reviewed
Severity
low
Advisory on GitHub
Open advisory ↗
Repository advisory
Open repository advisory ↗
Source code
Browse source ↗
Published (advisory)
2023-09-08 12:19:49 UTC
Updated
2023-11-07 05:04:15 UTC
GitHub reviewed
2023-09-08 12:19:49 UTC
NVD published
2023-09-06

EPSS Score

Score Percentile
0.33% 55.65%

CVSS Scores

Base score Version Severity Vector
3.9 3.1
CVSS:3.1/AV:A/AC:H/PR:H/UI:N/S:U/C:L/I:L/A:L Click to expand
Attack vector (AV:A)
Attacker has to be nearby on the network—same office, same link, that vibe—not the whole wide internet.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:H)
They need powerful rights—admin, root, or similar—before this pays off.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:L)
Some sensitive info could get out, but not a total data dump.
Integrity (I:L)
Attackers could change some data, but it’s limited—not everything goes.
Availability (A:L)
Might cause slowdowns, glitches, or partial disruption—not a full brick.

Identifiers

CWEs

CWE id Name
CWE-290 Authentication Bypass by Spoofing
CWE-350 Reliance on Reverse DNS Resolution for a Security-Critical Action

Credits

  • W0rty (reporter)
  • numacanedo (finder)
  • tomakehurst (remediation_developer)
  • Mahoney (remediation_developer)
  • oleg-nenashev (coordinator)

Affected packages (5)

Vulnerable version ranges and first patched releases as published by GitHub.

Ecosystem Package Vulnerable range First patched Vulnerable functions
maven org.wiremock:wiremock-standalone < 3.0.3 3.0.3
maven org.wiremock:wiremock < 3.0.3 3.0.3
maven com.github.tomakehurst:wiremock-jre8 < 2.35.1 2.35.1
maven com.github.tomakehurst:wiremock-jre8-standalone < 2.35.1 2.35.1
pip wiremock < 2.6.1 2.6.1

References

cvelogic Threat Intelligence