9.3critical
imgproxy 4.0.0 before 4.0.16 Heap Buffer Overflow via ICO Loader Integer Overflow
- Severity
- 9.3critical CVSS:4.0 by VulnCheck
- Exploit likelihood
- 0.78% (higher than 57% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- VulnCheck
- Also known as
- GHSA-hff9-5pqw-6w9fGO-2026-6897
Description
imgproxy from 4.0.0 before 4.0.16 contains an integer overflow in the ICO loader that allows remote attackers to trigger a heap buffer overflow via a crafted data_size value. Attackers can submit a crafted ICO image whose data_size wraps the allocation in vips/icoload.c, corrupting heap memory to crash the process or achieve code execution.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| imgproxy imgproxy | from 4.0.0 before 4.0.16 Not affected: 4.0.16 | CVE List |
| github.com/imgproxy/imgproxy/v3 (Go) | from 4.0.0 before 4.0.16, all versions | GitHub Advisory Database, Go Vulnerability Database |
| github.com/imgproxy/imgproxy/v2 (Go) | from 4.0.0 before 4.0.16, all versions | GitHub Advisory Database, Go Vulnerability Database |
| github.com/imgproxy/imgproxy (Go) | from 4.0.0 before 4.0.16, all versions | GitHub Advisory Database, Go Vulnerability Database |
| github.com/imgproxy/imgproxy/v4 (Go) | from 4.0.0 before 4.0.16 | Go Vulnerability Database |
All scores
| VulnCheck | 9.3critical CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N |
| VulnCheck | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Classification
What each source says
CVE List
imgproxy from 4.0.0 before 4.0.16 contains an integer overflow in the ICO loader that allows remote attackers to trigger a heap buffer overflow via a crafted data_size value. Attackers can submit a crafted ICO image whose data_size wraps the allocation in vips/icoload.c, corrupting heap memory to crash the process or achieve code execution.
GitHub Advisory Database
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:
- Attacker-controlled bytes begin with the ICO magic
00 00 01 00. - imgproxy identifies the source as ICO and dispatches it to
vips_icoload_source_go. vips_foreign_load_ico_headerreads the attacker-controlleddata_size.- The 32-bit addition wraps, and
VIPS_MALLOCreceives the value three. vips_foreign_load_read_fullpasses the originaldata_sizeto the Go source callback.- 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.
Go Vulnerability Database
imgproxy has integer overflow in imgproxy ICO loader that causes denial of service and may permit remote code execution in github.com/imgproxy/imgproxy
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-123614 changed 2026-11-09 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-hff9-5pqw-6w9f changed 2026-11-08 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2026-6897 changed 2026-11-08 | CC-BY-4.0 |
| NVD | CVE-2026-123614 changed 2026-11-12 | Public domain |