CVE-2022-25845

HIGH

fastjson < 1.2.83 - Deserialization of Untrusted Data via autoType Bypass

Title source: llm
STIX 2.1

Exploitation Summary

EIP tracks 7 public exploits for CVE-2022-25845. PoCs published by luelueking, hosch3n, ph0ebus.

AI-analyzed exploit summary This repository contains a proof-of-concept exploit for CVE-2022-25845, a deserialization vulnerability in Spring applications using FastJSON. The exploit demonstrates remote code execution by leveraging gadget chains to write malicious bytecode to a target directory and trigger its execution.

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

Exploits (7)

nomisec WORKING POC 106 stars
by luelueking · poc
https://github.com/luelueking/CVE-2022-25845-In-Spring

This repository contains a proof-of-concept exploit for CVE-2022-25845, a deserialization vulnerability in Spring applications using FastJSON. The exploit demonstrates remote code execution by leveraging gadget chains to write malicious bytecode to a target directory and trigger its execution.

Classification
Working Poc 95%
Attack Type
Deserialization
Complexity
Complex
Reliability
Reliable
Target: Spring applications using FastJSON
No auth needed
Prerequisites: Target application must be using FastJSON and have vulnerable dependencies (jackson, commons-io) · Network access to the target application
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 91 stars
by hosch3n · poc
https://github.com/hosch3n/FastjsonVulns

This repository contains a working PoC for CVE-2022-25845, a deserialization vulnerability in Fastjson 1.2.80. It includes payloads for exploiting the vulnerability via AspectJ and Groovy, demonstrating arbitrary code execution.

Classification
Working Poc 95%
Attack Type
Deserialization
Complexity
Moderate
Reliability
Reliable
Target: Fastjson 1.2.80
No auth needed
Prerequisites: Fastjson 1.2.80 or vulnerable version · Ability to send crafted JSON payloads to the target
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 7 stars
by ph0ebus · poc
https://github.com/ph0ebus/CVE-2022-25845-In-Spring

This repository contains a Python-based exploit for CVE-2022-25845, targeting Fastjson deserialization vulnerabilities in Spring applications. The exploit leverages a multi-step approach to achieve remote code execution (RCE) by writing a malicious class file to the target server and triggering its execution.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Fastjson (versions affected by CVE-2022-25845) in Spring applications
No auth needed
Prerequisites: Target server running vulnerable Fastjson version · Network access to the target server
devstral-2 · analyzed Feb 16, 2026 Full analysis →
github WORKING POC 5 stars
by JAckLosingHeart · javapoc
https://github.com/JAckLosingHeart/CVE-PoC-Collection/tree/main/fastjson-CVE-2022-25845

This repository contains a functional PoC for CVE-2022-25845, a Fastjson deserialization vulnerability leading to RCE via LDAP. The exploit leverages the `JndiConverter` class to trigger a malicious LDAP lookup, executing arbitrary code (e.g., `calc.exe`).

Classification
Working Poc 95%
Attack Type
Deserialization
Complexity
Moderate
Reliability
Reliable
Target: Fastjson (versions affected by CVE-2022-25845)
No auth needed
Prerequisites: LDAP server hosting malicious payload · Fastjson with `setAutoTypeSupport(true)` enabled
devstral-2 · analyzed Feb 27, 2026 Full analysis →
nomisec WORKING POC 1 stars
by nerowander · poc
https://github.com/nerowander/CVE-2022-25845-exploit

This PoC demonstrates a Fastjson auto-type bypass RCE vulnerability (CVE-2022-25845) by leveraging malicious JSON deserialization to execute arbitrary commands via a custom `Poc` class extending `Error`.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Fastjson versions affected by CVE-2022-25845
No auth needed
Prerequisites: Fastjson library with auto-type enabled · Ability to send crafted JSON payloads to the target
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC
by cuijiung · poc
https://github.com/cuijiung/fastjson-CVE-2022-25845

This PoC demonstrates CVE-2022-25845, a deserialization vulnerability in Fastjson, by leveraging JNDI injection to execute arbitrary code via an LDAP server. The Evil.java class spawns a calculator as a proof of execution, while Main.java constructs the malicious payload.

Classification
Working Poc 95%
Attack Type
Deserialization
Complexity
Moderate
Reliability
Reliable
Target: Fastjson versions before 1.2.83
No auth needed
Prerequisites: LDAP server hosting the Evil class · Fastjson with autoType enabled
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC
by scabench · poc
https://github.com/scabench/fastjson-tp1fn1

This repository contains a working PoC for CVE-2022-25845, a deserialization vulnerability in FastJSON where JSON markup is interpreted as Java beans, allowing arbitrary code execution via reflection. The PoC includes a test case that demonstrates the vulnerability by executing a command through a crafted JSON payload.

Classification
Working Poc 95%
Attack Type
Deserialization
Complexity
Moderate
Reliability
Reliable
Target: FastJSON 1.2.80
No auth needed
Prerequisites: FastJSON 1.2.80 in the classpath · ability to send crafted JSON payloads to the target application
devstral-2 · analyzed Feb 16, 2026 Full analysis →

References (7)

Core 7
Core References
Third Party Advisory x_refsource_misc
https://snyk.io/vuln/SNYK-JAVA-COMALIBABA-2859222
Exploit, Third Party Advisory x_refsource_misc
https://www.ddosi.org/fastjson-poc/
Release Notes, Third Party Advisory x_refsource_misc
https://github.com/alibaba/fastjson/releases/tag/1.2.83
Patch, Third Party Advisory x_refsource_misc
https://www.oracle.com/security-alerts/cpujul2022.html

Scores

CVSS v3 8.1
EPSS 0.8825
EPSS Percentile 99.5%
Attack Vector NETWORK
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Details

CWE
CWE-502
Status published
Products (3)
alibaba/fastjson < 1.2.83
com.alibaba/fastjson 1.2.25 - 1.2.83Maven
oracle/communications_cloud_native_core_unified_data_repository 22.2.0
Published Jun 10, 2022
Tracked Since Feb 18, 2026