Repository navigation
[fix][sec] Upgrade ZooKeeper to 3.9.7 to address several CVEs - #27343
Merged
Merged
Conversation
ZooKeeper 3.9.7 fixes CVE-2026-100235, CVE-2026-100252, CVE-2026-100300, CVE-2026-100302 and CVE-2026-115448. The fix for CVE-2026-100302 adds the server-side limits multiRead.maxOps and multiRead.maxResponseBytes. Pulsar's defaults stay within them, so document when a deployment needs to raise them. Assisted-by: Claude Code/claude-opus-5-5
lhotari
requested review from
Denovo1998,
Technoboy-,
codelipenghui,
dao-jun,
merlimat and
nodece
November 3, 2026 21:19
merlimat
approved these changes
Nov 4, 2026
nodece
approved these changes
Nov 4, 2026
codelipenghui
requested changes
Nov 4, 2026
codelipenghui
left a comment
Contributor
There was a problem hiding this comment.
Reviewed head b561a9b072c4b711c21c5ef25f4711d6b86a203c.
The security upgrade is appropriate, but please address the reproduced metadata-read compatibility regression described inline while retaining the new server protections.
Validation: 61 existing focused batching, session/recovery, and Prometheus integration tests passed. A local embedded-server regression probe passed with only the ZooKeeper dependency reverted to 3.9.6, but failed with BadArguments on 3.9.7 both before and after that comparison. This concerns a non-default 40 MiB client packet limit; no default-10-MiB regression is claimed.
lhotari
added a commit
that referenced
this pull request
Nov 4, 2026
Co-authored-by: Matteo Merli <mmerli@apache.org> (cherry picked from commit 5f8d34a)
lhotari
added a commit
that referenced
this pull request
Nov 4, 2026
Co-authored-by: Matteo Merli <mmerli@apache.org> (cherry picked from commit 5f8d34a)
lhotari
added a commit
that referenced
this pull request
Nov 4, 2026
Co-authored-by: Matteo Merli <mmerli@apache.org> (cherry picked from commit 5f8d34a)
11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Apache ZooKeeper 3.9.7 fixes these CVEs, which were announced on the ZooKeeper user list and affect the 3.9.6 version that Pulsar currently uses:
multiReadhandlingsetACLrace that lets operations commit after an ACL revocationThe fix for CVE-2026-100302 adds two server-side limits, and a
multiReadrequest over either limit fails as a whole withBadArguments:multiRead.maxOps, 1000 by defaultmultiRead.maxResponseBytes, 64 MB by defaultThis matters to Pulsar because
ZKMetadataStoresends its read batches asmultiReadrequests. It splits a failed batch into individual operations only afterCONNECTIONLOSS, so all the reads in a rejected batch fail.Pulsar's defaults stay within both limits:
metadataStoreBatchingMaxOperationsis 1000, which is exactlymultiRead.maxOps.bin/pulsarsetsjute.maxbufferto 10 MB. A client can't receive a response larger than that, and the batching strategy aims for half of it.Deployments need a matching ZooKeeper setting only if they raise
metadataStoreBatchingMaxOperationsabove 1000, or raisejute.maxbufferto around 64 MB or more. Both limits apply on the ZooKeeper server, so this also applies to ensembles that aren't started from Pulsar's configuration.Modifications
distribution/server/src/assemble/LICENSE.bin.txt.multiReadsettings as commented-out defaults, with guidance on when to change them, toconf/zookeeper.confandconf/global_zookeeper.conf.metadataStoreBatchingMaxOperationsrelates tomultiRead.maxOpsinconf/broker.conf,conf/standalone.confandServiceConfiguration.The classes copied from ZooKeeper under
jetty-upgrade/need no changes, because their upstream sources are identical in 3.9.6 and 3.9.7. ZooKeeper 3.9.7 also moves to Netty 4.1.138 and Jackson 2.22.3, but Pulsar's resolved versions stay at Netty 4.2.20.Final and Jackson 2.21.8.Verifying this change
This change is already covered by existing tests, such as
MetadataStoreBatchingTest,ZKSessionTest,ZKMetadataStoreBatchIOperationTestand the tests ofpulsar-zookeeper-prometheus-metrics, which pass on 3.9.7.MetadataStoreTesthas one failure with test retries disabled,testGetChildrenfor the ZooKeeper provider. It fails the same way on 3.9.6, so this upgrade doesn't cause it.A temporary test against a real ZooKeeper 3.9.7 server, not included in this PR, confirmed the
multiRead.maxOpsbehavior:multiRead.maxOpsBadArgumentsQuorumPeerConfiglike a setting inzookeeper.conf)QuorumPeerConfiglike a setting inzookeeper.conf)The
multiRead.maxResponseByteslimit wasn't exercised by a test.Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
ZooKeeper servers now enforce the
multiReadlimits described above, and deployments with raised batching settings need a matching ZooKeeper setting.