CVE Tools
Back to blog

No autoType, No Gadget, Still RCE: Inside the fastjson 1.x Zero-Day (CVE-2026-16723)

A critical, actively-exploited flaw in fastjson 1.2.68-1.2.83 turns one JSON request into remote code execution on default-configured Spring Boot apps. Here is the chain, who is exposed, and how to shut it down today.

No autoType, No Gadget, Still RCE: Inside the fastjson 1.x Zero-Day (CVE-2026-16723). A critical, actively-exploited flaw in fastjson 1.2.68-1.2.83 turns one JSON request into remote code execution on
No autoType, No Gadget, Still RCE: Inside the fastjson 1.x Zero-Day (CVE-2026-16723). A critical, actively-exploited flaw in fastjson 1.2.68-1.2.83 turns one JSON request into remote code execution on

A single crafted JSON request can hand an attacker remote code execution on a default-configured Spring Boot app that ships fastjson 1.2.68 through 1.2.83 - Alibaba's ubiquitous Java JSON library. What makes CVE-2026-16723 stand out from the library's long history of deserialization bugs is what it doesn't need: no autoType toggle, no classpath gadget, no special configuration. It works out of the box, it is rated CVSS 9.0 (Critical), and it is already being exploited in the wild.

What is actually broken

When fastjson deserializes JSON, a special @type key tells it which Java class to build. To resolve that class name, fastjson 1.x's checkAutoType routine probes the attacker-controlled name with getResourceAsStream - and it does this before the autoType safety checks fully apply. In a Spring Boot executable fat-jar (the standard packaging, where dependencies live in nested BOOT-INF/lib/*.jar behind a custom jar: URL handler), an attacker points that lookup at a nested-JAR URL they control. A @JSONType annotation is mistakenly treated as a trust signal, letting the supplied class skip the dangerous-class checks entirely.

The practical chain: the attacker's JSON references a remote jar:http://... URL, which fastjson fetches and caches; a follow-up probe using jar:file:/proc/self/fd/N reopens that cached archive under a valid class name and initializes the attacker's class - running code even with autoType off. On JDK 8 the remote class loads directly; on JDK 17/21 the Linux /proc/self/fd file-descriptor trick is used instead. Because the primitive is remote class loading over jar: URLs and not a JNDI lookup, the well-known post-JDK-8u191 JNDI hardening (trustURLCodebase=false) does nothing to stop it. The weakness is classic CWE-502, deserialization of untrusted data.

The exploitation chain

Reading top to bottom: an unauthenticated attacker finds an endpoint that parses untrusted JSON, confirms the vulnerable preconditions, then walks a crafted @type payload through fastjson's resource-probing path to code execution. The only branch that avoids it is having safeMode on, or running a fixed build.

CVE-2026-16723 exploitation chain

  1. CVE-2026-16723 - fastjson 1.2.68-1.2.83 — Unauthenticated - CVSS 9.0 - actively exploited.
  2. Find an endpoint that parses untrusted JSON — Any `JSON.parse` / `parseObject` on attacker input. A target DTO class does **not** help - payloads nest in Object/Map fields.
  3. fastjson 1.2.68-1.2.83 + Spring Boot fat-jar + safeMode off? — All three must hold. safeMode is **off by default**.
  4. POST JSON: @type -> jar:http://attacker/probe.jar — The `@type` value points at a remote JAR the attacker hosts.
  5. getResourceAsStream fetches & caches the remote JAR — `checkAutoType` probes the name before the safety checks bite.
  6. Reopen via jar:file:/proc/self/fd/N (JDK17/21); JDK8 loads directly — The cached archive is reopened under a valid class name.
  7. @JSONType class initialized -> attacker code runs — No autoType, no classpath gadget required.
  8. Unauthenticated RCE -> web shell, lateral movement — Full code execution in the app's context.
  9. Safe: safeMode on / >= 1.2.84 / fastjson2 — @type parsing is neutralized or the probe path is removed.

Am I affected?

Exposure needs several conditions together. Work down this list - if all hold, treat it as an emergency.

CheckWhat makes you exposed
fastjson versionAffected: 1.2.68 - 1.2.83 (final 1.x). Safe: <= 1.2.60, >= 1.2.84, and all of fastjson2. (Two public labs claim 1.2.66 - verify your own build.)
DeploymentSpring Boot executable fat-jar launched with java -jar app.jar - the nested jar: URL handler is what makes the probe reachable.
Untrusted JSONAny JSON.parse / parseObject on attacker input. Passing a target DTO class is NOT a mitigation - @type nests inside Object/Map fields.
safeModeDefault is OFF = exposed. safeMode ON makes @type inert.
JDK versionNo safe JDK: 8 (direct load) and 17/21 (via /proc/self/fd) are both exploitable. Not JNDI-based, so trustURLCodebase does not help.
Find the version (works inside shaded / fat-jars)
unzip -p app.jar META-INF/maven/com.alibaba/fastjson/pom.properties# -&gt; version=1.2.83   (affected: 1.2.68 - 1.2.83)# Relocated/shaded copies - grep the class signature:unzip -l app.jar | grep -i 'com/alibaba/fastjson/parser/ParserConfig.class'# Safe exposure probe (benign class, DNS callback only - NO payload):#   {"x":{"@type":"java.net.Inet4Address","val":"probe.yourdnslog.example"}}# A DNS hit at your logger = the endpoint parses @type and can reach out.

Is anyone actually exploiting it?

Yes. ThreatBook added detection on 20 Jul 2026 and reported capturing exploitation in the wild; Imperva independently observed attacks against live customers, describing activity as widespread and opportunistic - multiple likely-unrelated actors firing public proof-of-concept code, almost entirely at US-based organizations (with a few in Singapore and Canada) across financial services, healthcare, retail and computing. Roughly 30% of the exploit traffic came from Ruby- and Go-based tooling, the rest from browser-impersonating scanners. Detection and exploitation landed at or before public disclosure, so this behaves as a zero-day.

Disclosure & exploitation timeline

  1. ThreatBook adds detection; captures in-the-wild exploitation
  2. Alibaba publishes the security advisory (credited to Kirill Firsov, FearsOff)
  3. ThreatBook publicly reports the in-the-wild capture
  4. NVD publishes CVE-2026-16723 - CVSS 9.0 Critical (Alibaba CNA)
  5. Imperva reports active exploitation of live customers
  6. Advisory updated to list the fix: fastjson 1.2.84

Fix it: what to do today

There is a real fix now (1.2.84, listed in the 29 Jul advisory update - early coverage saying "no 1.x patch exists" is stale), plus a same-day compensating control. Prioritize internet-facing JSON endpoints first.

  1. Today - enable safeMode. Set -Dfastjson.parser.safeMode=true (or ParserConfig.getGlobalInstance().setSafeMode(true);, or fastjson.parser.safeMode=true in fastjson.properties). It fully disables @type parsing and neutralizes the vector.
  2. Patch. Upgrade to fastjson 1.2.84, or use the hardened com.alibaba:fastjson:1.2.83_noneautotype build if you cannot bump the minor.
  3. Plan the durable move. Migrate to fastjson2 (2.0.63+), which is allowlist-first with autoType off by default; do not enable SupportAutoType.
  4. Compensating controls, in parallel. WAF-block request bodies where a JSON @type value carries jar:http, jar:file, ldap: or rmi:; deny outbound LDAP (389) / LDAPS (636) / RMI (1099) egress from app subnets, and constrain outbound HTTP that would fetch a remote jar:http payload.
  5. Hunt. Search WAF and app logs for @type requests carrying jar:http / jar:file (rules below) to catch any pre-mitigation compromise.
Detection content (author-written; strings grounded in the advisory + Imperva)3 rules
sigma ×1suricata ×1yara ×1

Gadget-class detection alone misses this CVE (it is gadgetless) - the reliable markers are the `jar:http` / `jar:file` nested-URL schemes and LDAP/RMI callbacks appearing with `@type`. Rules below key on both. Validate before alerting; tune out the benign Inet4Address probe.

sigmaFastjson @type deserialization RCE attempt (CVE-2026-16723)
HTTP request bodies with @type + nested jar: URLs, JNDI callbacks, or known gadget strings Web/proxy/app request-body logging
title: Fastjson autoType/@type Deserialization RCE Attempt (CVE-2026-16723)
status: experimental
logsource:
  category: webserver
detection:
  atype_marker:
    cs-body|contains: '@type'
  cve16723_markers:
    cs-body|contains:
      - 'jar:http'
      - 'jar:file'
  jndi_callback:
    cs-body|contains: ['ldap://', 'ldaps://', 'rmi://']
  gadget_classes:
    cs-body|contains:
      - 'com.sun.rowset.JdbcRowSetImpl'
      - 'com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl'
      - 'org.apache.tomcat.dbcp.dbcp2.BasicDataSource'
      - '_bytecodes'
      - 'dataSourceName'
  condition: atype_marker and (cve16723_markers or jndi_callback or gadget_classes)
falsepositives:
  - Apps that legitimately use fastjson polymorphic @type with a trusted allowlist
  - The java.net.Inet4Address dnslog exposure probe
level: high
tags: [attack.initial_access, attack.t1190, attack.execution, cve.2026.16723]
suricataFastjson RCE - nested jar: URL &amp; JNDI callback + egress (CVE-2026-16723)
Inbound @type payloads with jar:/ldap:/rmi:, and app-server LDAP/RMI egress second-stage Suricata/Snort with HTTP body inspection
alert tcp any any -&gt; $HOME_NET $HTTP_PORTS (msg:"FASTJSON RCE nested jar URL in @type body (CVE-2026-16723)"; flow:established,to_server; content:"@type"; nocase; pcre:"/jar\x3a(https?|file)\x3a/i"; classtype:attempted-admin; reference:cve,2026-16723; sid:2026167233; rev:1;)
alert tcp any any -&gt; $HOME_NET $HTTP_PORTS (msg:"FASTJSON RCE JNDI callback URL in @type body"; flow:established,to_server; content:"@type"; nocase; pcre:"/(ldaps?|rmi)\x3a\x2f\x2f/i"; classtype:attempted-admin; reference:cve,2026-16723; sid:2026167234; rev:1;)
alert tcp $HOME_NET any -&gt; $EXTERNAL_NET [389,636,1099] (msg:"FASTJSON RCE possible JNDI/RMI second-stage egress"; flow:established,to_server; classtype:bad-unknown; reference:cve,2026-16723; sid:2026167235; rev:1;)
yaraFastjson @type RCE payload markers (CVE-2026-16723 + classic chains)
Captured request bodies / log lines carrying the @type + jar:/JNDI markers YARA over captured payloads or log storage
rule Fastjson_AutoType_RCE_CVE_2026_16723 {
  meta:
    description = "Fastjson @type deserialization RCE markers (CVE-2026-16723 + classic chains)"
    cve = "CVE-2026-16723"
  strings:
    $atype = "@type" ascii wide
    $g1 = "com.sun.rowset.JdbcRowSetImpl" ascii wide
    $g2 = "com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl" ascii wide
    $g3 = "org.apache.tomcat.dbcp.dbcp2.BasicDataSource" ascii wide
    $p1 = "dataSourceName" ascii wide
    $p2 = "_bytecodes" ascii wide
    $u1 = "jar:http" ascii wide
    $u2 = "jar:file" ascii wide
    $u3 = "ldap://" ascii wide
    $u4 = "rmi://" ascii wide
  condition:
    $atype and ( any of ($g*) or any of ($u1,$u2) or (any of ($p*) and any of ($u*)) )
}
Is CVE-2026-16723 the same as the old fastjson autoType RCE?
No. The classic chains needed autoType enabled or a specific JNDI/bytecode gadget on the classpath. This one works under stock defaults with no autoType and no gadget - it abuses checkAutoType's resource probing in Spring Boot fat-jars. Because it is not JNDI-based, post-JDK-8u191 JNDI hardening does not stop it.
Does passing a target class - JSON.parseObject(body, Dto.class) - protect me?
No. Attackers nest the @type payload inside Object- or Map-typed fields of your DTO, so the vulnerable path is still reached.
Is there a patch?
Yes - fastjson 1.2.84 fixes it (the advisory was updated on 29 Jul 2026; earlier reports said no 1.x patch existed). As a same-day control, enable safeMode, and plan a migration to fastjson2.
It's not in CISA KEV and EPSS is low - can I wait?
No. Two vendors report active exploitation. EPSS lags fresh zero-days and KEV listing is not instant; for a default-config, unauthenticated RCE the in-the-wild signal should drive priority.
Does running a modern JDK (17 or 21) protect me?
No. Exploitation works on JDK 17/21 via the Linux /proc/self/fd descriptor-reuse technique as well as on JDK 8.

Sources