提交 #1064065: Tencent RapidJSON 1.1.0 Memory Corruption信息

标题Tencent RapidJSON 1.1.0 Memory Corruption
描述A critical vulnerability has been identified in Tencent RapidJSON through version 1.1.0 and git master (commit 24b5e7a). The vulnerability affects the function Writer::WriteString located in include/rapidjson/writer.h (lines 397-402). When reserving memory for string serialization, the reservation calculation: PutReserve(*os_, 2 + length * 12); is evaluated using 32-bit unsigned arithmetic (SizeType). For string lengths of 357,913,942 characters or more, this multiplication wraps modulo 2^32, requesting only 10 bytes of buffer reservation while the default buffer capacity is 256 bytes. In production builds and downstream distribution packages compiled with -DNDEBUG, Stack::PushUnsafe assertions are compiled out. The writer then copies over 357 MB of string data into the 256-byte buffer without bounds checking. This leads to an extensive heap buffer overflow that allows an attacker to corrupt adjacent memory and hijack control flow to achieve arbitrary code execution. The underlying integer overflow was noted in upstream issues #2336 and #2348 as a denial of service / assertion crash, and fix pull request #2396 was closed unmerged on 2026-10-05. The escalation to arbitrary code execution in release builds is newly identified. Remediation requires widening length to size_t: PutReserve(*os_, 2 + static_cast<size_t>(length) * 12); Coordinated disclosure is underway with CERT/CC (Tracking ID: VRF#26-10-WMJBQ).
来源⚠️ https://github.com/Tencent/rapidjson/issues/2336
用户 0xtoxic (UID 102605)
提交2026-10-29 07時48分 (28 日前)
管理2026-11-26 10時06分 (28 days later)
状态已接受
VulDB条目444244 [Tencent RapidJSON 直到 1.1.0 writer.h Writer::WriteString length 内存损坏]
积分20

Do you need the next level of professionalism?

Upgrade your account now!