[fix][sec] Upgrade jline to 4.2.1 and picocli to 4.7.7, drop unused jline2 - #26068
Merged
Conversation
dao-jun
approved these changes
Jun 20, 2026
sandeep-ctds
pushed a commit
to datastax/pulsar
that referenced
this pull request
Jul 31, 2026
…line2 (apache#26068) (cherry picked from commit c536dcb)
nodece
pushed a commit
to ascentstream/pulsar
that referenced
this pull request
Aug 28, 2026
…line2 (apache#26068) (cherry picked from commit c536dcb)
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
The Pulsar CLI/shell tooling bundles JLine and picocli, managed through the Gradle
version catalog (
gradle/libs.versions.toml). Two things motivate this change:Security. Pulsar packages
org.jline:jline3.21.0. This is the JLine aggregate("uber") artifact that bundles every JLine module, including
jline-remote-telnet(the
org/jline/builtins/telnet/...classes are present in the jar). That module isaffected by two HIGH-severity (CVSS 7.5) advisories in versions
< 4.2.1, both fixedin 4.2.1:
Telnet server: Unauthenticated Remote Memory Exhaustion via Unbounded Telnet
NEW-ENVIRON Variables
Telnet server: Unauthenticated Remote DoS via Unbounded Telnet NAWS Terminal Geometry
So the 3.21.0 bundle Pulsar ships contains the vulnerable telnet classes. Pulsar does
not start a JLine telnet server (the shell only uses JLine for line editing/completion),
so the code is not reachable through Pulsar's own usage, but the vulnerable classes are
still packaged in the distribution and get flagged by dependency/security scanners.
Upgrading
jlineto 4.2.1 incorporates the fixes.Maintenance / cleanup.
picocli(4.7.5) andjline(3.21.0) were behind theirlatest upstream releases, and the legacy
jline2(jline:jline2.14.6) dependency isno longer a build dependency of any module — it was only declared in the server
distribution packaging. Keeping unused and outdated dependencies increases the
maintenance and licensing surface for no benefit.
Modifications
jline(org.jline:jline) from 3.21.0 to 4.2.1 (latest), which fixesGHSA-47qp-hqvx-6r3f and GHSA-2r2c-cx56-8933.
picoclifrom 4.7.5 to 4.7.7 (latest);picocli-shell-jline3follows the sameversion reference.
jline2(jline:jline2.14.6) dependency from the version catalogand from the server distribution packaging (
distribution/server/build.gradle.kts).jline2shadeinclude/relocateentries (for thejline:Mavengroup /
jline.*packages) frompulsar-functions/localrun-shaded. These were specificto JLine 2; the local-runner shaded classpath does not contain any JLine artifact
(verified via
runtimeClasspath), so the shaded jar contents are unchanged.LICENSE.bin.txtfor the server and shell distributions to reflectthe new jar versions and the removal of the JLine 2 jar.
Verifying this change
This change is a dependency upgrade / cleanup without new test coverage. It is covered by
the existing build and distribution binary-license check, and by
org.apache.pulsar.shell.PulsarShellTest, which exercises the Pulsar shell against theupgraded JLine. Locally verified to pass:
spotlessCheck,checkstyleMain,checkstyleTest,:pulsar-client-toolsmain + test compilation, andPulsarShellTest(the only module using JLine directly) against jline 4.2.1.
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes