Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐹
🐹 Go
Not in CISA KEV
CRITICAL severity

imgproxy has integer overflow in imgproxy ICO loader that causes denial of service and may permit remote code executionGHSA-hff9-5pqw-6w9f

CRITICALFix: imgproxy/imgproxy@a821b6a

GHSA-hff9-5pqw-6w9f is a critical-severity (CVSS 9.8) remote code execution vulnerability in github.com/imgproxy/imgproxy/v3. A fix is available for github.com/imgproxy/imgproxy/v3 — see the affected versions and patch details below.

Published
Updated
Affected
3 pkgs
Patched
3 / 3
Exploits
None indexed
Exploitation data as of Oct 30, 2026 · OSV.dev, FIRST.org (EPSS)

Real-World Exposure

3 pkgs affected
🐹github.com/imgproxy/imgproxy/v3🐹github.com/imgproxy/imgproxy/v2🐹github.com/imgproxy/imgproxy

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.

Description

Summary

The ICO loader allocates data_size + BMP_FILE_HEADER_LEN bytes after reading a 32-bit attacker-controlled data_size. For data_size > UINT32_MAX - BMP_FILE_HEADER_LEN, the addition wraps before allocation. imgproxy then writes the ICO prefix and reads up to the original declared size starting 14 bytes into the undersized allocation. A network client can turn this heap overflow into remote denial of service or remote code execution.

Technical details

The vulnerable path is in vips/icoload.c at commit f4fedbb:

uint32_t data_size = GUINT32_FROM_LE(largest_image_header.data_size);

VipsPel *data = (VipsPel *) VIPS_MALLOC(NULL, data_size + BMP_FILE_HEADER_LEN);
void *actual_data = data + BMP_FILE_HEADER_LEN;

if (vips_foreign_load_read_full(ico->source, actual_data, data_size) <= 0) {
  vips_error("vips_foreign_load_ico_header", "unable to read ICO image data from the source");
  return -1;
}

The crafted directory entry contains:

data_size       = 0xfffffff5 (4294967285)
data_offset     = 22
BMP header size = 14
32-bit result   = (0xfffffff5 + 14) mod 2^32 = 3

The allocation is therefore three bytes. actual_data points 14 bytes after the allocation base. The fixture contains 64 bytes after the ICO header, so the source callback copies those 64 bytes to an invalid destination before it can report that the declared multi-gigabyte payload is incomplete.

The complete source-to-sink path is:

  1. Attacker-controlled bytes begin with the ICO magic 00 00 01 00.
  2. imgproxy identifies the source as ICO and dispatches it to vips_icoload_source_go.
  3. vips_foreign_load_ico_header reads the attacker-controlled data_size.
  4. The 32-bit addition wraps, and VIPS_MALLOC receives the value three.
  5. vips_foreign_load_read_full passes the original data_size to the Go source callback.
  6. The callback writes the available source bytes through the invalid pointer, corrupting the process heap.

Impact

A crafted image can terminate the imgproxy process handling it or potentially lead to remote code execution due to heap corruption.

Affected Packages

3 total 3 fixed
EcosystemPackageVulnerable rangeFix
🐹Gogithub.com/imgproxy/imgproxy/v3≥ 4.0.0&&< 4.0.164.0.16go get github.com/imgproxy/imgproxy/v3@v4.0.16
🐹Gogithub.com/imgproxy/imgproxy/v2≥ 4.0.0&&< 4.0.164.0.16go get github.com/imgproxy/imgproxy/v2@v4.0.16
🐹Gogithub.com/imgproxy/imgproxy≥ 4.0.0&&< 4.0.164.0.16go get github.com/imgproxy/imgproxy@v4.0.16

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/imgproxy/imgproxy/v3, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update github.com/imgproxy/imgproxy/v3 to 4.0.16 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-hff9-5pqw-6w9f is resolved across your whole dependency graph.

  3. Workarounds

    Stop feeding it untrusted input: reject or quarantine files and payloads from unverified sources until you can upgrade, restrict accepted formats to the ones you actually need, and run the parsing or decoding step in a least-privileged sandbox or short-lived worker so a crash or corrupted read cannot reach the rest of the process.

Frequently Asked Questions

## Summary The ICO loader allocates `data_size + BMP_FILE_HEADER_LEN` bytes after reading a 32-bit attacker-controlled `data_size`. For `data_size > UINT32_MAX - BMP_FILE_HEADER_LEN`, the addition wraps before allocation. imgproxy then writes the ICO prefix and reads up to the original declared size starting 14 bytes into the undersized allocation. A network client can turn this heap overflow into remote denial of service or remote code execution. ## Technical details The vulnerable path is in [`vips/icoload.c` at commit `f4fedbb`](https://github.com/imgproxy/imgproxy/blob/f4fedbb5c7f6684e7
O3 Security · Impact-Aware SCA

Is GHSA-hff9-5pqw-6w9f in your dependencies?

Find it across Go, including transitive dependencies.