CVE-2022-25845 Deserialization of Untrusted Data
Attackers can execute arbitrary code on remote servers by bypassing autoType restrictions in the fastjson library.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2022-25845?
CVE-2022-25845 is a high-severity unsafe deserialization vulnerability in com.alibaba:fastjson, published on 10 Jun 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
The package com.alibaba:fastjson before 1.2.83 are vulnerable to Deserialization of Untrusted Data by bypassing the default autoType shutdown restrictions, which is possible under certain conditions. Exploiting this vulnerability allows attacking remote servers. Workaround: If upgrading is not possible, you can enable [safeMode](https://github.com/alibaba/fastjson/wiki/fastjson_safemode).
Weakness: CWE-502
Which versions are affected by CVE-2022-25845?
2 open source packages ship an affected version, including com.alibaba:fastjson. It affects 2 products.
| Package | Affected | Fixed in |
|---|---|---|
com.alibaba:fastjson Maven | From 1.2.25 | 1.2.83 |
com.alibaba:fastjson Maven | From 1.2.25 | 1.2.83 |
Products include Alibaba Fastjson, Oracle Communications Cloud Native Core Unified Data Repository.
How do I fix CVE-2022-25845?
Upgrade com.alibaba:fastjson to 1.2.83 or later.
Upgrade, and only deserialise data from trusted sources or with an allow-list of types. More about Unsafe deserialization.
Is CVE-2022-25845 being exploited?
There is no known exploitation of CVE-2022-25845 in the wild and no public exploit code.
Public exploit code: 5 proofs of concept on GitHub.
Other vulnerabilities in com.alibaba:fastjson
Sources
Also known as GHSA-pv7h-hx5h-mgfj, SNYK-JAVA-COMALIBABA-2859222.