Skip to content

Commit 0aa8c44

Browse files
authored
Chore: Add constraint on Lz4-java dependency due to critical CVE-2025-12183 (#113)
1 parent 060ebf3 commit 0aa8c44

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

build.gradle.kts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,17 @@ subprojects {
2727
apply(plugin = "org.hypertrace.code-style-plugin")
2828
}
2929
}
30+
31+
// Handle lz4-java redirect capability conflict:
32+
// Sonatype added a redirect from org.lz4:lz4-java:1.8.1 -> at.yawk.lz4:lz4-java:1.8.1 to address CVE-2025-12183.
33+
// Both artifacts declare the same capability, causing a conflict when upgrading from Kafka's org.lz4:lz4-java:1.8.0.
34+
// This resolution strategy tells Gradle to automatically select the highest version when this conflict occurs.
35+
configurations.all {
36+
resolutionStrategy.capabilitiesResolution.withCapability("org.lz4:lz4-java") {
37+
select("at.yawk.lz4:lz4-java:1.8.1")
38+
because("Both org.lz4 and at.yawk.lz4 provide lz4-java due to Sonatype redirect")
39+
}
40+
}
3041
}
3142

3243
dependencyCheck {

kafka-bom/build.gradle.kts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ dependencies {
2525
api("org.apache.commons:commons-lang3:3.18.0") {
2626
because("CVE-2025-48924 is fixed in 3.18.0")
2727
}
28-
28+
api("org.lz4:lz4-java:1.8.1") {
29+
because("[https://nvd.nist.gov/vuln/detail/CVE-2025-12183] in org.lz4:lz4-java:1.8.0")
30+
because("CVE-2025-12183 is fixed in 1.8.1")
31+
}
2932

3033
api("io.confluent:kafka-streams-avro-serde:$confluentVersion")
3134
api("io.confluent:kafka-protobuf-serializer:$confluentVersion")

0 commit comments

Comments
 (0)