CVE-2022-25845 Deserialization of Untrusted Data

High 8.1 Published Updated

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.

PackageAffectedFixed in
com.alibaba:fastjson MavenFrom 1.2.251.2.83
com.alibaba:fastjson MavenFrom 1.2.251.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.

Sources

Also known as GHSA-pv7h-hx5h-mgfj, SNYK-JAVA-COMALIBABA-2859222.

Is CVE-2022-25845 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free