Vulnerabilities in pkg:maven/com.github.tomakehurst/wiremock-jre8

PACKAGE
Advisory Identifier: GHSA-pmxq-pj47-j8j4
Advisory Summary

CVE-2023-41329 is a LOW (CVSS 3.9) domain restrictions bypass vulnerability (CWE-350: Reliance on Reverse DNS Resolution for a Security-Critical Action) affecting Wiremock standalone libraries in the Maven ecosystem. The issue involves domain restrictions bypass via dns rebinding in wiremock and wiremock studio webhooks, proxy and recorder modes. Remediation is available by upgrading affected packages to version 3.0.3, 2.35.1, 2.6.1.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/com.github.tomakehurst/wiremock-jre8

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/com.github.tomakehurst/wiremock-jre8. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-pmxq-pj47-j8j4 CVE-2023-41329 LOW Domain restrictions bypass via DNS Rebinding in WireMock and WireMock Studio webhooks, proxy and recorder modes

CVE-2023-41329 at a Glance

CVE Identifier CVE-2023-41329
GHSA Identifier GHSA-pmxq-pj47-j8j4
Severity LOW
CVSS v3.1 Base Score 3.9
CWE Classification CWE-350: Reliance on Reverse DNS Resolution for a Security-Critical Action
Affected Product Wiremock standalone
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 3.9

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:A/AC:H/PR:H/UI:N/S:U/C:L/I:L/A:L).

Attack Vector Adjacent (AV:A)
Attack Complexity High (AC:H)
Privileges Required High (PR:H)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability Low (A:L)

How to Fix CVE-2023-41329

To remediate this vulnerability, upgrade all affected Wiremock standalone dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.wiremock:wiremock-standalone fixed: 3.0.3
<dependency>
    <groupId>org.wiremock</groupId>
    <artifactId>wiremock-standalone</artifactId>
    <version>3.0.3</version>
</dependency>
org.wiremock:wiremock fixed: 3.0.3
<dependency>
    <groupId>org.wiremock</groupId>
    <artifactId>wiremock</artifactId>
    <version>3.0.3</version>
</dependency>
com.github.tomakehurst:wiremock-jre8 fixed: 2.35.1
<dependency>
    <groupId>com.github.tomakehurst</groupId>
    <artifactId>wiremock-jre8</artifactId>
    <version>2.35.1</version>
</dependency>
com.github.tomakehurst:wiremock-jre8-standalone fixed: 2.35.1
<dependency>
    <groupId>com.github.tomakehurst</groupId>
    <artifactId>wiremock-jre8-standalone</artifactId>
    <version>2.35.1</version>
</dependency>
wiremock fixed: 2.6.1
pip install wiremock>=2.6.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.wiremock

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2023-41329, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.wiremock

Analyze the terminal output to locate any version of Wiremock standalone in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.0.3), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.wiremock command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-350: Reliance on Reverse DNS Resolution for a Security-Critical Action, where the product performs reverse dns resolution on an ip address to obtain the hostname and make a security decision, but it does not properly ensure that the ip address is truly associated with the hostname. In Wiremock standalone, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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](https://wiremock.org/docs/configuration/#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](https://www.wiremock.io/product) ### References - CVE-2023-41327 - Related issue in the WireMock Webhooks Extension

CVE-2023-41329 Affected Wiremock standalone Versions

5 component(s)
Fixed Versions:
3.0.32.35.12.6.1
Product / Package Ecosystem Affected Versions Fixed Version
org.wiremock:wiremock-standalone
Maven
< 3.0.3
3.0.3
org.wiremock:wiremock
Maven
< 3.0.3
3.0.3
com.github.tomakehurst:wiremock-jre8
Maven
< 2.35.1
2.35.1
com.github.tomakehurst:wiremock-jre8-standalone
Maven
< 2.35.1
2.35.1
wiremock
PyPI
< 2.6.1
2.6.1

References

Frequently Asked Questions

What is CVE-2023-41329?
CVE-2023-41329 is a security vulnerability in Wiremock standalone involving Domain restrictions bypass via DNS Rebinding in WireMock and WireMock Studio webhooks, proxy and recorder modes under CWE-350: Reliance on Reverse DNS Resolution for a Security-Critical Action.
Which Wiremock standalone versions are affected?
Affected versions include releases prior to 3.0.3, 2.35.1, 2.6.1 across affected packages: org.wiremock:wiremock-standalone, org.wiremock:wiremock, com.github.tomakehurst:wiremock-jre8, com.github.tomakehurst:wiremock-jre8-standalone, wiremock.
What version fixes CVE-2023-41329?
Upgrading to 3.0.3, 2.35.1, 2.6.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is wiremock-standalone affected?
Yes, org.wiremock:wiremock-standalone is affected in releases prior to 3.0.3. Upgrade your dependency to 3.0.3 or later.
Is wiremock affected?
Yes, org.wiremock:wiremock is affected in releases prior to 3.0.3, 2.6.1. Upgrade your dependency to 3.0.3, 2.6.1 or later.
What is the CVSS score of CVE-2023-41329?
CVE-2023-41329 has a CVSS v3.1 base score of 3.9 (LOW) with vector string CVSS:3.1/AV:A/AC:H/PR:H/UI:N/S:U/C:L/I:L/A:L.
What CWE is associated with CVE-2023-41329?
CVE-2023-41329 is classified under CWE-350: Reliance on Reverse DNS Resolution for a Security-Critical Action (The product performs reverse DNS resolution on an IP address to obtain the hostname and make a security decision, but it does not properly ensure that the IP address is truly associated with the hostname.).
How can I check Maven dependencies for CVE-2023-41329?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.wiremock'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-pmxq-pj47-j8j4",
  "modified" : "2023-09-08T12:19:49Z",
  "published" : "2023-09-08T12:19:49Z",
  "aliases" : [ "CVE-2023-41329" ],
  "summary" : "Domain restrictions bypass via DNS Rebinding in WireMock and WireMock Studio webhooks, proxy and recorder modes",
  "details" : "### Impact\n\nThe proxy mode of WireMock, can be protected by the network restrictions configuration, as documented in [Preventing proxying to and recording from specific target addresses](https://wiremock.org/docs/configuration/#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.\n\nThe 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.\n\n### Affected versions\n\n- WireMock 3,x until 3.0.3 (security patch), on default settings in environments with access to the network\n- WireMock 2.x until 2.35.1 (security patch), on default settings in environments with access to the network\n- Python WireMock until 2.6.1\n- WireMock Studio - all versions, this proprietary product was discontinued in 2022\n\n\n### Patches\n\n- WireMock 3.0.3 + the 3.0.3-1 Docker image\n- WireMock 2.35.1 + the 2.35.1-1 Docker image - backport to WireMock 2.x\n- Python WireMock 2.6.1\n\n### Workarounds\n\nFor WireMock:\n\n- Option 1: Configure WireMock to use IP addresses instead of the domain names in the outbound URLs subject to DNS rebinding\n- Option 2: Use external firewall rules to define the list of permitted destinations\n\nFor 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](https://www.wiremock.io/product)\n\n### References\n\n- CVE-2023-41327 - Related issue in the WireMock Webhooks Extension\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:A/AC:H/PR:H/UI:N/S:U/C:L/I:L/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.wiremock:wiremock-standalone"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.0.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.wiremock:wiremock"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.0.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.github.tomakehurst:wiremock-jre8"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.35.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.github.tomakehurst:wiremock-jre8-standalone"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.35.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "wiremock"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.6.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/wiremock/wiremock/security/advisories/GHSA-pmxq-pj47-j8j4"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-41329"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/wiremock/wiremock"
  }, {
    "type" : "WEB",
    "url" : "https://wiremock.org/docs/configuration/#preventing-proxying-to-and-recording-from-specific-target-addresses"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-290", "CWE-350" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-09-08T12:19:49Z",
    "nvd_published_at" : "2023-09-06T21:15:14Z"
  }
}