CVE-2026-71202

raster - Integer Underflow in crop() Offset Handling Causes Capacity-Overflow Panic

Published Aug 5, 2026 CVSS 3.1 · 7.5 High EPSS < 1% KEV · Not listed
Description
The raster Rust crate's crop function (src/editor.rs) clamps the crop width/height against source dimensions but only clamps the offset_x/offset_y parameters against 0, never against the source width/height.

Analysis

AI-generated

Technical impact

The vulnerability lies in the crop() function of the raster crate, where offset coordinates are bounded only by zero but not by the image dimensions. This oversight can allow a caller to supply offsets that exceed the source width or height, leading to an attempt to create a buffer with a negative or excessively large size. Such an operation can cause an integer underflow that propagates to a call that allocates a buffer with a negative or oversized capacity, potentially resulting in a panic that terminates the process or otherwise disrupts normal operation.

Affected Systems

Affected product is the raster crate from the kosinix vendor. Any application or service that incorporates this crate and processes image crop requests with user‑controlled or external offsets may be impacted. The description does not list specific version numbers, so all releases containing the unpatched crop() implementation are susceptible until a corrected version is released.

Risk and Exploitability

With a CVSS score of 7.5 the vulnerability is high severity. The EPSS score of < 1% suggests that exploitation is currently unlikely, and the vulnerability is not listed in CISA KEV. The most likely attack vectors are those that allow an attacker to control or influence the crop offset parameters— for example, a remote image upload endpoint or a local image processing task. Although the description does not explicitly state that the flaw would crash the application, it is inferred that supplying out‑of‑range offsets could trigger a panic leading to a denial‑of‑service condition. Because the crate is used by multiple applications, any exposed functionality that invokes crop() without additional validation could be at risk.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update to a fixed version of the raster crate once it is released by kosinix.
  • Add application‑level validation to ensure crop offsets do not exceed source dimensions before calling the crate.
  • Implement generic input sanitization or size limits for images processed through the crate.
  • Monitor public advisories and apply patches promptly.

Generated by OpenCVE AI on August 10, 2026 at 22:02 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Description The raster Rust crate's crop() function (src/editor.rs) clamps the crop width/height against source dimensions but only clamps the offset_x/offset_y parameters against 0, never against the source width/height. When an offset exceeds the corresponding source dimension, `width2 - offset_x` (or the height equivalent) underflows to a negative i32, which release builds do not trap; the negative value is then cast to usize inside Image::blank()'s Vec::with_capacity() call, triggering a capacity-overflow panic and crashing the process on a single crafted crop request. The raster Rust crate's crop function (src/editor.rs) clamps the crop width/height against source dimensions but only clamps the offset_x/offset_y parameters against 0, never against the source width/height.
Type Values Removed Values Added
Title raster: Integer Underflow in crop() Offset Handling Causes Capacity-Overflow Panic raster - Integer Underflow in crop() Offset Handling Causes Capacity-Overflow Panic
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Kosinix
Kosinix raster
Vendors & Products Kosinix
Kosinix raster
Type Values Removed Values Added
Description The raster Rust crate's crop() function (src/editor.rs) clamps the crop width/height against source dimensions but only clamps the offset_x/offset_y parameters against 0, never against the source width/height. When an offset exceeds the corresponding source dimension, `width2 - offset_x` (or the height equivalent) underflows to a negative i32, which release builds do not trap; the negative value is then cast to usize inside Image::blank()'s Vec::with_capacity() call, triggering a capacity-overflow panic and crashing the process on a single crafted crop request.
Title raster: Integer Underflow in crop() Offset Handling Causes Capacity-Overflow Panic
Weaknesses CWE-191
References
Metrics cvssV3_1

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

Weaknesses
  • CWE-191

    Integer Underflow (Wrap or Wraparound)

Sources

Status
PUBLISHED
Assigner
TuranSec
Published
Updated
Aug 10, 2026, 11:44 AM
Reserved
Aug 5, 2026, 6:56 AM
Status
Deferred
Published
Aug 5, 2026, 8:16 AM
Modified
Oct 24, 2026, 3:10 PM
Severity
Important
Public date
Aug 5, 2026, 6:58 AM