Skip to content

fix(deps): bump gson to 2.11.0 to patch CVE-2022-25647#81

Open
Gabrielpanga wants to merge 1 commit into
masterfrom
fix/bump-gson-cve-2022-25647
Open

fix(deps): bump gson to 2.11.0 to patch CVE-2022-25647#81
Gabrielpanga wants to merge 1 commit into
masterfrom
fix/bump-gson-cve-2022-25647

Conversation

@Gabrielpanga

Copy link
Copy Markdown
Member

What

Bumps the direct com.google.code.gson:gson dependency from 2.8.02.11.0.

Why

Resolves Dependabot alert #11CVE-2022-25647 / GHSA-4jrv-ppp4-jm57 (high): Deserialization of Untrusted Data in Gson, affecting < 2.8.9.

gson is declared directly in pom.xml, so the transitive copy pulled by retrofit:converter-gson does not shadow it — the direct declaration must be bumped.

Version choice

2.11.0 over the minimal 2.8.9: mature, widely adopted, retains the Java 8 baseline the SDK targets, and rolls up every fix since. FieldNamingPolicy.IDENTITY semantics (the byte-for-byte field-matching the DTOs rely on) are unchanged across these versions.

Verification

  • mvn -B dependency:tree confirms gson:2.11.0 resolved
  • mvn -B package → BUILD SUCCESS, 4/4 unit tests pass

gson < 2.8.9 is vulnerable to deserialization of untrusted data
(CVE-2022-25647 / GHSA-4jrv-ppp4-jm57, high). The dependency is declared
directly in pom.xml, so the transitive copy from retrofit converter-gson
does not shadow it.

Bumped to 2.11.0 (mature, Java 8 baseline, covers the CVE and all fixes
since). Build + unit tests pass; FieldNamingPolicy.IDENTITY behavior is
unchanged across these versions.
@Gabrielpanga Gabrielpanga force-pushed the fix/bump-gson-cve-2022-25647 branch from 6542b8c to adb6869 Compare June 10, 2026 08:51

@Gabrielpanga Gabrielpanga left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Review — ✅ Approve

Diff: +1 −1, 1 file. Clean and complete.

  • Correct fix for CVE-2022-25647 / GHSA-4jrv-ppp4-jm57 (high). gson is a direct dependency, so bumping the declaration to 2.11.0 actually takes effect — confirmed via mvn dependency:tree that gson:2.11.0 resolves with no older transitive copy shadowing it (the transitive one from retrofit:converter-gson is older and was being overridden).
  • Version choice 2.11.0 retains the Java 8 baseline the SDK targets and leaves FieldNamingPolicy.IDENTITY semantics unchanged — no risk to the byte-for-byte DTO field matching.
  • mvn -B package → BUILD SUCCESS, 4/4 unit tests pass.

Rebased onto current master. Ready to merge once approved.

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.

1 participant