Get a Demo

Let's Patch It!

Book a short call with one our specialists, we'll walk you through how Endor Patches work, and ask you a few questions about your environment (like your primary programming languages and repository management). We'll also send you an email right after you fill out the form, feel free to reply with any questions you have in advance!

CVE

CVE-2026-123614

imgproxy has integer overflow in imgproxy ICO loader that causes denial of service and may permit remote code execution
Back to all
CVE

CVE-2026-123614

imgproxy has integer overflow in imgproxy ICO loader that causes denial of service and may permit remote code execution

Summary

The ICO loader allocates datasize + BMPFILEHEADERLEN bytes after reading a 32-bit attacker-controlled data_size. For datasize > UINT32MAX - BMPFILEHEADER_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 vipsicoloadsource_go.
  3. vipsforeignloadicoheader reads the attacker-controlled data_size.
  4. The 32-bit addition wraps, and VIPS_MALLOC receives the value three.
  5. vipsforeignloadreadfull 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.

Package Versions Affected

Package Version
patch Availability
No items found.

Automatically patch vulnerabilities without upgrading

Fix Without Upgrading
Detect compatible fix
Apply safe remediation
Fix with a single pull request

CVSS Version

Severity
Base Score
CVSS Version
Score Vector
C
H
U
9.3
-
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
C
H
U
0
-
3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
C
H
U
9.8
-
3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Related Resources

No items found.

References

https://github.com/imgproxy/imgproxy/security/advisories/GHSA-hff9-5pqw-6w9f, https://github.com/imgproxy/imgproxy/commit/a821b6a4cb07a1bf2bb9077431d1c1e734d79917, https://github.com/imgproxy/imgproxy, https://github.com/imgproxy/imgproxy/releases/tag/v4.0.16

Severity

9.8

CVSS Score
0
10

Basic Information

Base CVSS
9.8
EPSS Probability
0.00657%
EPSS Percentile
0.52202%
Introduced Version
4.0.0,v4.0.0-beta.0
Fix Available
4.0.16,v4.0.16

Fix Critical Vulnerabilities Instantly

Secure your app without upgrading.
Fix Without Upgrading