Skip to content

Bump Jackson 2.15.1 to 2.18.12 and import jackson-bom - #16309

Open
deepika-lalwani123 wants to merge 3 commits into
developfrom
vuln/cl-05-jackson-bom
Open

deepika-lalwani123 wants to merge 3 commits into
developfrom
vuln/cl-05-jackson-bom

Conversation

@deepika-lalwani123

@deepika-lalwani123 deepika-lalwani123 commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Bump Jackson 2.15.1 to 2.18.12 and import jackson-bom

Stacked PR (restacked 11/17): based on #16307. Review only the top commit 9e3818e10a9. Merge together with #16310. Order: #16325 → #16307 → #16309 + #16310 → #16311 → #16312.

Merge together with #16325 (maven-bundle-plugin 3.5.0 in cdap-data-streams). Without it, the data-streams system artifact fails to package (module-info.class in gson 2.8.9 / jackson-annotations 2.18.12).

Merge pair: #16309 and #16310 must merge together (and be cherry-picked to release/6.11 together).

Stacked on #16308 (retarget to develop after the earlier PRs merge).

What changes

Root pom.xml only:

Artifact From To
jackson.version (core, databind, annotations, dataformat-cbor, module-scala_2.12) 2.15.1 2.18.12
jackson-jaxrs-json-provider, jackson-jaxrs-base, jackson-module-jaxb-annotations (unmanaged, from hadoop-yarn-common) 2.12.7 2.18.12 (via com.fasterxml.jackson:jackson-bom import)

The jackson-bom import sits after the explicit Jackson entries, so the explicit entries still win and the BOM only fills in the modules that were not managed. Without it, the jaxrs / jaxb 2.12.7 modules would run on databind 2.18.

Why

Image scanning of gcr.io/cdapio/cdap reports Jackson CVEs. 2.18.12 is the minimum that fixes them all (it also fixes a newer Critical, which is why it is above the 2.18.x floor). All jars are Java 8.

Findings

Stack order

This PR now sits below the SnakeYAML 2.0 / client-java 17 PR (#16310), which is stacked on it. It moves jackson-dataformat-yaml in master/lib (from elasticsearch-x-content) from 2.8.11 to 2.18.12, which works with SnakeYAML 2.0. Merge gate (paired PRs): 2.18.12 needs SnakeYAML 1.33 or later, and master/lib has SnakeYAML 1.17 (from elasticsearch-x-content) until the SnakeYAML PR; the old 2.8.11 does not work with SnakeYAML 2.0. So this PR and the SnakeYAML PR must merge in the same push (or as one PR with two commits), and the release/6.11 cherry-picks must keep them together, the same rule as the quartz pair.

Risk

Medium-low. CDAP src/main has no Jackson imports; CDAP serializes with Gson. Jackson users are libraries: AWS SDK (emr), avro (program-report), Hadoop YARN JSON, google-cloud-storage (dataproc) and google-http-client-jackson2 (cloudkms). SparkRunnerClassLoader only filters the com.fasterxml.jackson.* package, so Spark programs keep using Spark's own Jackson; bumping jackson-module-scala_2.12 does not touch $SPARK_HOME/jars.

Testing (JDK 1.8.0_382, Checkstyle on, 0 violations)

  • mvn package: cdap-runtime-ext-emr 1/1, cdap-runtime-ext-dataproc 85/85, cdap-securestore-ext-cloudkms 5/5.
  • Reactor build from this branch (-Ptemplates -am): ReportGenerationAppTest 3/3 (program-report, avro path); cdap-spark-core3_2.12 43/43; cdap-data-pipeline3_2.12 DataPipelineTest Spark methods (testSparkSinkAndCompute, testInnerJoinSpark, testSparkSimpleMultipleSource) 3/3; cdap-unit-test-spark3_2.12 Spark2Test 6/7.
  • Spark2Test.testPySpark fails only because the local Python is 3.13, which cannot import pyspark 3.3 (No module named 'typing.io'). The failure happens in the Python import, before any Jackson code runs. Please confirm it on CI, which uses an older Python.
  • dependency:tree (emr, dataproc, cloudkms, program-report, app-fabric, spark-core3): every com.fasterxml.jackson artifact, including jaxrs-base, jaxrs-json-provider, module-jaxb-annotations and module-scala_2.12, resolves to 2.18.12.
  • Still to run: S1 / S2 on an image that also has Spark 3.5.8.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request updates and centralizes various dependency versions in the parent pom.xml, including upgrades for Jackson, Netty, Jetty, Logback, and Gson, and introduces BOM imports to better manage transitive dependencies. It also removes the quartz update check in AppFabricServiceRuntimeModule.java and cleans up unused properties in child modules. The reviewer feedback correctly identifies several redundant version declarations and property overrides in child pom.xml files (such as gson.version, logback, httpclient, and httpcore) that can now be safely removed since they are managed centrally by the parent POM.

<okhttp.version>4.9.1</okhttp.version>
<!-- Needs to define the gson and guava versions to override the one from dependency management in cdap pom.xml -->
<gson.version>2.8.6</gson.version>
<gson.version>2.8.9</gson.version>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Since the parent pom.xml now manages gson.version to 2.8.9, this local property override is redundant and can be safely removed. Note that the comment on line 37 is also now outdated but cannot be modified directly in this diff.

Comment thread cdap-kubernetes/pom.xml
<okhttp.version>4.9.1</okhttp.version>
<!-- Needs to define the gson and guava versions to override the one from dependency management in cdap pom.xml -->
<gson.version>2.8.6</gson.version>
<gson.version>2.8.9</gson.version>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Since the parent pom.xml now manages gson.version to 2.8.9, this local property override is redundant and can be safely removed.

Comment thread cdap-kubernetes/pom.xml
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.8</version>
<version>${logback.version}</version>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Since logback-classic is managed in the parent pom.xml's <dependencyManagement>, specifying the version here is redundant and can be removed.

Comment thread cdap-kubernetes/pom.xml
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>1.2.8</version>
<version>${logback.version}</version>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Since logback-core is managed in the parent pom.xml's <dependencyManagement>, specifying the version here is redundant and can be removed.

<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.2</version>
<version>${httpclient.version}</version>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Since httpclient is now managed in the parent pom.xml's <dependencyManagement>, specifying the version here is redundant and can be removed.

<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.4.4</version>
<version>${httpcore.version}</version>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Since httpcore is now managed in the parent pom.xml's <dependencyManagement>, specifying the version here is redundant and can be removed.

Comment thread cdap-standalone/pom.xml
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.2</version>
<version>${httpclient.version}</version>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Since httpclient is now managed in the parent pom.xml's <dependencyManagement>, specifying the version here is redundant and can be removed.

Comment thread cdap-standalone/pom.xml
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.4.4</version>
<version>${httpcore.version}</version>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Since httpcore is now managed in the parent pom.xml's <dependencyManagement>, specifying the version here is redundant and can be removed.

cdap-data-streams3_2.12 was the only system-artifact module still on
maven-bundle-plugin 3.3.0. cdap-data-pipeline3_2.12, cdap-etl-batch and
cdap-program-report already use 3.5.0.

The bnd in 3.3.0 can't parse the root-level module-info.class shipped in
gson 2.8.9 and jackson-annotations 2.18.12 (the CVE bumps in this
stack). Packaging fails with "Invalid class file module-info.class
(java.lang.ArrayIndexOutOfBoundsException: 19)", and cdap-master -Pdist
can't produce the data-streams system artifact. 3.5.0 handles it.

Checked locally (JDK 8):
- On develop, the data-streams bundle built with 3.3.0 and with 3.5.0
  is the same: same 28 embedded jars, same Export-Package and
  Import-Package, same Require-Capability.
- On this stack, packaging fails with 3.3.0 and succeeds with 3.5.0. The
  only bundle differences from develop are the intended version bumps
  (gson 2.8.9, logback 1.2.13).

maven-bundle-plugin 5.1.9 was also tried. It builds, but changes what
gets embedded: 11 to 17 extra jars per bundle, including cdap-api-common,
cdap-runtime-spi, scala-library, jetty 9.4.51 and jackson 2.15.1. So it
was not used here.
Root pom.xml:
- jgit 5.9.0.202009080501-r -> 5.13.5.202508271544-r (stays on 5.x;
  6.x needs Java 11). 5.13.4.202507202350-r fixes the same CVEs but
  was built on JDK 17 without --release 8: it calls the Java 9+
  ByteBuffer.mark() overload and fails on Java 8 with
  NoSuchMethodError (all RepositoryManagerTest cases fail). 5.13.5 is
  the 5.13.4 fix release for this.
- gson.version 2.3.1 -> 2.8.9.
- log4j2.slf4j.version (log4j-to-slf4j / log4j-api) 2.20.0 -> 2.25.5.
- commons-lang3 3.12.0 -> 3.18.0 (must precede commons-configuration2
  2.15.0 in CL-07).
cdap-master/pom.xml: remove the commons-io 2.12.0 override in the k8s
profile so master/lib uses the managed commons-io 2.15.1.

The quartz 2.3.2 bump needs a code change, so it is in the next commit
(vuln/cl-09b-code) together with that change; every commit builds.

Why: CVE fixes from image scanning of gcr.io/cdapio/cdap. Closes jgit
b/578567823 (High) and b/578495338 (Medium). Platform side of
log4j-api b/578584043 and commons-io b/578659719.

Risk: low to medium. gson is used in many modules and is visible to
plugins.

Testing: JDK 8, Checkstyle on: cdap-source-control (all tests),
cdap-proto (all tests), cdap-common LocationsTest, cdap-app-fabric
compile and TimeSchedulerTest; mvn dependency:tree for the bumped
artifacts.
Versions:
- jackson.version 2.15.1 -> 2.18.12 (jackson-core, jackson-databind,
  jackson-annotations, jackson-dataformat-cbor, jackson-module-scala_2.12)
- jackson-jaxrs-json-provider, jackson-jaxrs-base and
  jackson-module-jaxb-annotations 2.12.7 -> 2.18.12. These come from
  hadoop-yarn-common and were not managed; importing
  com.fasterxml.jackson:jackson-bom after the explicit entries aligns
  them with databind.

Why: image scanning of gcr.io/cdapio/cdap reports Jackson CVEs.
2.18.12 is the minimum version that fixes all of them and runs on
Java 8.

Bugs: closes b/578521062 and b/578660123; part of the shared Jackson
bug set (with CL-04 and CL-10).

Merge gate (paired with the SnakeYAML 2.0 commit stacked directly
on this one): this commit moves jackson-dataformat-yaml in
master/lib (from elasticsearch-x-content) from 2.8.11 to 2.18.12.
2.18.12 needs SnakeYAML 1.33 or later, and master/lib has 1.17
until the next commit; the old 2.8.11 does not work with SnakeYAML
2.0. So the two commits must merge in the same push (one PR with
two commits), also on release/6.11.

Risk: medium-low. CDAP src/main does not import Jackson (CDAP uses
Gson). Users are libraries: AWS SDK (emr), avro (program-report),
Hadoop YARN, google-cloud-storage (dataproc), google-http-client
(cloudkms). Spark programs keep using Spark's own Jackson.

Testing (JDK 8, Checkstyle on): cdap-runtime-ext-emr,
cdap-runtime-ext-dataproc, cdap-securestore-ext-cloudkms mvn package
pass; ReportGenerationAppTest, cdap-spark-core3_2.12 (43 tests),
DataPipelineTest Spark methods on cdap-data-pipeline3_2.12 and
Spark2Test on cdap-unit-test-spark3_2.12 pass, except testPySpark,
which fails because the local Python 3.13 cannot import pyspark 3.3
(typing.io was removed); unrelated to Jackson. dependency:tree shows
every com.fasterxml.jackson artifact at 2.18.12.
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>3.3.0</version>
<version>3.5.0</version>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can the latest 3.x version - 3.5.1 be used instead?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done. #16325 merged before I could update it, so the bump to 3.5.1 is in follow-up PR #16333 (cdap-data-streams package build verified).

Comment thread pom.xml
<junit.version>4.11</junit.version>
<hamcrest.version>2.2</hamcrest.version>
<log4j2.slf4j.version>2.20.0</log4j2.slf4j.version>
<log4j2.slf4j.version>2.25.5</log4j2.slf4j.version>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can 2.26.1 be used instead as it have additional vuln fixes?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done. #16307 merged before I could update it, so the bump to 2.26.1 is in follow-up PR #16334 (dependency tree verified: log4j-to-slf4j and log4j-api resolve to 2.26.1).

This branch has not been deployed

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

Labels

build Triggers github actions build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants