HighGHSA-4jrv-ppp4-jm57CVE-2022-25647SNYK-JAVA-COMGOOGLECODEGSON-1730327

Deserialization of Untrusted Data in Gson

Published 3 May 2022 · Updated 10 Sept 2026

Is your project on an affected com.google.code.gson:gson?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Java apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected package

Affected
<2.8.9
Fixed in
2.8.9
Update to the fixed version for your release line, for example:mvn versions:use-dep-version -Dincludes=com.google.code.gson:gson -DdepVersion=2.8.9 -DforceVersion=true

Details

The package com.google.code.gson:gson before 2.8.9 is vulnerable to Deserialization of Untrusted Data via the writeReplace() method in internal classes, which may lead to denial of service attacks.

Is GHSA-4jrv-ppp4-jm57 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected com.google.code.gson:gson, and gives you the command that fixes it.

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.