CVE-2024-38517
High · 7.8CVSS
7.8
EPSS
0.4%
Published
Jul 9, 2024
CISA due date
—
Cloudanix analysis
A specially made file can trick programs that read JSON into giving an attacker higher access rights on a computer if the user opens that file.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Privilege Gain
- Component
- Library
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Integer underflow in GenericReader::ParseNumber() during JSON stream parsing leads to memory corruption that can be leveraged for local privilege escalation.
Why it matters to the business
Attackers who trick users into opening a malicious file can obtain elevated privileges on the affected system, risking data theft or further compromise of developer and build environments that embed this library.
How an attack unfolds
An attacker crafts a JSON document containing specially chosen numeric values that trigger the underflow in ParseNumber when the file is parsed by an application using the vulnerable RapidJSON code; the resulting memory corruption is used to escalate privileges on the local machine.
How to fix it
Upgrade fmalita/rapidjson to commit 8269bc2bc289e9d343bae51cdf6d23ef0950e001 or later; rebuild and redeploy all dependent applications and containers.
How to confirm the fix worked
Confirm the library commit hash or version string matches the fixed revision; recompile a test binary and attempt to parse a known-triggering JSON payload to verify absence of the underflow condition.
Typical attack path
- Create a JSON file containing numeric values that trigger the integer underflow in GenericReader::ParseNumber
- Deliver the crafted file to the target user via email, download link, or shared storage
- Victim opens the file with an application that links against the vulnerable RapidJSON library
- Library parses the malicious numeric field and the underflow occurs
- Memory corruption is exploited to elevate privileges
How to detect it
Review application logs for unexpected crashes or errors during JSON parsing of files received from external sources; monitor for processes that suddenly spawn with elevated privileges after handling JSON input.
What your security team should do
- Immediately update all copies of RapidJSON to the fixed commit and rebuild dependent software
- Scan source repositories and build pipelines for the vulnerable commit hash
- Add automated dependency checks that flag RapidJSON versions prior to 8269bc2bc289e9d343bae51cdf6d23ef0950e001
The record
Tencent RapidJSON is vulnerable to privilege escalation due to an integer underflow in the `GenericReader::ParseNumber()` function of `include/rapidjson/reader.h` when parsing JSON text from a stream. An attacker needs to send the victim a crafted file which needs to be opened; this triggers the integer underflow vulnerability (when the file is parsed), leading to elevation of privilege.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | rapidjson | 0 | No fix |
| Debian:12 | rapidjson | 0 | No fix |
| Debian:13 | rapidjson | 0 | No fix |
| Mageia:9 | rapidjson | 0 | 1.1.0-6.1.mga9 |
| Ubuntu:20.04:LTS | rapidjson | 0 | No fix |
| Ubuntu:22.04:LTS | rapidjson | 0 | No fix |
| Ubuntu:24.04:LTS | rapidjson | 0 | No fix |
| Ubuntu:24.10 | rapidjson | 0 | No fix |
| Ubuntu:24.10 | rapidjson | 0 | 1.1.0+dfsg2-7.3ubuntu0.1 |
| Ubuntu:25.04 | rapidjson | 0 | No fix |
| Ubuntu:25.10 | rapidjson | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | rapidjson | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | rapidjson | 0 | 0.12~git20141031-3ubuntu0.1~esm1 |
| Ubuntu:Pro:18.04:LTS | rapidjson | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | rapidjson | 0 | 1.1.0+dfsg2-3ubuntu0.1~esm1 |
| Ubuntu:Pro:20.04:LTS | rapidjson | 0 | 1.1.0+dfsg2-5ubuntu1+esm1 |
| Ubuntu:Pro:22.04:LTS | rapidjson | 0 | 1.1.0+dfsg2-7ubuntu0.1~esm1 |
| Ubuntu:Pro:24.04:LTS | rapidjson | 0 | 1.1.0+dfsg2-7.2ubuntu0.1~esm1 |
Related vulnerabilities
- CVE-2024-39684 Tencent RapidJSON is vulnerable to privilege escalation due to an integer overflow in the… Also affects rapidjson
- CVE-2026-88833 A flaw was found in BusyBox's udhcpc DHCP client. CWE-191
- CVE-2026-44235 rabbitmq-c is a C-language AMQP client library for RabbitMQ. CWE-191
- CVE-2026-81977 Acrobat Reader is affected by an Integer Underflow (Wrap or Wraparound) vulnerability… CWE-191
- CVE-2026-66767 SAP NetWeaver Application Server for ABAP and ABAP Platform allows an unauthenticated… CWE-191
- CVE-2026-18341 IBM i 7.6, 7.5, 7.4, and 7.3 could allow a remote authenticated attacker to corrupt… CWE-191
- CVE-2026-9624 A denial-of-service security issue exists within RSLinx® Classic. CWE-191
- CVE-2026-9622 A denial-of-service security issue exists within RSLinx® Classic. CWE-191