# GHSA-5qv7-j6w5-fr4m: imageproc has fragile bounds check when sampling from image

- Severity: Medium (CVSS:4.0, scored by GitHub) `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2026-05-01T12:00:00.000Z
- Modified: 2026-05-07T09:11:25.320Z
- Also known as: RUSTSEC-2026-0115
- Related: https://github.com/image-rs/imageproc/pull/778
- Weaknesses: CWE-190

## 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.

(As written by GitHub Advisory Database.)

## Affected

- 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.2

## References

- <https://github.com/image-rs/imageproc> (package)
- <https://rustsec.org/advisories/RUSTSEC-2026-0115.html> (advisory, web)
- <https://crates.io/crates/imageproc> (package)

## Sources

- GitHub Advisory Database: [GHSA-5qv7-j6w5-fr4m](https://github.com/advisories/GHSA-5qv7-j6w5-fr4m), CC-BY-4.0, modified 2026-05-07
- RustSec Advisory Database: [RUSTSEC-2026-0115](https://rustsec.org/advisories/RUSTSEC-2026-0115.html), CC0-1.0, modified 2026-05-07

---

Page: https://cve.day/GHSA-5qv7-j6w5-fr4m · Whole record: https://cve.day/GHSA-5qv7-j6w5-fr4m.json · Rebuilt by cve.day 2026-11-25T22:56:43.343Z
