CVE-2026-42189: Unchecked Network Decoded Count Vec Capacity

An integer count decoded from untrusted external data is passed to Vec::with_capacity without bounding it against the remaining readable packet/buffer bytes. A crafted large count (e.g. u32::MAX ~4 billion) can trigger a multi-gigabyte heap allocation, crashing the process via OOM before any credential is verified (pre-auth DoS). Clamp the decoded count to t

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0Rust
greprules fetch cve-2026-42189-unchecked-network-decoded-count-vec-capacity --engine opengrep

Description

An integer count decoded from untrusted external data is passed to Vec::with_capacity without bounding it against the remaining readable packet/buffer bytes. A crafted large count (e.g. u32::MAX ~4 billion) can trigger a multi-gigabyte heap allocation, crashing the process via OOM before any credential is verified (pre-auth DoS). Clamp the decoded count to t