Skip to content

Fix CVE-2026-54512: shade patched jackson-databind into agent-core - #932

Open
rkrumins wants to merge 2 commits into
AbsaOSS:developfrom
rkrumins:fix/cve-2026-54512-jackson
Open

rkrumins wants to merge 2 commits into
AbsaOSS:developfrom
rkrumins:fix/cve-2026-54512-jackson

Conversation

@rkrumins

@rkrumins rkrumins commented Aug 18, 2026

Copy link
Copy Markdown

By default, Spline Spark Agent code repo shipped jackson-databind 2.15.1 inside the third-party artifact za.co.absa.shaded:absa-shaded-jackson:0.0.1. That version is within the range affected by CVE-2026-54512 (CVSS 8.1, PolymorphicTypeValidator bypass via generic type parameters) and its siblings CVE-2026-54513..54518.

Because the classes are relocated to za.co.absa.shaded.jackson, the host Spark cluster's own Jackson cannot override them - the agent carried its own vulnerable copy into every bundle from Spark 2.2 through 3.5.

absa-shaded-jackson has only ever published 0.0.1, so there was no version to bump and no <jackson.version> property in this repo to change. This commit takes ownership of the Jackson version instead: agent-core now depends on vanilla Jackson and relocates it itself via maven-shade-plugin, using the za.co.absa.spline.shaded.* prefix already used for classgraph, fastparse and java-uuid-generator.

Jackson is bumped 2.15.1 -> 2.18.10. Note that 2.19.x and 2.20.x are NOT patched for this CVE cluster; the fixes landed only in 2.18.8+, 2.21.4+ and 3.1.4. 2.18.10 is the newest of the patched 2.18 line, keeps the Java 8 baseline this project requires, and publishes both _2.11 and _2.12 artifacts.

Changes:

  • core/pom.xml: replace absa-shaded-jackson / absa-shaded-jackson-module-scala with com.fasterxml.jackson.* behind a new <jackson.version> property, so any future CVE is a one-line change.
  • core/pom.xml: add maven-shade-plugin relocating com.fasterxml.jackson and com.thoughtworks.paranamer. combine.self="override" is required so the module does not inherit the bundle-oriented shade config from the parent pom. META-INF/versions/** is excluded because jackson-core 2.18 ships a multi-release overlay compiled to class file major version 65, which maven-shade-plugin 3.4.1 cannot read - it fails the core build and would fail all nine bundle builds that re-shade this jar.
  • HarvesterJsonSerDe.scala: imports back to vanilla com.fasterxml.jackson.*. Shading rewrites the bytecode at package time, so no behaviour changes.

No bundle POM needed changing - all nine inherit the fix through agent-core.

Verified on every bundle (Spark 2.2, 2.3, 2.4, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, across Scala 2.11 and 2.12): each jar carries the relocated Jackson at 2.18.10 and zero un-relocated jackson-databind/jackson-core classes. agent-core's dependency-reduced POM lists no com.fasterxml.jackson coordinate, so standalone --packages agent-core users cannot resolve vulnerable Jackson transitively either.

Summary by CodeRabbit

  • Bug Fixes
    • Improved JSON serialization and deserialization reliability.
    • Enhanced compatibility with supported runtime environments and library versions.
    • No changes to existing JSON behavior or public functionality.

The agent shipped jackson-databind 2.15.1 inside the third-party artifact
za.co.absa.shaded:absa-shaded-jackson:0.0.1. That version is within the range
affected by CVE-2026-54512 (CVSS 8.1, PolymorphicTypeValidator bypass via
generic type parameters) and its siblings CVE-2026-54513..54518.

Because the classes are relocated to za.co.absa.shaded.jackson, the host Spark
cluster's own Jackson cannot override them - the agent carried its own
vulnerable copy into every bundle from Spark 2.2 through 3.5.

absa-shaded-jackson has only ever published 0.0.1, so there was no version to
bump and no <jackson.version> property in this repo to change. This commit
takes ownership of the Jackson version instead: agent-core now depends on
vanilla Jackson and relocates it itself via maven-shade-plugin, using the
za.co.absa.spline.shaded.* prefix already used for classgraph, fastparse and
java-uuid-generator.

Jackson is bumped 2.15.1 -> 2.18.10. Note that 2.19.x and 2.20.x are NOT
patched for this CVE cluster; the fixes landed only in 2.18.8+, 2.21.4+ and
3.1.4. 2.18.10 is the newest of the patched 2.18 line, keeps the Java 8
baseline this project requires, and publishes both _2.11 and _2.12 artifacts.

Changes:
* core/pom.xml: replace absa-shaded-jackson / absa-shaded-jackson-module-scala
  with com.fasterxml.jackson.* behind a new <jackson.version> property, so any
  future CVE is a one-line change.
* core/pom.xml: add maven-shade-plugin relocating com.fasterxml.jackson and
  com.thoughtworks.paranamer. combine.self="override" is required so the module
  does not inherit the bundle-oriented shade config from the parent pom.
  META-INF/versions/** is excluded because jackson-core 2.18 ships a
  multi-release overlay compiled to class file major version 65, which
  maven-shade-plugin 3.4.1 cannot read - it fails the core build and would fail
  all nine bundle builds that re-shade this jar.
* HarvesterJsonSerDe.scala: imports back to vanilla com.fasterxml.jackson.*.
  Shading rewrites the bytecode at package time, so no behaviour changes.

No bundle POM needed changing - all nine inherit the fix through agent-core.

Verified on every bundle (Spark 2.2, 2.3, 2.4, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5,
across Scala 2.11 and 2.12): each jar carries the relocated Jackson at 2.18.10
and zero un-relocated jackson-databind/jackson-core classes. agent-core's
dependency-reduced POM lists no com.fasterxml.jackson coordinate, so standalone
--packages agent-core users cannot resolve vulnerable Jackson transitively
either.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@wajda

wajda commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d99a603e-6d49-48c9-a3b8-ddca9fce8e41

📥 Commits

Reviewing files that changed from the base of the PR and between 3db5251 and 9d60c8c.

📒 Files selected for processing (2)
  • core/pom.xml
  • core/src/main/scala/za/co/absa/spline/harvester/json/HarvesterJsonSerDe.scala

Included review availability: Your plan includes up to 2 reviews per rolling hour; 1 remains after this review.


Walkthrough

The core module now declares standard Jackson and Paranamer dependencies, shades and relocates them into the core JAR, and updates HarvesterJsonSerDe to use standard Jackson imports.

Changes

Jackson shading migration

Layer / File(s) Summary
Direct dependencies and shaded packaging
core/pom.xml
The build defines Jackson 2.18.10 and Paranamer 2.8, declares direct dependencies, and configures Maven Shade to relocate packages and preserve required resources.
Serializer package imports
core/src/main/scala/za/co/absa/spline/harvester/json/HarvesterJsonSerDe.scala
The serializer uses standard com.fasterxml.jackson imports. Its serialization and deserialization behavior remains unchanged.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to cd4ba

The PR updates the bundled Jackson dependency to the patched version without any identified merge-blocking issue; no actionable risk remains beyond normal checks and review.

Suggested reviewers: cerveada, absaoss-build-agent

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the CVE fix and the main change: shading patched Jackson into agent-core.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit packs jars with care,
Jackson hops through shaded air.
Imports wear a standard name,
The mapper keeps its steady game.
Paranamer joins the ride—
Neat core bytes tucked inside.

Comment @coderabbitai help to get the list of available commands.

@rkrumins

Copy link
Copy Markdown
Author

Please let me know @wajda / @cerveada if this works for you!

@sonarqubecloud

sonarqubecloud Bot commented Sep 9, 2026

Copy link
Copy Markdown

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants