Skip to content

Commit 7684596

Browse files
fix: force handlebars core to 4.5.2 to resolve path traversal CVE
WireMock 3.x pulls in handlebars 4.3.1 which has a path traversal vulnerability (GHSA-r4gv-qr8j-p3pg) fixed in 4.5.2. WireMock 3.x has not backported the fix, so we force the core jar directly. handlebars-helpers cannot be forced to 4.5.2 as NumberHelper moved packages, breaking WireMock at runtime.
1 parent fb6c59f commit 7684596

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,14 @@ ext {
5858
jackson_version = "2.22.0"
5959
}
6060

61+
configurations.testRuntimeClasspath {
62+
// handlebars 4.3.1 (pulled in by wiremock) has a path traversal CVE fixed in 4.5.2.
63+
// WireMock 3.x hasn't backported the fix — only the 4.x beta line has.
64+
// We force the core jar only; handlebars-helpers cannot be forced to 4.5.2 because
65+
// NumberHelper moved packages between versions, which breaks WireMock at runtime.
66+
resolutionStrategy.force 'com.github.jknack:handlebars:4.5.2'
67+
}
68+
6169
dependencies {
6270
implementation "com.google.code.findbugs:jsr305:3.0.2"
6371

0 commit comments

Comments
 (0)