CyberSecBulletin
CVE-2022-25647NVD status: Modified

com.google.code.gson:gson: Deserialization of Untrusted Data

CVE-2022-25647 is a high-severity deserialization of untrusted data vulnerability in com.google.code.gson:gson, with a CVSS 3.1 base score of 7.5 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. The record lists version 2.8.9 as the first without the flaw, so updating com.google.code.gson:gson to that release or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 12.2% chance of exploitation within 30 days, which is in the top 3.76% of all scored CVEs.

Patch this week

EPSS places it among the vulnerabilities most likely to be exploited soon.

What to do

  1. Update com.google.code.gson:gson to 2.8.9 or a later version.
  2. Update Gson to 2.8.9 or a later version.
  3. Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.

Affected products and versions

VendorProductAffected versionsFixed in
Com.google.code.gson:gsoncom.google.code.gson:gsonbefore 2.8.92.8.9
GoogleGson2.2.3 up to, but not including, 2.8.92.8.9
DebianDebian Linux9.0; 10.0; 11.0Not stated
NetAppActive Iq Unified ManagerNot specified in the recordNot stated
OracleFinancial Services Crime And Compliance Management Studio8.0.8.2.0; 8.0.8.3.0Not stated
OracleGraalvm20.3.6; 21.3.2; 22.1.0Not stated
OracleRetail Order Broker18.0; 19.1Not stated

Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.

How the severity score breaks down

Attack vector
NetworkCan be exploited remotely over a network, including the internet.
Attack complexity
LowNo special conditions are needed; the attack works reliably.
Privileges required
NoneNo account or login is needed.
User interaction
NoneNo action by a victim is required.
Scope
UnchangedImpact stays within the vulnerable component.
Confidentiality
NoneNo data is disclosed.
Integrity
NoneNothing can be modified.
Availability
HighThe component can be taken down completely.

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H. Scored by NVD.

Scoring systemScoreSeverityScored by
CVSS 3.17.7HighCNA (snyk.io)
CVSS 3.17.5HighNVD
CVSS 2.05.0MediumNVD

Official description

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

Source: the CVE record as published by its numbering authority, via NVD and CVE.org.

The underlying weakness: Deserialization of Untrusted Data

The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.

How developers prevent this class of flaw

  • If available, use the signing/sealing features of the programming language to assure that deserialized data has not been tainted. For example, a hash-based message authentication code (HMAC) could be used to ensure that data has not been modified.
  • When deserializing data, populate a new object rather than just deserializing. The result is that the data flows through safe input validation and that the functions are safe.
  • Explicitly define a final object() to prevent deserialization.

More Deserialization of Untrusted Data vulnerabilities (CWE-502)

Timeline

  1. CVE record published.
  2. CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: total).
  3. Record last changed materially (score, affected products, status or references).

References

Patches and release notes

Recent Deserialization of Untrusted Data vulnerabilities

Spotted an error? Tell us.