Junglewise Threat Intelligence

CVE-2026-42199: becheran grid integer overflow in expand_rows

CVE-2026-42199 · Severity: medium · CVSS 6.2 · Published 2026-05-08

Executive brief

A vulnerability exists in the 'grid' Rust library, which provides a 2D data structure. An error in how the library calculates memory requirements when expanding a grid can lead to memory corruption. This could allow an attacker to cause a program crash or unpredictable behavior in applications that use this library to manage data layouts.

Technical details

An integer overflow occurs in `Grid::expand_rows()` during the calculation of the new backing storage length: `self.data.len() + rows * self.cols`. In release builds, this calculation can wrap around, causing the internal vector to be resized to a much smaller capacity than required by the logical dimensions. Subsequent operations, such as in-place rotations for ColumnMajor grids and metadata updates, rely on these incorrect dimensions. This results in the safe `get()` API eventually calling `get_unchecked()` with out-of-bounds indices, leading to undefined behavior, memory corruption, or crashes. The issue is fixed in version 1.0.1.

Affected products

  • becheran grid >= 0.17.0, <= 1.0.0

Timeline

  • 2026-04-20: disclosed: Vulnerability reported and patched in version 1.0.1
  • 2026-04-24: advisory: GitHub Advisory published
  • 2026-05-08: other: NVD publication date

References