Skip to content

fix(deps): bump jackson-databind to 2.21.7 to fix CVE-2026-54512/54513 - #95

Merged
shossain786 merged 1 commit into
masterfrom
fix/json-schema-validator-3x-cve
Sep 30, 2026
Merged

shossain786 merged 1 commit into
masterfrom
fix/json-schema-validator-3x-cve

Conversation

@shossain786

Copy link
Copy Markdown
Contributor

What this does

Fixes #94. Bumps our direct jackson-databind pin from 2.21.0 to 2.21.7.

Root cause

Both CVEs are in jackson-databind itself (a PolymorphicTypeValidator bypass allowing arbitrary class instantiation during deserialization), with vulnerable range >= 2.19.0, < 2.21.4. Our own direct pin, 2.21.0, falls inside that range. Fixed upstream in 2.21.4; this bumps to the latest 2.21.x patch, 2.21.7.

Why not PR #89 (json-schema-validator 1.4.3 → 3.0.7)

Dependabot's PR targets the wrong dependency:

  • json-schema-validator is optional and only used by SchemaValidator. Its own transitive jackson version is overridden by our direct pin anyway (Maven nearest-wins mediation), so bumping it never touched the actually-vulnerable artifact in our build.
  • It also doesn't compile: 3.0.7 replaced the JsonSchemaFactory / JsonSchema / ValidationMessage API with a full rewrite onto tools.jackson (Jackson 3.x) — a different Jackson major line from the com.fasterxml.jackson 2.x we use everywhere else. Taking it would mean carrying two incompatible Jackson majors just for schema validation.

Recommend closing #89 in favor of this.

Testing

  • mvn dependency:tree confirms resolved jackson-databind is now 2.21.7 (was 2.21.0).
  • Full suite: 547 tests, 0 failures, 0 errors.

🤖 Generated with Claude Code

Our own direct pin (2.21.0) falls in the vulnerable range (>=2.19.0,
<2.21.4) for both CVEs — a PolymorphicTypeValidator bypass allowing
arbitrary class instantiation during deserialization. Fixed upstream
in 2.21.4; bumped to the latest 2.21.x patch (2.21.7).

Dependabot's PR #89 targeted json-schema-validator 1.4.3 -> 3.0.7
instead, but that dependency is optional and its transitive jackson
version is overridden by our direct pin anyway (Maven dependency
mediation), so bumping it doesn't touch the actually-vulnerable
artifact. It also doesn't build: 3.0.7 replaced the whole
JsonSchemaFactory/ValidationMessage API with a jackson 3.x
(tools.jackson) rewrite, which would pull in a second, incompatible
Jackson major version. Bumping our own jackson-databind pin fixes
the CVEs directly without any of that.

547 tests green.

Closes #94.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@shossain786
shossain786 merged commit 65b89ee into master Sep 30, 2026
2 checks passed
@shossain786
shossain786 deleted the fix/json-schema-validator-3x-cve branch September 30, 2026 05:17
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.

json-schema-validator 3.x migration (CVE-2026-54512, CVE-2026-54513)

1 participant