CVE-2026-52131: Unvalidated Size Container Resize

A size or length value read from an external source is passed directly to `resize()` on a container without validating it against maximum limits or available stream size. This can lead to excessive memory allocation, bad_alloc exceptions, reachable assertions, or denial of service.

Provally CuratedPublic repositoryMediumMedium confidenceVerifiedApache-2.0C++
greprules fetch cve-2026-52131-unvalidated-size-container-resize --engine opengrep

Description

A size or length value read from an external source is passed directly to `resize()` on a container without validating it against maximum limits or available stream size. This can lead to excessive memory allocation, bad_alloc exceptions, reachable assertions, or denial of service.