GHSA-w5p8-4jcx-2j6r: imageproc Integer Overflow Vulnerability

MODERATE
CWE-190 CWE-125
Published
Advisory Summary

GHSA-w5p8-4jcx-2j6r is a MODERATE integer overflow vulnerability (CWE-190: Integer Overflow or Wraparound) affecting imageproc libraries in the crates.io ecosystem. The issue involves integer overflow in kernel size check leads to out-of-bounds read. Remediation is available by upgrading affected packages to version 0.23.1, 0.24.1, 0.25.1, 0.26.2.

GHSA-w5p8-4jcx-2j6r at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-w5p8-4jcx-2j6r
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-190: Integer Overflow or Wraparound
Affected Product imageproc
Package Ecosystem crates.io
Published Date
Last Updated

How to Fix GHSA-w5p8-4jcx-2j6r

To remediate this vulnerability, upgrade all affected imageproc dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

imageproc fixed: 0.23.1
Upgrade imageproc to 0.23.1
imageproc fixed: 0.24.1
Upgrade imageproc to 0.24.1
imageproc fixed: 0.25.1
Upgrade imageproc to 0.25.1
imageproc fixed: 0.26.2
Upgrade imageproc to 0.26.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for imageproc

How to Check if You Are Affected

To determine whether your application is affected by GHSA-w5p8-4jcx-2j6r, inspect your project dependencies for imageproc:

inspect dependencies for imageproc

Analyze the terminal output to locate any version of imageproc in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.23.1), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-190: Integer Overflow or Wraparound, where the product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. this occurs when an integer value is incremented to a value that is too large to store in the associated representation. when this occurs, the value may become a very small or negative number. In imageproc, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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.

GHSA-w5p8-4jcx-2j6r Affected imageproc Versions

4 component(s)
Fixed Versions:
0.23.10.24.10.25.10.26.2
Product / Package Ecosystem Affected Versions Fixed Version
imageproc
crates.io
< 0.23.1
0.23.1
imageproc
crates.io
≥ 0.24.0
< 0.24.1
All 1 versions
0.24.0
0.24.1
imageproc
crates.io
≥ 0.25.0
< 0.25.1
All 1 versions
0.25.0
0.25.1
imageproc
crates.io
≥ 0.26.0
< 0.26.2
0.26.2

References

Frequently Asked Questions

What is GHSA-w5p8-4jcx-2j6r?
GHSA-w5p8-4jcx-2j6r is a security vulnerability in imageproc involving integer overflow in kernel size check leads to out-of-bounds read under CWE-190: Integer Overflow or Wraparound.
Which imageproc versions are affected?
Affected versions include releases prior to 0.23.1, 0.24.1, 0.25.1, 0.26.2 across affected packages: imageproc.
What version fixes GHSA-w5p8-4jcx-2j6r?
Upgrading to 0.23.1, 0.24.1, 0.25.1, 0.26.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is imageproc affected?
Yes, imageproc is affected in releases prior to 0.23.1, 0.24.1, 0.25.1, 0.26.2. Upgrade your dependency to 0.23.1, 0.24.1, 0.25.1, 0.26.2 or later.
What CWE is associated with GHSA-w5p8-4jcx-2j6r?
GHSA-w5p8-4jcx-2j6r is classified under CWE-190: Integer Overflow or Wraparound (The product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. This occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may become a very small or negative number.).
How can I check crates.io dependencies for GHSA-w5p8-4jcx-2j6r?
Run the dependency tree command: 'inspect dependencies for imageproc'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-w5p8-4jcx-2j6r",
  "modified" : "2026-05-07T03:13:57Z",
  "published" : "2026-05-07T03:13:57Z",
  "aliases" : [ ],
  "summary" : "imageproc: integer overflow in kernel size check leads to out-of-bounds read",
  "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.\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" : [ {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "imageproc"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.23.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "imageproc"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.24.0"
      }, {
        "fixed" : "0.24.1"
      } ]
    } ],
    "versions" : [ "0.24.0" ]
  }, {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "imageproc"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.25.0"
      }, {
        "fixed" : "0.25.1"
      } ]
    } ],
    "versions" : [ "0.25.0" ]
  }, {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "imageproc"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.26.0"
      }, {
        "fixed" : "0.26.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "PACKAGE",
    "url" : "https://github.com/image-rs/imageproc"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2026-0116.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-125", "CWE-190" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-07T03:13:57Z",
    "nvd_published_at" : null
  }
}