CVE-2026-48706: Fixed Size Buffer Reallocation Bypass

A dynamic length check correctly identifies that the remaining buffer is smaller than the required size, but triggers a flush/reallocation method without passing the required size. If the reallocation uses a predefined fixed size chunk, memory overrun can occur when formatting the string. Ensure that the computed required size is propagated.

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0C++
greprules fetch cve-2026-48706-fixed-size-buffer-reallocation-bypass --engine opengrep

Description

A dynamic length check correctly identifies that the remaining buffer is smaller than the required size, but triggers a flush/reallocation method without passing the required size. If the reallocation uses a predefined fixed size chunk, memory overrun can occur when formatting the string. Ensure that the computed required size is propagated.