{"id":"GHSA-w5p8-4jcx-2j6r","aliases":["RUSTSEC-2026-0116"],"status":"published","title":"imageproc: integer overflow in kernel size check leads to out-of-bounds read","description":"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.\n\nAfterwards, 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":{"version":"4.0","score":6.9,"vector":"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","level":"medium","from":"ghsa"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-125","CWE-190"],"published":"2026-05-01T12:00:00Z","modified":"2026-09-10T03:51:07Z","fixes":[{"ecosystem":"crates.io","package":"imageproc","fixed_in":["0.23.1","0.24.1","0.25.1","0.26.2"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"imageproc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.23.1"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"imageproc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.24.0"},{"last_affected":"0.24.0"},{"fixed":"0.24.1"}]}],"versions":["0.24.0"]},{"source":"ghsa","ecosystem":"crates.io","package":"imageproc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.25.0"},{"last_affected":"0.25.0"},{"fixed":"0.25.1"}]}],"versions":["0.25.0"]},{"source":"ghsa","ecosystem":"crates.io","package":"imageproc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.26.0"},{"fixed":"0.26.2"}]}]},{"source":"osv","ecosystem":"crates.io","package":"imageproc","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.23.1"}]}]},{"source":"osv","ecosystem":"crates.io","package":"imageproc","ranges":[{"type":"SEMVER","events":[{"introduced":"0.24.0"},{"fixed":"0.24.1"}]}],"versions":["0.24.0"]},{"source":"osv","ecosystem":"crates.io","package":"imageproc","ranges":[{"type":"SEMVER","events":[{"introduced":"0.25.0"},{"fixed":"0.25.1"}]}],"versions":["0.25.0"]},{"source":"osv","ecosystem":"crates.io","package":"imageproc","ranges":[{"type":"SEMVER","events":[{"introduced":"0.26.0"},{"fixed":"0.26.2"}]}]},{"source":"osv","ecosystem":"crates.io","package":"imageproc","ranges":[{"type":"SEMVER","events":[{"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"}]}]}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2026-0116.html","tags":["web","advisory"]},{"url":"https://github.com/advisories/GHSA-w5p8-4jcx-2j6r"},{"url":"https://github.com/image-rs/imageproc","tags":["package"]},{"url":"https://crates.io/crates/imageproc","tags":["package"]}],"sources":{"ghsa":[{"id":"GHSA-w5p8-4jcx-2j6r","title":"imageproc: integer overflow in kernel size check leads to out-of-bounds read","description":"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.\n\nAfterwards, 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.","status":"published","published":"2026-05-07T03:13:57Z","modified":"2026-05-07T03:13:57Z","cvss":[{"version":"4.0","score":6.9,"vector":"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","level":"medium"}],"cwes":["CWE-125","CWE-190"],"updated_at":"2026-11-02T14:40:03.762927Z"}],"osv":[{"id":"GHSA-w5p8-4jcx-2j6r","title":"imageproc: integer overflow in kernel size check leads to out-of-bounds read","description":"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.\n\nAfterwards, 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.","status":"published","published":"2026-05-07T03:13:57Z","modified":"2026-09-10T03:51:07.15006609Z","cvss":[{"version":"4.0","score":6.9,"vector":"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","level":"medium"}],"cwes":["CWE-125","CWE-190"],"updated_at":"2026-11-02T15:46:58.04805Z"},{"id":"RUSTSEC-2026-0116","title":"Improper check of an invariant resulting in incorrect bounds checks","description":"A bounds verification of a slice storage of a 2-dimensional matrix's\ncoefficients (a kernel) would compare the total size against the product of\nindividual dimensions. This would erroneously cast *after* the multiplication\nand consequently fail to detect possible violations when overflow occurs.\n\nAfterwards, the individual sizes were trusted to properly constrain coordinates\nwithin the matrix to indices valid for the underlying storage. With a crafted\n`Kernel` object, certain combinations of coordinates could then cause an\nout-of-bounds access in an `unsafe` function while fulfilling its documented\npreconditions. The kernel value could be passed to library functions that\ntrusted the preconditions and then performed such reads.","status":"published","published":"2026-05-01T12:00:00Z","modified":"2026-05-07T08:56:41Z","updated_at":"2026-11-02T15:53:40.430679Z"}]}}
