Advisory

RUSTSEC-2026-0116

Also known as: GHSA-w5p8-4jcx-2j6r

Summary

Improper check of an invariant resulting in incorrect bounds checks

Details

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.

Severity

Not rated by the source.

Dates

Published
2026-05-01 12:00 UTC
Modified
2026-05-07 08:56 UTC

Affected packages and fixes

imageproc

crates.io · All systems

Affected

  • introduced 0.0.0-0, fixed 0.23.1, introduced 0.24.0, fixed 0.24.1, introduced 0.25.0, fixed 0.25.1, introduced 0.26.0, fixed 0.26.2 (semver)

Fixed versions

0.23.1, 0.24.1, 0.25.1, 0.26.2

Fix

  • Fixed version 0.23.1
    cargo update -p imageproc --precise 0.23.1
  • Fixed version 0.24.1
    cargo update -p imageproc --precise 0.24.1
  • Fixed version 0.25.1
    cargo update -p imageproc --precise 0.25.1
  • Fixed version 0.26.2
    cargo update -p imageproc --precise 0.26.2

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: RustSec Advisory Database · CC0-1.0

Sources & licences