Description
Grid is a data structure grid for rust. From version 0.17.0 to before version 1.0.1, an integer overflow in Grid::expand_rows() can corrupt the relationship between the grid’s logical dimensions and its backing storage. After the internal invariant is broken, the safe API get() may invoke get_unchecked() with an invalid index, resulting in Undefined Behavior. This issue has been patched in version 1.0.1.
Published: 2026-05-08
Score: 6.2 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

This flaw is an integer overflow in the Grid::expand_rows method of the Rust Grid library. The overflow corrupts the relationship between the grid’s logical dimensions and its backing storage, violating an internal invariant. When the safe API get() subsequently uses this corrupted state, it may call get_unchecked() with an invalid index, resulting in undefined behavior that could lead to memory corruption, application crashes, or, if exploitable, arbitrary code execution.

Affected Systems

The vulnerable product is the Grid library for Rust, maintained by becheran. Versions from 0.17.0 up to, but not including, 1.0.1 are affected and require upgrading.

Risk and Exploitability

The CVSS score is 6.2, indicating moderate severity. No EPSS score is available, and the vulnerability is not listed in CISA’s KEV catalog. The likely attack vector includes an attacker supplying input that causes Grid::expand_rows to process a large or crafted number of rows, triggering the overflow. Exploration of this vector would require the attacker to run code that exercises the Grid library in an environment where the overflow can occur.

Generated by OpenCVE AI on May 8, 2026 at 22:50 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the Grid library to version 1.0.1 or later, which fixes the overflow.
  • Add explicit bounds checks on any input that specifies the number of rows added to a grid, preventing values that could trigger an overflow.
  • Review all code paths that instantiate Grid or call Grid::expand_rows and ensure they only use validated, safe parameters; consider writing unit tests that verify the grid’s internal invariants after expansion.

Generated by OpenCVE AI on May 8, 2026 at 22:50 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-38c5-483c-4qqp Grid: Integer Overflow in Grid::expand_rows Leads to Safe-API Undefined Behavior
History

Fri, 08 May 2026 21:45:00 +0000

Type Values Removed Values Added
Description Grid is a data structure grid for rust. From version 0.17.0 to before version 1.0.1, an integer overflow in Grid::expand_rows() can corrupt the relationship between the grid’s logical dimensions and its backing storage. After the internal invariant is broken, the safe API get() may invoke get_unchecked() with an invalid index, resulting in Undefined Behavior. This issue has been patched in version 1.0.1.
Title Grid: Integer Overflow in Grid::expand_rows Leads to Safe-API Undefined Behavior
Weaknesses CWE-190
References
Metrics cvssV3_1

{'score': 6.2, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-05-08T21:15:16.561Z

Reserved: 2026-04-25T05:04:37.027Z

Link: CVE-2026-42199

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-05-08T22:16:31.547

Modified: 2026-05-08T22:16:31.547

Link: CVE-2026-42199

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-05-08T23:00:16Z

Weaknesses