GHSA-5qv7-j6w5-fr4m
JSON

medium

imageproc has fragile bounds check when sampling from image

Severity
medium CVSS:4.0 by GitHub
Published
Last changed
Also known as
RUSTSEC-2026-0115

Description

A read of pixels was coded as modifying coordinates to lie within the image bounds. It would calculate a coordinate by adding a constant to an input and taking the minimum of the resulting coordinate and 'dimension - 1'. This would not protect against malicious inputs that could overflow the addition. Following the tricked bounds check, the image could then be sampled at multiple differently calculated coordinates that exceeded the bounds.

Affected

Product or packageVersionsReported by
imageproc (crates.io)from 0.24.0 before 0.24.1, from 0.25.0 before 0.25.1, from 0.26.0 before 0.26.2GitHub Advisory Database, RustSec Advisory Database

Classification

What each source says

GitHub Advisory Database

A read of pixels was coded as modifying coordinates to lie within the image bounds. It would calculate a coordinate by adding a constant to an input and taking the minimum of the resulting coordinate and 'dimension - 1'. This would not protect against malicious inputs that could overflow the addition. Following the tricked bounds check, the image could then be sampled at multiple differently calculated coordinates that exceeded the bounds.

RustSec Advisory Database

A read of pixels was coded as modifying coordinates to lie within the image bounds. It would calculate a coordinate by adding a constant to an input and taking the minimum of the resulting coordinate and 'dimension - 1'. This would not protect against malicious inputs that could overflow the addition. . Subsequently to the tricked bounds check the image could then be sampled at multiple, differently calculated coordinates exceeding the bounds.

References

Related

Sources

SourceRecordLicence
GitHub Advisory DatabaseGHSA-5qv7-j6w5-fr4m changed 2026-05-07CC-BY-4.0
RustSec Advisory DatabaseRUSTSEC-2026-0115 changed 2026-05-07CC0-1.0