CVE-2022-45688: json stack overflow vulnerability
7.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.74056%
CWE
Published
12/13/2022
Updated
4/15/2024
KEV Status
No
Technology
Java
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
org.json:json | maven | < 20230227 | 20230227 |
cn.hutool:hutool-json | maven | < 5.8.25 | 5.8.25 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
Both libraries' XML-to-JSON conversion functions (XML.toJSONObject
entry points) utilized recursive parsing without stack depth checks. The vulnerability manifests when converting malicious XML with hundreds/thousands of nested elements, as shown in the PoC. The patches (added maxNestingDepth
checks in JSONML.java
and ParseConfig
in Hutool) directly address uncontrolled recursion in these functions, confirming their role in the vulnerability.