---
title: "GHSA-hff9-5pqw-6w9f: imgproxy has integer overflow in imgproxy ICO loader that causes denial of service and may permit remote code execution"
url: https://erroneo.us/security/ghsa/GHSA-hff9-5pqw-6w9f/
description: "GHSA-hff9-5pqw-6w9f (critical, Go): imgproxy has integer overflow in imgproxy ICO loader that causes denial of service and may permit remote code execution.…"
type: advisory
section: "Security Digest"
date_published: 2026-10-30
date_modified: 2026-10-30
publisher: erroneo.us
author: erroneo.us Security Desk
ghsa: "GHSA-hff9-5pqw-6w9f"
license: All rights reserved. Quote with attribution and a link.
---

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

## Affected packages

- Go `github.com/imgproxy/imgproxy/v3` >= 4.0.0, < 4.0.16 → fixed: 4.0.16
- Go `github.com/imgproxy/imgproxy/v2` >= 4.0.0, < 4.0.16 → fixed: 4.0.16
- Go `github.com/imgproxy/imgproxy` >= 4.0.0, < 4.0.16 → fixed: 4.0.16

## Details

Summary The ICO loader allocates datasize + BMPFILEHEADERLEN bytes after reading a 32-bit attacker-controlled datasize. For datasize > UINT32MAX - BMPFILEHEADERLEN, 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: The crafted directory entry contains: The allocation is therefore three bytes. actualdata 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 vipsicoloadsourcego. 3. vipsforeignloadicoheader reads the attacker-controlled datasize. 4. The 32-bit addition wraps, and VIPSMALLOC receives the value three. 5. vipsforeignloadreadfull passes the original datasize 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.

## Sources

- [GitHub Advisory GHSA-hff9-5pqw-6w9f](https://github.com/advisories/GHSA-hff9-5pqw-6w9f)
- [github.com](https://github.com/imgproxy/imgproxy/security/advisories/GHSA-hff9-5pqw-6w9f)
- [github.com](https://github.com/imgproxy/imgproxy/commit/a821b6a4cb07a1bf2bb9077431d1c1e734d79917)
- [github.com](https://github.com/imgproxy/imgproxy/releases/tag/v4.0.16)

---
Source page: https://erroneo.us/security/ghsa/GHSA-hff9-5pqw-6w9f/ · Security Digest: https://erroneo.us/security/ · More: https://erroneo.us/llms.txt
