CVE-2025-70974: Fastjson FASTJSON Includes Functionality From Untrusted Vulnerability

CRITICAL
Advisory Identifier: GHSA-jm7w-5684-pvh8
CVSS 10.0
CWE-829
Published
Advisory Summary

CVE-2025-70974 is a CRITICAL (CVSS 10.0) fastjson includes functionality from untrusted vulnerability (CWE-829: Inclusion of Functionality from Untrusted Control Sphere) affecting Fastjson libraries in the Maven ecosystem. The issue involves fastjson includes functionality from untrusted control sphere. Remediation is available by upgrading affected packages to version 1.2.48.

CVE-2025-70974 at a Glance

CVE Identifier CVE-2025-70974
GHSA Identifier GHSA-jm7w-5684-pvh8
Severity CRITICAL
CVSS v3.1 Base Score 10.0
CWE Classification CWE-829: Inclusion of Functionality from Untrusted Control Sphere
Affected Product Fastjson
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 10.0

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2025-70974

To remediate this vulnerability, upgrade all affected Fastjson dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

com.alibaba:fastjson fixed: 1.2.48
<dependency>
    <groupId>com.alibaba</groupId>
    <artifactId>fastjson</artifactId>
    <version>1.2.48</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=com.alibaba

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2025-70974, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=com.alibaba

Analyze the terminal output to locate any version of Fastjson in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.2.48), your application is affected.

Note: The mvn dependency:tree -Dincludes=com.alibaba command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-829: Inclusion of Functionality from Untrusted Control Sphere, where the product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere. In Fastjson, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Fastjson before 1.2.48 mishandles autoType because, when an `@type` key is in a JSON document, and the value of that key is the name of a Java class, there may be calls to certain public methods of that class. Depending on the behavior of those methods, there may be JNDI injection with an attacker-supplied payload located elsewhere in that JSON document. This was exploited in the wild in 2023 through 2025. NOTE: this issue exists because of an incomplete fix for CVE-2017-18349. Also, a later bypass is covered by CVE-2022-25845.

CVE-2025-70974 Affected Fastjson Versions

1 component(s)
Fixed Versions:
1.2.48
Product / Package Ecosystem Affected Versions Fixed Version
com.alibaba:fastjson
Maven
< 1.2.48
1.2.48

References

Frequently Asked Questions

What is CVE-2025-70974?
CVE-2025-70974 is a security vulnerability in Fastjson involving FASTJSON Includes Functionality from Untrusted Control Sphere under CWE-829: Inclusion of Functionality from Untrusted Control Sphere.
Which Fastjson versions are affected?
Affected versions include releases prior to 1.2.48 across affected packages: com.alibaba:fastjson.
What version fixes CVE-2025-70974?
Upgrading to 1.2.48 (or the latest patched release for your respective branch) resolves the vulnerability.
Is fastjson affected?
Yes, com.alibaba:fastjson is affected in releases prior to 1.2.48. Upgrade your dependency to 1.2.48 or later.
What is the CVSS score of CVE-2025-70974?
CVE-2025-70974 has a CVSS v3.1 base score of 10.0 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2025-70974?
CVE-2025-70974 is classified under CWE-829: Inclusion of Functionality from Untrusted Control Sphere (The product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere.).
How can I check Maven dependencies for CVE-2025-70974?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=com.alibaba'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-jm7w-5684-pvh8",
  "modified" : "2026-10-05T18:38:43Z",
  "published" : "2026-01-09T09:31:19Z",
  "aliases" : [ "CVE-2025-70974" ],
  "summary" : "FASTJSON Includes Functionality from Untrusted Control Sphere ",
  "details" : "Fastjson before 1.2.48 mishandles autoType because, when an `@type` key is in a JSON document, and the value of that key is the name of a Java class, there may be calls to certain public methods of that class. Depending on the behavior of those methods, there may be JNDI injection with an attacker-supplied payload located elsewhere in that JSON document. This was exploited in the wild in 2023 through 2025. NOTE: this issue exists because of an incomplete fix for CVE-2017-18349. Also, a later bypass is covered by CVE-2022-25845.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.alibaba:fastjson"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.2.48"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-70974"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/security/cve/CVE-2025-70974"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2428203"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/alibaba/fastjson"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/alibaba/fastjson/compare/1.2.47...1.2.48"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/vulhub/vulhub/tree/master/fastjson/1.2.47-rce"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20220121055754/https://cert.360.cn/warning/detail?id=7240aeab581c6dc2c9c5350756079955"
  }, {
    "type" : "WEB",
    "url" : "https://www.cloudsek.com/blog/androxgh0st-continues-exploitation-operators-compromise-a-us-university-for-hosting-c2-logger"
  }, {
    "type" : "WEB",
    "url" : "https://www.cnvd.org.cn/flaw/show/CNVD-2019-22238"
  }, {
    "type" : "WEB",
    "url" : "https://www.freebuf.com/vuls/208339.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.seebug.org/vuldb/ssvid-98020"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-829" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-01-09T19:33:17Z",
    "nvd_published_at" : "2026-01-09T07:16:02Z"
  }
}