Heap-based Buffer Overflow Affecting libvips/libvips package, versions [,8.16.1)


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.02% (3rd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-UNMANAGED-LIBVIPSLIBVIPS-9669325
  • published8 Apr 2025
  • disclosed7 Apr 2025
  • creditUnknown

Introduced: 7 Apr 2025

NewCVE-2025-29769  (opens in a new tab)
CWE-122  (opens in a new tab)

How to fix?

Upgrade libvips/libvips to version 8.16.1 or higher.

Overview

Affected versions of this package are vulnerable to Heap-based Buffer Overflow via the heifsave operation which could incorrectly determine the presence of an alpha channel in an input when it was not possible to determine the colour interpretation, known internally within libvips as multiband. An attacker can crash the process by providing a well-crafted TIFF image with 4 channels when HEIF-based output is requested, leading to an attempt to write 4 channels of data into a 3 channel HEIF image, causing a heap buffer overflow.

Workaround

This can be mitigated by blocking the VipsForeignSaveHeif operation via vips_operation_block_set, which is available in most language bindings.

CVSS Base Scores

version 4.0
version 3.1