Skip to main content

raster Rust crate CVE-2026-71202

| EUVDEUVD-2026-53199 HIGH
Integer Underflow (CWE-191)
2026-08-05 TuranSec GHSA-hjwh-6x9j-wjwq
7.5
CVSS 3.1 · Vendor: TuranSec
Share

Severity by source

Vendor (TuranSec) PRIMARY
7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
vuln.today AI
7.5 HIGH

AV:N and PR:N reflect worst-case unauthenticated network exposure of the crop endpoint; A:H reflects guaranteed process crash; C:N and I:N because the flaw yields no data exposure or data modification.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Red Hat
7.5 HIGH
qualitative

Primary rating from Vendor (TuranSec).

CVSS VectorVendor: TuranSec

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Lifecycle Timeline

2
Analysis Generated
Aug 05, 2026 - 07:56 vuln.today
CVE Published
Aug 05, 2026 - 06:58 cve.org
HIGH 7.5

DescriptionCVE.org

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.

AnalysisAI

Integer underflow in the raster Rust crate's crop() function enables remote process crash via a single crafted request. When offset_x or offset_y exceeds the source image dimension, the signed subtraction wraps to a large negative i32 in release builds; that value is then cast to usize and passed to Vec::with_capacity(), triggering an unrecoverable capacity-overflow panic that kills the host process. No active exploitation is confirmed (not in CISA KEV) and no public POC is listed, but the AV:N/AC:L/PR:N/UI:N CVSS vector indicates zero-friction denial-of-service for any application that exposes the crop() call to untrusted input.

Technical ContextAI

The raster crate (CPE: cpe:2.3:a:kosinix:raster:*:*:*:*:*:*:*:*) is a Rust image-processing library authored by kosinix. The flaw lives in src/editor.rs inside the crop() function, which clamps the requested crop width and height against source dimensions but applies no upper-bound check to offset_x or offset_y - only a lower-bound clamp against zero. When an attacker supplies an offset beyond the image edge, the subtraction width2 - offset_x (performed as signed i32) wraps in Rust release builds (release mode uses wrapping two's-complement arithmetic rather than the overflow panic of debug mode), producing a large negative integer. That value is subsequently cast to usize - a widening reinterpretation that yields an astronomically large allocation size - and forwarded to Vec::with_capacity() inside Image::blank(). The allocator rejects the impossible capacity, Rust panics, and the OS terminates the process. CWE-191 (Integer Underflow / Wrap-or-Wraparound) precisely describes this root cause: an arithmetic operation produces a result below the minimum representable value of the type, and the wraparound is later interpreted in a type context where it causes catastrophic downstream behaviour.

RemediationAI

No vendor-released patch has been identified at time of analysis; the only available reference is the GitHub issue at https://github.com/kosinix/raster/issues/30, which should be monitored for an upstream fix or tagged release. Until a patch is available, the most effective compensating control is to validate offset_x and offset_y at the application boundary before calling crop(), explicitly rejecting any offset value that equals or exceeds the corresponding source image dimension (offset_x must be strictly less than source width; offset_y strictly less than source height) - this prevents the underflowing subtraction entirely. Alternatively, applications that cannot immediately apply input validation should restrict the crop() endpoint to authenticated or internally-trusted callers only, removing the network-accessible unauthenticated attack surface the CVSS AV:N vector assumes. For new projects or those with flexibility to migrate, replacing the raster dependency with a maintained crate such as the image crate is advisable; the trade-off is a migration effort proportional to API surface used.

Vendor StatusVendor

Share

CVE-2026-71202 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy