Unsound MediumRUSTSEC-2026-0116 · imageproc
RUSTSEC-2026-0116: Improper check of an invariant resulting in incorrect bounds checks
Short answerimageproc has an API that can cause undefined behaviour from safe code: Improper check of an invariant resulting in incorrect bounds checks. Fixed in 0.23.1, 0.24.1, 0.25.1, 0.26.2.
| Crate | imageproc |
|---|---|
| Type | Unsound (memory-exposure) |
| Affected versions | Before 0.23.1; from 0.24.0 before 0.24.1; from 0.25.0 before 0.25.1; from 0.26.0 before 0.26.2. |
| Fixed in | 0.23.1, 0.24.1, 0.25.1, 0.26.2 |
| Severity | Medium (GitHub rating) |
| Published | 2026-05-01 |
| Last changed | 2026-05-07 |
| Also known as | GHSA-w5p8-4jcx-2j6r |
What to do
- See which version you have:
cargo tree -i imageproc(it also shows which of your dependencies pulls it in). - Update within your version requirement:
cargo update -p imageproc. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for exampleimageproc = "0.26.2") or update the dependency that pulls it in. - Check again with
cargo audit, or paste your Cargo.lock into our Cargo.toml checker.
Details from the advisory
A bounds verification of a slice storage of a 2-dimensional matrix's coefficients (a kernel) would compare the total size against the product of individual dimensions. This would erroneously cast *after* the multiplication and consequently fail to detect possible violations when overflow occurs.
Afterwards, the individual sizes were trusted to properly constrain coordinates within the matrix to indices valid for the underlying storage. With a crafted Kernel object, certain combinations of coordinates could then cause an out-of-bounds access in an unsafe function while fulfilling its documented preconditions. The kernel value could be passed to library functions that trusted the preconditions and then performed such reads.
References
- Package: crates.io/crates/imageproc
- Advisory: rustsec.org/advisories/RUSTSEC-2026-0116.html
From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.
Other advisories for imageproc
Up next
Same crateimageproc: security historyEvery advisory for this crate, and whether it is safe to use today.Read it next →Did this answer your question?