Skip to content

Build: bump Jackson to fix CVE GHSA-r7wm-3cxj-wff9 - #17336

Merged
kevinjqliu merged 6 commits into
apache:mainfrom
Guosmilesmile:fix_cve
Jul 28, 2026
Merged

Build: bump Jackson to fix CVE GHSA-r7wm-3cxj-wff9#17336
kevinjqliu merged 6 commits into
apache:mainfrom
Guosmilesmile:fix_cve

Conversation

@Guosmilesmile

@Guosmilesmile Guosmilesmile commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

This PR updates the Spark 3.5 runtime Jackson dependency alignment to address GHSA-r7wm-3cxj-wff9.

  • Bumps Spark 3.5 forced Jackson dependencies from the jackson215 version set to jackson218.
  • Updates the Spark 3.5 runtime dependency baseline for jackson-core and jackson-databind.
  • Documents the remaining Kafka Connect runtime vulnerability finding as coming from the shaded Jackson copy embedded in parquet-jackson, which cannot be upgraded independently of Apache Parquet.

@Guosmilesmile Guosmilesmile changed the title Build: bump Jackson from 2.15 to 2.18 to fix CVE GHSA-r7wm-3cxj-wff9 Build: bump Jackson to fix CVE GHSA-r7wm-3cxj-wff9 Jul 22, 2026
@nssalian

nssalian commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

@Guosmilesmile thanks for putting this fix. Seeing CI failures in other PRs. Would be great to get this in. Do you mind adding the description to the PR so the change rationale is clear?

@nssalian
nssalian requested review from kevinjqliu and nastra and removed request for kevinjqliu July 22, 2026 23:46
@Guosmilesmile

Copy link
Copy Markdown
Contributor Author

@Guosmilesmile thanks for putting this fix. Seeing CI failures in other PRs. Would be great to get this in. Do you mind adding the description to the PR so the change rationale is clear?

OK

@pvary

pvary commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Thanks @Guosmilesmile!
I haven't found this, and merged #17344 as a quick fix.

Please rebase above the current as I like your better.

Maybe we can even try to upgrade Spark 3.5 to the new version too. If that works that would be even better.

@Guosmilesmile

Copy link
Copy Markdown
Contributor Author

Thanks @Guosmilesmile! I haven't found this, and merged #17344 as a quick fix.

Please rebase above the current as I like your better.

Maybe we can even try to upgrade Spark 3.5 to the new version too. If that works that would be even better.

@pvary Thank you very much for the reminder. I removed the "ignore" section for Spark, and aligned the 3.5 version with the 4.1 version by upgrading it.

Comment thread spark/v3.5/build.gradle Outdated
Comment on lines +33 to +35
force "com.fasterxml.jackson.module:jackson-module-scala_${scalaVersion}:${libs.versions.jackson221.get()}"
force "com.fasterxml.jackson.core:jackson-databind:${libs.versions.jackson221.get()}"
force "com.fasterxml.jackson.core:jackson-core:${libs.versions.jackson221.get()}"

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.

If we do this, do we need the GHSA-r7wm-3cxj-wff9 in spark-runtime-3.5.trivyignore?

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.

Also, how sure are we that Spark works with a different fasterxml version?

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.

If we do this, do we need the GHSA-r7wm-3cxj-wff9 in spark-runtime-3.5.trivyignore?

Yes, so I remove GHSA-r7wm-3cxj-wff9 in spark-runtime-3.5.trivyignore.

Also, how sure are we that Spark works with a different fasterxml version?

Good question. Since com.fasterxml is relocated to org.apache.iceberg.shaded.com.fasterxml(relocate 'com.fasterxml', 'org.apache.iceberg.shaded.com.fasterxml'), the Jackson copy included in the Iceberg runtime jar is isolated from Spark's own Jackson jars and should not override them.

I verified dependency resolution for Spark 3.5 and it now resolves jackson-core, jackson-databind, and jackson-module-scala_2.12 to 2.21.4.

However, that is not a full compatibility guarantee, so we should validate this with Spark 3.5 tests.

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.

Good. Let's remove and see.

Also we might want to ask someone with more spark experience.
Maybe @szehon-ho or @huaxingao?

What do you think @szehon-ho or @huaxingao: If we change the relocated jackson version from 2.15.2 to 2.21.4, would that cause any issues for the users if the Spark test are green?

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.

My previous submission has already removed the GHSA-r7wm-3cxj-wff9 in spark-runtime-3.5.trivyignore.

As for the rest, let's hear what others think.

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.

each version of spark is using a different override right now

Looks like the CVE suggests 2.18.8 as the minimum version, GHSA-r7wm-3cxj-wff9

Should we use that instead of 2.21?

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.

Do we actually need this bump? The CVE (GHSA-r7wm-3cxj-wff9) is a DoS in Jackson's async/non-blocking parser, which isn't used on Iceberg's parsing paths (we use the blocking parser), and the jar is shaded — so it's not a reachable issue for us, just a scanner finding we already suppress.

If we do want to fix it (e.g. to keep downstream scanners quiet), I'd lean toward 2.18.8: it's the minimal patched version that clears the finding (Spark 4.0 ships it and needs no ignore), and it's the smallest jump from 3.5's native 2.15.2.

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.

Do we actually need this bump?

I agree. If we dont exercise this particular code path then lets not bump this and avoid potentially introducing new issues

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.

This PR was originally meant to fix the CVEs for both Kafka and Spark together. The Kafka part has already been merged. As for the Spark part, I feel that if we can fix the vulnerability by bumping the jar version, that might be a cleaner approach than just suppressing it in spark-runtime-3.5.trivyignore.
That said, I'm happy to go with whatever the majority thinks is best here :)

@Guosmilesmile

Copy link
Copy Markdown
Contributor Author

Change spark jackson 2.21 to 2.18 to keep the smallest jump

# jackson-databind CVEs that are only fixed in jackson >= 2.18.8.
CVE-2026-54512
CVE-2026-54513
GHSA-r7wm-3cxj-wff9

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

is this file still accurate after bumping jackson to 2.18.8?

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.

Thanks for pointing it out. Also remove CVE-2026-54512 and CVE-2026-54513.

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.

looks like this file is now empty, and we can either remove it completely or keep only a skeleton. but we should remove the lines about jackson

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.

Make sense. Remove the lines about jackson now.

Comment thread spark/v3.5/build.gradle

@kevinjqliu kevinjqliu left a comment

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.

LGTM.

I see the tradeoff as:

  • Upgrade to 2.18.8: Small compatibility risk, mitigated by shading and the existing test coverage.
  • Stay on 2.15: Very low current exploitability, but continue shipping known-vulnerable code with future reachability and compliance risk.

I lean towards the upgrade. The current tests provide sufficient coverage to keep the compatibility risk low.

# jackson-databind CVEs that are only fixed in jackson >= 2.18.8.
CVE-2026-54512
CVE-2026-54513
GHSA-r7wm-3cxj-wff9

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.

looks like this file is now empty, and we can either remove it completely or keep only a skeleton. but we should remove the lines about jackson

Comment thread .github/trivyignore/spark-runtime-3.5.trivyignore Outdated
@kevinjqliu
kevinjqliu requested a review from huaxingao July 28, 2026 15:05

@mbutrovich mbutrovich left a comment

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.

I lean towards the upgrade. The current tests provide sufficient coverage to keep the compatibility risk low.

I agree with this assessment. I think the reasoning to do a minimal 2.18.8 bump, despite Iceberg not using the code path in question, is the right call. We're minimizing the risk of surprise changes by not jumping to a much newer version, and we have CI as a backstop for correctness.

Comment on lines 29 to 33
CVE-2026-54512
CVE-2026-54513
# jackson-core CVE shaded into parquet-jackson, only fixed in jackson
# >= 2.18.8 / 2.21.4 / 2.22.1.
GHSA-r7wm-3cxj-wff9

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.

we should look into cleaning these up too

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@Guosmilesmile do you mind following up with the items here?

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.

I will raise a pr to fix it later

@kevinjqliu

Copy link
Copy Markdown
Contributor

Im comfortable moving forward with this PR, thanks @Guosmilesmile for the fix and everyone for the review!

@kevinjqliu
kevinjqliu merged commit 49b2556 into apache:main Jul 28, 2026
36 checks passed
@Guosmilesmile
Guosmilesmile deleted the fix_cve branch July 28, 2026 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants