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.
Published: 2026-08-05
Score: 7.5 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability is an integer underflow in the crop() function of the raster crate, where the width and height are clamped but the offset values are only clamped against zero. When an offset exceeds the source width or height, the subtraction produces a negative i32 which is silently truncated in release builds. That negative value is then cast to a usize in a Vec::with_capacity() call, causing a capacity‑overflow panic that crashes the process on a single crafted crop request. The result is a denial of service: the application terminates as soon as the invalid request is processed, potentially leading to downtime or forceful restarts.

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 is not available, and the vulnerability is not listed in CISA KEV, so the current likelihood of exploitation is uncertain. The attack vector is inferred to be either local, through a malicious payload, or remote if the crate is used in a publicly exposed service that accepts image data. The lack of access control barriers and the severe service disruption make this a priority for remediation.

Generated by OpenCVE AI on August 5, 2026 at 08:20 UTC.

Remediation

No vendor fix or workaround currently provided.

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 5, 2026 at 08:20 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 05 Aug 2026 14:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Wed, 05 Aug 2026 12:15:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Important


Wed, 05 Aug 2026 10:45:00 +0000

Type Values Removed Values Added
First Time appeared Kosinix
Kosinix raster
Vendors & Products Kosinix
Kosinix raster

Wed, 05 Aug 2026 07:30:00 +0000

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'}


cve-icon MITRE

Status: PUBLISHED

Assigner: TuranSec

Published:

Updated: 2026-08-05T13:25:08.953Z

Reserved: 2026-08-05T06:56:15.798Z

Link: CVE-2026-71202

cve-icon Vulnrichment

Updated: 2026-08-05T13:24:39.111Z

cve-icon NVD

No data.

cve-icon Redhat

Severity : Important

Publid Date: 2026-08-05T06:58:53Z

Links: CVE-2026-71202 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-05T10:17:56Z

Weaknesses
  • CWE-191

    Integer Underflow (Wrap or Wraparound)