Vulnerabilities in pkg:maven/org.wiremock/wiremock-webhooks-extension

PACKAGE
Advisory Identifier: GHSA-hq8w-9w8w-pmx7
Advisory Summary

CVE-2023-41327 is a MODERATE (CVSS 4.6) wiremock controlled server side request vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting Wiremock webhooks extension libraries in the Maven ecosystem. The issue involves wiremock controlled server side request forgery vulnerability through url. Remediation is available by upgrading affected packages to version 3.0.3, 2.35.1.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/org.wiremock/wiremock-webhooks-extension

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/org.wiremock/wiremock-webhooks-extension. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-hq8w-9w8w-pmx7 CVE-2023-41327 MODERATE WireMock Controlled Server Side Request Forgery vulnerability through URL

CVE-2023-41327 at a Glance

CVE Identifier CVE-2023-41327
GHSA Identifier GHSA-hq8w-9w8w-pmx7
Severity MODERATE
CVSS v3.1 Base Score 4.6
CWE Classification CWE-918: Server-Side Request Forgery (SSRF)
Affected Product Wiremock webhooks extension
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 4.6

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

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

How to Fix CVE-2023-41327

To remediate this vulnerability, upgrade all affected Wiremock webhooks extension 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-webhooks-extension fixed: 3.0.3
<dependency>
    <groupId>org.wiremock</groupId>
    <artifactId>wiremock-webhooks-extension</artifactId>
    <version>3.0.3</version>
</dependency>
org.wiremock:wiremock-webhooks-extension fixed: 2.35.1
<dependency>
    <groupId>org.wiremock</groupId>
    <artifactId>wiremock-webhooks-extension</artifactId>
    <version>2.35.1</version>
</dependency>
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-41327, 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 webhooks extension 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-918: Server-Side Request Forgery (SSRF), where the web server receives a url or similar request from an upstream component and retrieves the contents of this url, but it does not sufficiently ensure that the request is being sent to the expected destination. In Wiremock webhooks extension, 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 WireMock can be configured to only permit proxying (and therefore recording) to certain addresses. This is achieved via a list of allowed address rules and a list of denied address rules, where the allowed list is evaluated first. [Documentation](https://wiremock.org/docs/configuration/#preventing-proxying-to-and-recording-from-specific-target-addresses). Until WireMock Webhooks Extension [3.0.0-beta-15](https://github.com/wiremock/wiremock/releases/tag/3.0.0-beta-15), the filtering of target addresses from the proxy mode DID NOT work for Webhooks, so the users were potentially vulnerable regardless of the `limitProxyTargets` settings. Via the WireMock webhooks configuration, POST requests from a webhook might be forwarded to an arbitrary service reachable from WireMock’s instance. For example, If someone is running the WireMock docker Container inside a private cluster, they can trigger internal POST requests against unsecured APIs or even against secure ones by passing a token, discovered using another exploit, via authentication headers. ### Affected components - WireMock Webhooks Extension 2.x versions until 2.35.1 (security patch) - WireMock 3.x version until 3.0.3 (security patch) - All versions of WireMock Studio (discontinued). This distribution bundles the WireMock Webhooks Extension and activates it by default ### Patches and Mitigation - For WireMock 2.x and 3.x - upgrade to the versions with the security patches - Setup network restrictions similarly to https://wiremock.org/docs/configuration/#preventing-proxying-to-and-recording-from-specific-target-addresses - For WireMock Studio: Stop using discontinued WireMock Studio, migrate to other distributions. The vendor of WireMock Studio recommends migration to [WireMock Cloud](https://www.wiremock.io/product) NOTE: It was confirmed that [WireMock Cloud](https://www.wiremock.io/product) does not expose sensitive internal APIs and hence not vulnerable to the issue. No action is needed if you use this SaaS distribution. ### Workarounds - Use external firewall rules to define the list of permitted destinations ### References - CVE-2023-39967 - [Preventing proxying to and recording from specific target addresses](https://wiremock.org/docs/configuration/#preventing-proxying-to-and-recording-from-specific-target-addresses) ### Credits - @W0rty for reporting CVE-2023-39967 in WireMock Studio - WireMock Inc. team for discovering similar exploits in Webhooks and the risk in the Proxy mode defaults for WireMock

CVE-2023-41327 Affected Wiremock webhooks extension Versions

2 component(s)
Fixed Versions:
3.0.32.35.1
Product / Package Ecosystem Affected Versions Fixed Version
org.wiremock:wiremock-webhooks-extension
Maven
≥ 3.0.0
< 3.0.3
3.0.3
org.wiremock:wiremock-webhooks-extension
Maven
≥ 2.0.0
< 2.35.1
2.35.1

References

Frequently Asked Questions

What is CVE-2023-41327?
CVE-2023-41327 is a security vulnerability in Wiremock webhooks extension involving WireMock Controlled Server Side Request Forgery vulnerability through URL under CWE-918: Server-Side Request Forgery (SSRF).
Which Wiremock webhooks extension versions are affected?
Affected versions include releases prior to 3.0.3, 2.35.1 across affected packages: org.wiremock:wiremock-webhooks-extension.
What version fixes CVE-2023-41327?
Upgrading to 3.0.3, 2.35.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is wiremock-webhooks-extension affected?
Yes, org.wiremock:wiremock-webhooks-extension is affected in releases prior to 3.0.3, 2.35.1. Upgrade your dependency to 3.0.3, 2.35.1 or later.
What is the CVSS score of CVE-2023-41327?
CVE-2023-41327 has a CVSS v3.1 base score of 4.6 (MODERATE) with vector string CVSS:3.1/AV:A/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L.
What CWE is associated with CVE-2023-41327?
CVE-2023-41327 is classified under CWE-918: Server-Side Request Forgery (SSRF) (The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.).
How can I check Maven dependencies for CVE-2023-41327?
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-hq8w-9w8w-pmx7",
  "modified" : "2023-09-07T21:26:41Z",
  "published" : "2023-09-06T20:51:42Z",
  "aliases" : [ "CVE-2023-41327" ],
  "summary" : "WireMock Controlled Server Side Request Forgery vulnerability through URL",
  "details" : "### Impact\n\nWireMock can be configured to only permit proxying (and therefore recording) to certain addresses. This is achieved via a list of allowed address rules and a list of denied address rules, where the allowed list is evaluated first. [Documentation](https://wiremock.org/docs/configuration/#preventing-proxying-to-and-recording-from-specific-target-addresses). \n\nUntil WireMock Webhooks Extension [3.0.0-beta-15](https://github.com/wiremock/wiremock/releases/tag/3.0.0-beta-15), the filtering of target addresses from the proxy mode DID NOT work for Webhooks, so the users were potentially vulnerable regardless of the `limitProxyTargets` settings. \n\nVia the WireMock webhooks configuration, POST requests from a webhook might be forwarded to an arbitrary service reachable from WireMock’s instance. For example, If someone is running the WireMock docker Container inside a private cluster, they can trigger internal POST requests against unsecured APIs or even against secure ones by passing a token, discovered using another exploit, via authentication headers.\n\n### Affected  components\n\n- WireMock Webhooks Extension 2.x versions until 2.35.1 (security patch)\n- WireMock 3.x version until 3.0.3 (security patch)\n- All versions of WireMock Studio (discontinued). This distribution bundles the WireMock Webhooks Extension and activates it by default\n\n### Patches and Mitigation\n\n- For WireMock 2.x and 3.x - upgrade to the versions with the security patches\n- Setup network restrictions similarly to https://wiremock.org/docs/configuration/#preventing-proxying-to-and-recording-from-specific-target-addresses \n- For WireMock Studio: Stop using discontinued WireMock Studio, migrate to other distributions. The vendor of WireMock Studio recommends migration to [WireMock Cloud](https://www.wiremock.io/product)\n\nNOTE: It was confirmed that [WireMock Cloud](https://www.wiremock.io/product) does not expose sensitive internal APIs and hence not vulnerable to the issue. No action is needed if you use this SaaS distribution.\n\n### Workarounds\n\n- Use external firewall rules to define the list of permitted destinations\n\n### References\n\n- CVE-2023-39967\n- [Preventing proxying to and recording from specific target addresses](https://wiremock.org/docs/configuration/#preventing-proxying-to-and-recording-from-specific-target-addresses)\n\n### Credits\n\n- @W0rty for reporting CVE-2023-39967 in WireMock Studio\n- WireMock Inc. team for discovering similar exploits in Webhooks and the risk in the Proxy mode defaults for WireMock\n\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:A/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.wiremock:wiremock-webhooks-extension"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.0.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.wiremock:wiremock-webhooks-extension"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0"
      }, {
        "fixed" : "2.35.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/wiremock/wiremock/security/advisories/GHSA-hq8w-9w8w-pmx7"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-41327"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/wiremock/wiremock"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/wiremock/wiremock/releases/tag/2.35.1"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/wiremock/wiremock/releases/tag/3.0.0-beta-15"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/wiremock/wiremock/releases/tag/3.0.3"
  }, {
    "type" : "WEB",
    "url" : "https://wiremock.org/docs/configuration/#preventing-proxying-to-and-recording-from-specific-target-addresses"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-918" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-09-06T20:51:42Z",
    "nvd_published_at" : "2023-09-06T21:15:14Z"
  }
}