Skip to content

KAFKA-19951: Update lz4 dependency version for CVE-2025-12183 & CVE-2025-66566#21035

Merged
mimaison merged 9 commits into
apache:trunkfrom
erikanderson:patch-1
Dec 9, 2025
Merged

KAFKA-19951: Update lz4 dependency version for CVE-2025-12183 & CVE-2025-66566#21035
mimaison merged 9 commits into
apache:trunkfrom
erikanderson:patch-1

Conversation

@erikanderson
Copy link
Copy Markdown
Contributor

@erikanderson erikanderson commented Dec 2, 2025

Updated lz4 dependency version from 1.8.0 to 1.8.1. For https://nvd.nist.gov/vuln/detail/CVE-2025-12183
@github-actions github-actions Bot added triage PRs from the community build Gradle build or GitHub Actions small Small PRs labels Dec 2, 2025
@DL1231
Copy link
Copy Markdown
Collaborator

DL1231 commented Dec 2, 2025

Thanks for the patch. Could you also update LICENSE-binary and ensure the compression levels in org.apache.kafka.common.record.CompressionType are still valid?

@chia7712 chia7712 changed the title Update lz4 dependency version for CVE-2025-12183 MINOR: Update lz4 dependency version for CVE-2025-12183 Dec 2, 2025
@github-actions github-actions Bot added the dependencies Pull requests that update a dependency file label Dec 2, 2025
@erikanderson
Copy link
Copy Markdown
Contributor Author

@DL1231 thank you, updated license binary, do you know how org.apache.kafka.common.record.CompressionType has been confirmed in the past?

@mimaison mimaison changed the title MINOR: Update lz4 dependency version for CVE-2025-12183 KAFKA-19951: Update lz4 dependency version for CVE-2025-12183 Dec 2, 2025
@mimaison
Copy link
Copy Markdown
Member

mimaison commented Dec 2, 2025

I linked the PR to KAFKA-19951.

Regarding the compression level, it's explained in CompressionType: https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/common/record/CompressionType.java#L73-L74

@mimaison
Copy link
Copy Markdown
Member

mimaison commented Dec 2, 2025

Also there's still a build issue:

Could not determine the dependencies of task ':clients:shadowJar'.
> Could not resolve all dependencies for configuration ':clients:runtimeClasspath'.
   > Could not resolve org.lz4:lz4-java:1.8.1.
     Required by:
         project ':clients'
      > Module 'org.lz4:lz4-java' has been rejected:
           Cannot select module with conflict on capability 'org.lz4:lz4-java:1.8.1' also provided by ['at.yawk.lz4:lz4-java:1.8.1' (runtimeElements)]
   > Could not resolve at.yawk.lz4:lz4-java:1.8.1.
     Required by:
         project ':clients' > org.lz4:lz4-java:1.8.1
      > Module 'at.yawk.lz4:lz4-java' has been rejected:
           Cannot select module with conflict on capability 'org.lz4:lz4-java:1.8.1' also provided by ['org.lz4:lz4-java:1.8.1' (runtime)]

@erikanderson
Copy link
Copy Markdown
Contributor Author

Also there's still a build issue:

Could not determine the dependencies of task ':clients:shadowJar'.
> Could not resolve all dependencies for configuration ':clients:runtimeClasspath'.
   > Could not resolve org.lz4:lz4-java:1.8.1.
     Required by:
         project ':clients'
      > Module 'org.lz4:lz4-java' has been rejected:
           Cannot select module with conflict on capability 'org.lz4:lz4-java:1.8.1' also provided by ['at.yawk.lz4:lz4-java:1.8.1' (runtimeElements)]
   > Could not resolve at.yawk.lz4:lz4-java:1.8.1.
     Required by:
         project ':clients' > org.lz4:lz4-java:1.8.1
      > Module 'at.yawk.lz4:lz4-java' has been rejected:
           Cannot select module with conflict on capability 'org.lz4:lz4-java:1.8.1' also provided by ['org.lz4:lz4-java:1.8.1' (runtime)]

It looks like there was a recent change to discontinue https://github.com/lz4/lz4-java, in favor of community fork https://github.com/yawkat/lz4-java . I'll try updating to new GAV

@yawkat
Copy link
Copy Markdown

yawkat commented Dec 2, 2025

Maintainer here. Interesting, did you see that error when depending on org.lz4:lz4-java:1.8.1 directly, without any reference to at.yawk.lz4? Maybe there's something wrong with the gradle capability metadata

@erikanderson
Copy link
Copy Markdown
Contributor Author

@erikanderson
Copy link
Copy Markdown
Contributor Author

Maintainer here. Interesting, did you see that error when depending on org.lz4:lz4-java:1.8.1 directly, without any reference to at.yawk.lz4? Maybe there's something wrong with the gradle capability metadata

Yeah, had to switch to your gav for it to work (I'm just a random person not affil with apache): 51c520e

Comment thread gradle/dependencies.gradle
@github-actions github-actions Bot removed the triage PRs from the community label Dec 3, 2025
@mjschwaiger
Copy link
Copy Markdown

'org.lz4:lz4-java:1.8.1

Simple example demonstrating the issue mentioned by @mimaison:

plugins {
    id 'java'
}

repositories {
    mavenCentral()
}

dependencies {
    // (1) only -> success
    // (2) only -> error, but: capability conflict not expected
    // (3) only -> success
    // (1) + (2) -> error (expected?)
    // (1) + (3) -> error (capability conflict as expected)
    // (2) + (3) -> error (capability conflict as expected)

    // implementation 'org.lz4:lz4-java:1.8.0' // (1)
    implementation 'org.lz4:lz4-java:1.8.1' // (2)
    // implementation 'at.yawk.lz4:lz4-java:1.8.1' // (3)
}

If only org.lz4:lz4-java:1.8.1 (2) is used, this unexpected build error will occur:

Could not determine the dependencies of task ':testlz4:compileJava'.
> Could not resolve all dependencies for configuration ':testlz4:compileClasspath'.
   > Could not resolve org.lz4:lz4-java:1.8.1.
     Required by:
         project :testlz4
      > Module 'org.lz4:lz4-java' has been rejected:
           Cannot select module with conflict on capability 'org.lz4:lz4-java:1.8.1' also provided by [at.yawk.lz4:lz4-java:1.8.1(apiElements)]
   > Could not resolve at.yawk.lz4:lz4-java:1.8.1.
     Required by:
         project :testlz4 > org.lz4:lz4-java:1.8.1
      > Module 'at.yawk.lz4:lz4-java' has been rejected:
           Cannot select module with conflict on capability 'org.lz4:lz4-java:1.8.1' also provided by [org.lz4:lz4-java:1.8.1(compile)]

There might be an issue with the capability configuration together with the relocation settings, which could be the reason for the problem.

@yawkat
Copy link
Copy Markdown

yawkat commented Dec 3, 2025

@mjschwaiger I made a test case here: https://github.com/yawkat/test-case-gradle-rename-capability

I think it's a gradle bug, I've asked on the gradle community slack about it.

Copy link
Copy Markdown
Member

@chia7712 chia7712 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@chia7712
Copy link
Copy Markdown
Member

chia7712 commented Dec 4, 2025

@mimaison do you have time to take a look at this?

@ccudennec-otto
Copy link
Copy Markdown

BTW: If the Java project is discontinued, I think it would be a good idea to get rid of the library. Not sure where I could raise this question as an issue.

@chia7712
Copy link
Copy Markdown
Member

chia7712 commented Dec 4, 2025

Not sure where I could raise this question as an issue.

I recommend KAFKA-17301 for raising this issue 😄

Comment thread gradle/dependencies.gradle Outdated
lz4: "1.8.0",
// https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/common/record/CompressionType.java#L73-L74
// https://github.com/yawkat/lz4-java/blob/main/src/java/net/jpountz/lz4/LZ4Constants.java#L23-L24
lz4: "1.8.1",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we directly bump to 1.10.0?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done (cd8be9e)

@skaluva
Copy link
Copy Markdown

skaluva commented Dec 23, 2025

Hope in newer versions of kafka-clients, they update their dependency graph with new group.

They already did: #21035

Oh yeah.. missed reading entire thread.. but looks like 3.9.2 is not yet released :)

@chia7712
Copy link
Copy Markdown
Member

but looks like 3.9.2 is not yet released :)

It's currently in the oven! Stay tuned 😄

@omarmahamid
Copy link
Copy Markdown

@chia7712

Let’s just hope it’s baking nicely and not getting a little too crispy 😄

@radarsh
Copy link
Copy Markdown

radarsh commented Jan 14, 2026

Sorry to be pushy, but when can we expect a new version of 3.9.x with this fix? People in my organisation are panicking as this vulnerability has a high score.

@chia7712
Copy link
Copy Markdown
Member

Sorry to be pushy, but when can we expect a new version of 3.9.x with this fix? People in my organisation are panicking as this vulnerability has a high score.

Definitely. We understand the urgency. We are currently preparing the 3.9.2 RC0, and I will share the release discussion link here as soon as it is ready

@FrankYang0529
Copy link
Copy Markdown
Member

Currently, most of 3.9.2-rc0 artifacts are ready. I'm waiting for apache/kafka-native:3.9.2-rc0 image (https://github.com/apache/kafka/actions/runs/20998197324). I will start the vote thread after it's ready. Thanks.

@FrankYang0529
Copy link
Copy Markdown
Member

@skaluva
Copy link
Copy Markdown

skaluva commented Jan 19, 2026

I still dont see 3.9.2 artifacts in maven central repo.. any idea when those will be available for public use..
(sorry for asking this, im not aware on how to use above vote thread mentioned)

@FrankYang0529
Copy link
Copy Markdown
Member

@radarsh
Copy link
Copy Markdown

radarsh commented Jan 22, 2026

21st January has passed. The RC has only received one +1 vote. Now what happens? Do we wait indefinitely until the required number of votes are cast or is there a time limit after which release will be cut anyway?

@chia7712
Copy link
Copy Markdown
Member

21st January has passed. The RC has only received one +1 vote. Now what happens? Do we wait indefinitely until the required number of votes are cast or is there a time limit after which release will be cut anyway?

Good point. We have been jugging between two releases lately, which is why the 3.9.2 RC is moving a bit slower. We are on it and will case the necessary votes once the validation is complete.

@skaluva
Copy link
Copy Markdown

skaluva commented Jan 30, 2026

Any update on this please? all our repositories mend scans are failing due to this and our infosec team is behind us.. :(

@chia7712
Copy link
Copy Markdown
Member

Any update on this please? all our repositories mend scans are failing due to this and our infosec team is behind us.. :(

Totally understand the pressure from your infosec team. The fix is nearly ready - we are waiting on the very last vote for approval. It should be moving forward very shortly

@omarmahamid
Copy link
Copy Markdown

file_0000000045b071fc8dd7d22a681166f9

@chia7712
Copy link
Copy Markdown
Member

BTW, it would be super helpful if you guys could join the release vote thread and help verify the RC. Even if your "+1" is non-binding, sharing your test results gives the maintainers the final confidence needed to close the vote

For instance, @jiafu1115 has already helped verify the 3.9.2-RC in their environment, ensuring it does not burn out the server. If you have time, please jump in and help us cross the finish line

vote thread: https://lists.apache.org/thread/t83xx0f4bfo160zhnnh885qh27o494dh

@tobbin2
Copy link
Copy Markdown

tobbin2 commented Feb 3, 2026

When can we expect the release date of 3.9.2, how long does it usually take for the last legendary voter?

@yeikel
Copy link
Copy Markdown
Contributor

yeikel commented Feb 3, 2026

When can we expect the release date of 3.9.2,

You should consider following the email list for updates

how long does it usually take for the last legendary voter?

This legendary voter could be you. For example, download the RC, test it and share feedback. It is a community effort 🚀

@radarsh
Copy link
Copy Markdown

radarsh commented Feb 4, 2026

I think we had the legendary vote yesterday. I'm assuming now it's just pending release formalities?

@chia7712
Copy link
Copy Markdown
Member

chia7712 commented Feb 4, 2026

Yes, we have the legendary voter. At the same time, we’re investigating a patch regarding a CVE. Hopefully, this will not lead to another RC

#21395

@yeikel
Copy link
Copy Markdown
Contributor

yeikel commented Feb 4, 2026

Yes, we have the legendary voter. At the same time, we’re investigating a patch regarding a CVE. Hopefully, this will not lead to another RC

#21395

That's a pretty high severity CVE, thanks for the great work. We'll need to wait or the sec teams will still chase us anyways 😃

@skaluva
Copy link
Copy Markdown

skaluva commented Feb 5, 2026

when do i see it here?
image

image

Entire kafka industry plagued with this CVE.. :D

@chia7712
Copy link
Copy Markdown
Member

chia7712 commented Feb 5, 2026

Entire kafka industry plagued with this CVE..

Not just Kafka. We're all in this burning building together. 🔥

@yawkat
Copy link
Copy Markdown

yawkat commented Feb 5, 2026

You're welcome 🤗

@moritzluedtke
Copy link
Copy Markdown

Do you have an estimation when 3.9.2 or 4.2.0 will be released?

@chia7712
Copy link
Copy Markdown
Member

Do you have an estimation when 3.9.2 or 4.2.0 will be released?

Voting is in progress. We focused on fixing known CVEs and regressions, and I hope everything to be ready by next week

@radarsh
Copy link
Copy Markdown

radarsh commented Feb 18, 2026

Any news about 3.9.2? We cannot upgrade to 4.2.0 due to the current version of Spring Boot that we are using.

@mimaison
Copy link
Copy Markdown
Member

As said above, bumping this thread is not going to speed up the release. If this release is important for you, go test it and vote.

@radarsh
Copy link
Copy Markdown

radarsh commented Feb 18, 2026

I thought you have already received 4 +1 votes. Maybe I'm misreading it.

@mimaison
Copy link
Copy Markdown
Member

A release vote requires 3 binding votes from PMC members.
That does not mean community votes are meaningless. On the contrary, testing feedback from the community show interest and inspire PMC members to vote.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Gradle build or GitHub Actions ci-approved dependencies Pull requests that update a dependency file small Small PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.