You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Heap-buffer-overflow in RapidJSON FullPrecision Parsing due to Integer Underflow #2405
A heap-buffer-overflow (out-of-bounds read) vulnerability exists in RapidJSON v1.1.0 when parsing floating-point numbers with kParseFullPrecisionFlag. An integer underflow in decimalPosition leads to an out-of-bounds array access in GetCachedPowerByIndex().
Affected Versions
RapidJSON v1.1.0 (latest official release)
Likely earlier versions as well
Vulnerability Location
File: include/rapidjson/internal/diyfp.h
Function: GetCachedPowerByIndex()
Line: 223
Root Cause
During full-precision float parsing, the decimalPosition value underflows to 0xFFFFFFFFFFFFFFF0 (-16). This value is passed to StrtodDiyFp(), which computes an array index of 536870895. The kCachedPowers_F array only has about 87 elements, causing an out-of-bounds read.
Activity