CVE-2026-70652: libvips: Possible heap-based buffer read overflow when resizing and re-encoding a JPEG with gain map

Published Aug 20, 2026
·
Updated

libvips is a fast image processing library with low memory needs. Prior to version 8.18.3, libvips built with libultrahdr support can incorrectly size an output buffer in libvips/foreign/uhdrsave.c within vipsforeignsaveuhdrsetrawhdr when a pipeline enlarges an incoming JPEG to a very large output before encoding a gain map through VipsForeignSaveUhdr. The undersized allocation can cause a heap buffer over-read that may disclose adjacent data or crash the process. This issue is fixed in version 8.18.3.

Affected Software

1 affected component
libvips libvips<8.18.3

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade libvips to a version that resolves this vulnerability.

    Fixed in 8.18.3

Event History

Aug 20, 2026
CVE Published
via MITRE·09:04 PM
Data Sourced
via MITRE·09:04 PM
DescriptionWeakness

Frequently Asked Questions

1

Which deployments are exposed?

Deployments using libvips built with libultrahdr support are affected when they process a pipeline that enlarges an incoming JPEG to a very large output and then encodes a gain map through VipsForeignSaveUhdr.

2

What input and processing conditions are needed to trigger the issue?

The triggering condition is an incoming JPEG that is resized to a very large output before gain-map encoding through VipsForeignSaveUhdr. Under those conditions, the output buffer can be allocated too small.

3

How can I determine whether an environment still needs remediation?

Check whether the installed libvips version is earlier than 8.18.3 and whether it was built with libultrahdr support. Also identify workloads that use VipsForeignSaveUhdr to create gain maps after substantially enlarging JPEG inputs.

4

What is the available fix?

Upgrade libvips to version 8.18.3, which fixes the incorrect output-buffer sizing.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203