CVE-2022-45690: Hutool json Hutool-json Stack Overflow Vulnerability Vulnerability
MODERATECVE-2022-45690 is a MODERATE hutool-json stack overflow vulnerability vulnerability (General Security Weakness) affecting Hutool json libraries in the Maven ecosystem. The issue involves hutool-json stack overflow vulnerability. Remediation is available by upgrading affected packages to version 5.8.11.
CVE-2022-45690 at a Glance
How to Fix CVE-2022-45690
To remediate this vulnerability, upgrade all affected Hutool json dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-json</artifactId>
<version>5.8.11</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=cn.hutool
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2022-45690, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=cn.hutool
Analyze the terminal output to locate any version of Hutool json in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.8.11), your application is affected.
Note: The mvn dependency:tree -Dincludes=cn.hutool 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 General Security Weakness. In Hutool json, 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
CVE-2022-45690 Affected Hutool json Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
cn.hutool:hutool-json
|
Maven |
< 5.8.11
|
5.8.11
|
References
Frequently Asked Questions
What is CVE-2022-45690?
Which Hutool json versions are affected?
What version fixes CVE-2022-45690?
Is hutool-json affected?
What CWE is associated with CVE-2022-45690?
How can I check Maven dependencies for CVE-2022-45690?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-whgh-g24c-3j5q",
"modified" : "2022-12-13T19:23:13Z",
"published" : "2022-12-13T15:30:26Z",
"aliases" : [ "CVE-2022-45690" ],
"summary" : "hutool-json stack overflow vulnerability",
"details" : "A stack overflow in the org.json.JSONTokener.nextValue::JSONTokener.java component of hutool-json v5.8.10 allows attackers to cause a Denial of Service (DoS) via crafted JSON or XML data.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "cn.hutool:hutool-json"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "5.8.11"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 5.8.10"
}
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-45690"
}, {
"type" : "WEB",
"url" : "https://github.com/dromara/hutool/issues/2746"
}, {
"type" : "WEB",
"url" : "https://github.com/stleary/JSON-java/issues/654"
}, {
"type" : "WEB",
"url" : "https://github.com/stleary/JSON-java/commit/7a124d857dc8da1165c87fa788e53359a317d0f7"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/dromara/hutool"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-12-13T19:23:13Z",
"nvd_published_at" : "2022-12-13T15:15:00Z"
}
}