CVE-2025-2750: Cpp Count Assigned To Capacity In Allocation

Array element counter was overwritten by the new array capacity during reallocation. This causes the element count to incorrectly leap forward to the end of the array buffer, leading to an immediate out-of-bounds write on subsequent element appends. Ensure capacity and element counts are tracked independently, and do not assign capacity values to count varia

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0C++β
greprules fetch cve-2025-2750-cpp-count-assigned-to-capacity-in-allocation --engine opengrep

Description

Array element counter was overwritten by the new array capacity during reallocation. This causes the element count to incorrectly leap forward to the end of the array buffer, leading to an immediate out-of-bounds write on subsequent element appends. Ensure capacity and element counts are tracked independently, and do not assign capacity values to count varia