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.
EPSS places it among the vulnerabilities most likely to be exploited soon.
What to do
- Update com.google.code.gson:gson to 2.8.9 or a later version.
- Update Gson to 2.8.9 or a later version.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Com.google.code.gson:gson | com.google.code.gson:gson | before 2.8.9 | 2.8.9 |
| Gson | 2.2.3 up to, but not including, 2.8.9 | 2.8.9 | |
| Debian | Debian Linux | 9.0; 10.0; 11.0 | Not stated |
| NetApp | Active Iq Unified Manager | Not specified in the record | Not stated |
| Oracle | Financial Services Crime And Compliance Management Studio | 8.0.8.2.0; 8.0.8.3.0 | Not stated |
| Oracle | Graalvm | 20.3.6; 21.3.2; 22.1.0 | Not stated |
| Oracle | Retail Order Broker | 18.0; 19.1 | Not 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 system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 7.7 | High | CNA (snyk.io) |
| CVSS 3.1 | 7.5 | High | NVD |
| CVSS 2.0 | 5.0 | Medium | NVD |
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
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
- github.com/google/gson/pull/1991Third Party Advisory
- github.com/google/gson/pull/1991/commitsThird Party Advisory
- oracle.com/security-alerts/cpujul2022.htmlThird Party Advisory
Third-party and government advisories
- lists.debian.org/debian-lts-announce/2022/05/msg00015.htmlMailing List, Third Party Advisory
- lists.debian.org/debian-lts-announce/2022/09/msg00009.htmlThird Party Advisory
- security.netapp.com/advisory/ntap-20220901-0009/Third Party Advisory
- snyk.io/vuln/SNYK-JAVA-COMGOOGLECODEGSON-1730327Third Party Advisory
- debian.org/security/2022/dsa-5227Third Party Advisory
Recent Deserialization of Untrusted Data vulnerabilities
- 9.8 Critical severity
- 8.8 High severity
- 9.8 Critical severity
- 7.5 High severity
- 7.2 High severity
- 7.2 High severity
Spotted an error? Tell us.