# GHSA-qg8r-f7x3-25f7: imageproc: Out-of-bounds read via NaN coordinates in bilinear/bicubic sampling

> An attacker can trigger out-of-bounds reads in imageproc via NaN coordinates, potentially leaking memory or causing crashes.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Not stated
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 1 May 2026
- **Also known as:** RUSTSEC-2026-0117

## What is GHSA-qg8r-f7x3-25f7?

GHSA-qg8r-f7x3-25f7 is a memory corruption vulnerability in imageproc, published on 1 May 2026. 

### Official description

A bounds check was performed in floating points before a cast to the index passed to an unchecked access function. This checked considered `NaN` cases improperly, causing them to succeed the check instead of failing it. The floating point coordinate is under caller control by passing a selected projection matrix.

Carefully controlling the coordinates of an image with no data and one non-zero dimension provides an arbitrary read primitive in the first 32-bits of address space with a Bilinear sampling method.

Using bicubic sampling can result in a read of a few bytes beyond an allocation.

Other out-of-bounds reads may be possible.

## Which versions are affected by GHSA-qg8r-f7x3-25f7?

9 open source packages ship an affected version, including imageproc.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `imageproc` | crates.io | All versions | 0.23.1 |
| `imageproc` | crates.io | All versions | 0.23.1 |
| `imageproc` | crates.io | From 0.0.0-0 | 0.23.1, 0.24.1, 0.25.1, 0.26.2 |
| `imageproc` | crates.io | From 0.24.0 | 0.24.1 |
| `imageproc` | crates.io | From 0.24.0 | 0.24.1 |
| `imageproc` | crates.io | From 0.25.0 | 0.25.1 |
| `imageproc` | crates.io | From 0.25.0 | 0.25.1 |
| `imageproc` | crates.io | From 0.26.0 | 0.26.2 |
| `imageproc` | crates.io | From 0.26.0 | 0.26.2 |

## How do I fix GHSA-qg8r-f7x3-25f7?

Upgrade imageproc to a fixed version for your release line: 0.23.1, 0.24.1, 0.25.1 or 0.26.2.

## Is GHSA-qg8r-f7x3-25f7 being exploited?

There is no known exploitation of GHSA-qg8r-f7x3-25f7 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-qg8r-f7x3-25f7 and fix it if it is affected.

What it is: GHSA-qg8r-f7x3-25f7 is a memory corruption vulnerability in imageproc, published on 1 May 2026. 
Exploitation: There is no known exploitation of GHSA-qg8r-f7x3-25f7 in the wild and no public exploit code.

Affected packages and fixed versions:
- imageproc (crates.io): affected all versions; fixed in 0.23.1
- imageproc (crates.io): affected all versions; fixed in 0.23.1
- imageproc (crates.io): affected from 0.0.0-0; fixed in 0.23.1, 0.24.1, 0.25.1, 0.26.2
- imageproc (crates.io): affected from 0.24.0; fixed in 0.24.1
- imageproc (crates.io): affected from 0.24.0; fixed in 0.24.1
- imageproc (crates.io): affected from 0.25.0; fixed in 0.25.1
- imageproc (crates.io): affected from 0.25.0; fixed in 0.25.1
- imageproc (crates.io): affected from 0.26.0; fixed in 0.26.2
- imageproc (crates.io): affected from 0.26.0; fixed in 0.26.2

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-qg8r-f7x3-25f7/ (Markdown: https://insights.sbomify.com/GHSA-qg8r-f7x3-25f7/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-qg8r-f7x3-25f7

---
From sbomify Insights: https://insights.sbomify.com/GHSA-qg8r-f7x3-25f7/
Summaries are generated and may contain mistakes; the official description above is the record.
