Repository navigation
deps: override guava, jackson-core and opentelemetry in shaded jars to fix CVEs - #4647
Merged
Merged
Conversation
…o fix CVEs The bigtable-hbase-1.x/2.x-shaded jars, and the -hadoop jars built from them, bundle relocated copies of libraries resolved through google-cloud-bigtable 2.85.0. An OSV scan of the artifacts bundled into bigtable-hbase-2.x-hadoop flagged three of them: - guava 33.6.0-jre: CVE-2026-102554 - jackson-core 2.18.3: CVE-2026-18401, CVE-2026-68494, CVE-2026-89407, CVE-2026-89425 - opentelemetry-api 1.62.0: CVE-2026-118259 Manage them up to patched releases: guava 33.7.2-jre, jackson-core 2.18.12 and opentelemetry 1.67.0. OSV reports no known vulnerabilities for these versions. Bumping the veneer is not enough. google-cloud-bigtable 2.88.0, the latest release, only picks up a fixed jackson-core and still resolves the vulnerable guava and opentelemetry versions. The versions are properties in the root pom, but the dependencyManagement entries live in the two shaded modules rather than the root. Root-level pins would apply to every module, trip the verify-mirror-deps checks that compare modules against hbase and the veneer, and could downgrade jackson-core in the Beam modules. Scoping the overrides to the modules that bundle these libraries keeps the rest of the build aligned with its upstream BOMs. Every opentelemetry artifact the veneer uses is listed, not just the API, because the SDK must not be older than the API. The overridden artifacts are added to the ignore list of the veneer mirror check in both shaded modules, since they now differ from the veneer on purpose. guava.version was previously 33.4.0-jre and is also used by bigtable-hbase-mirroring-client-core, which moves to 33.7.2-jre as well. This covers only what is bundled in the jars. The unshaded transitive dependencies of hbase-client 2.6.4-hadoop3 that bigtable-hbase-2.x-hadoop declares (netty, zookeeper, jackson-databind, bouncycastle and others) are unchanged. Each override can be removed once the veneer's deps-bom ships the same or a newer version.
The previous commit raised guava.version from 33.4.0-jre to 33.7.2-jre to pick up the fix for CVE-2026-102554. That property is also used by bigtable-hbase-mirroring-client-core, so the mirroring-client shaded jars now bundle the newer Guava as well. Guava 33.7.2-jre depends on org.jspecify:jspecify instead of checker-qual. The mirroring-client shaded jars only relocated org.checkerframework, so the jspecify annotation classes landed in the jar under their original package and verify-shaded-jar-entries failed the build of bigtable-hbase-mirroring-client-1.x-shaded: Found forbidden entries in the shaded jar: org/jspecify/annotations/NonNull.class org/jspecify/annotations/NullMarked.class org/jspecify/annotations/NullUnmarked.class org/jspecify/annotations/Nullable.class Relocate org.jspecify under the shading prefix, next to the existing org.checkerframework relocation. The 2.x shaded module has the same relocation set and bundles the same Guava, so it gets the same change. Relocating was chosen over pinning these modules back to Guava 33.4.0-jre, which would have kept the vulnerable release in the mirroring-client jars.
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces security overrides for Guava, Jackson Core, and OpenTelemetry dependencies across shaded modules to address known CVEs, and adds shading relocations for org.jspecify. Feedback on the changes includes a recommendation to isolate the Guava version override to shaded modules using a separate property to avoid unintentionally upgrading unshaded modules. Additionally, a correction is suggested in the bigtable-hbase-2.x-shaded POM where tags were incorrectly used instead of within the block.
…cy tags Address review comments on PR googleapis#4647: - Restore guava.version to 33.4.0-jre in the root pom and introduce guava-override.version (33.7.2-jre) for the shaded modules only, so unshaded modules such as bigtable-hbase-mirroring-client-core remain unchanged. - Add dependencyManagement entries for com.google.guava:guava using ${guava-override.version} to bigtable-hbase-mirroring-client-1.x-shaded and bigtable-hbase-mirroring-client-2.x-shaded, and update the bigtable-hbase-{1,2}.x-shaded overrides to use ${guava-override.version}. - Use <ignoredDependency> instead of <dependency> inside <ignoredDependencies> for verify-mirror-deps-hbase-cbt in bigtable-hbase-2.x-shaded/pom.xml to match bigtable-hbase-1.x-shaded.
nimf
approved these changes
Nov 25, 2026
vinayakumarb
approved these changes
Nov 25, 2026
nimf
approved these changes
Nov 25, 2026
sushanb
approved these changes
Nov 25, 2026
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.
Problem
bigtable-hbase-1.x-shadedandbigtable-hbase-2.x-shaded(and therefore the-hadoopjars built from them) bundle relocated copies of thegoogle-cloud-bigtabledependency tree. Withgoogle-cloud-bigtable2.85.0 that tree resolves three libraries with known vulnerabilities (OSV.dev):com.fasterxml.jackson.core:jackson-core:2.18.3com.google.guava:guava:33.6.0-jreio.opentelemetry:opentelemetry-api:1.62.0Bumping the veneer alone does not fix this: the dependency BOM behind
google-cloud-bigtable2.88.0 moves jackson to 2.22.4 but still manages guava 33.6.0-jre and opentelemetry 1.62.0.Changes
pom.xml:guava.version33.4.0-jre → 33.7.2-jre, and newjackson-core.version(2.18.12) andopentelemetry.version(1.67.0) properties, with a comment saying when the overrides can be removed.bigtable-hbase-1.x-shaded,bigtable-hbase-2.x-shaded: explicitdependencyManagemententries forguava,jackson-coreand the nineio.opentelemetryartifacts the veneer uses (API, context, common and the SDK modules are kept on one version). Explicit entries take precedence over the imported veneer BOMs.verify-mirror-depsagainstgoogle-cloud-bigtable: the overridden artifacts are added toignoredDependencies, since they are now deliberately newer than the veneer's versions.bigtable-hbase-mirroring-client-1.x-shaded,-2.x-shaded: add anorg.jspecifyrelocation.bigtable-hbase-mirroring-client-coreusesguava.version, and guava 33.7.2-jre depends onjspecifyinstead ofchecker-qual; without the relocationverify-shaded-jar-entriesfails on unrelocatedorg/jspecify/annotationsclasses.The overrides are scoped to the shaded modules rather than the root
dependencyManagement, so the unshaded modules keep mirroring the veneer and HBase dependency versions exactly.Verification
bigtable-hbase-2.x-hadoopwere queried against OSV.dev before and after: 6 findings before, 0 after.bigtable-hbase-1.x-shadedbundles the same third-party set.bigtable-hbase-2.x-hadoopjar reports guava 33.7.2-jre, jackson-core 2.18.12 and OpenTelemetry SDK 1.67.0.mvn clean install -Dclirr.skip=truewith unit tests forked on JDK 11 passes for 44 of 45 modules, including the shaded, hadoop and mirroring-client modules and theirverify-*checks.bigtable-beam-import. My local Maven mirror is missing severalio.netty:*:4.1.133.Finalartifacts that Beam 2.77.0 requires, so dependency resolution fails before compilation. This PR does not touch that module or netty; relying on CI for it.Not addressed
bigtable-hbase-2.x-hadoopalso declareshbase-client2.6.4-hadoop3 as a regular (non-bundled) dependency. Its transitive dependencies (for example guava 27.0-jre, netty 4.1.105.Final, zookeeper 3.8.4, bcprov-jdk18on 1.78.1, jackson-databind 2.12.7.1, protobuf-java 2.5.0) have known advisories of their own. They come from HBase/Hadoop, are not inside the jar, and are left for a separate change.Checklist
hbase-clientCVEs remain open on Core: Address known CVEs in bigtable-hbase-2.x-hadoop shaded and transitive dependencies #4646)