# Next.js and libheif RCE in HEIF/AVIF image processing

Source: https://junglewise.ai/threats/next-js-and-libheif-rce-in-heif-avif-image-processing-eebb5345  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-08-25. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

Severity: info · CVSS 9.8 · Published 2026-08-25

Next.js is a popular React framework used to build and serve web applications. The image optimization feature in Next.js improperly handles specially crafted HEIF/AVIF image files, allowing unauthenticated attackers to execute arbitrary code on the application server. An attacker can exploit this by uploading a malicious image file to a Next.js application, potentially compromising the entire application and underlying infrastructure.

Technologies: [Google Cloud Platform](https://junglewise.ai/threats/technologies/google-cloud-platform), [Vercel Next.js](https://junglewise.ai/threats/technologies/next-js). Vendors: [Google](https://junglewise.ai/threats/vendors/google), [Vercel](https://junglewise.ai/threats/vendors/vercel).

## Quick answers

**Is This vulnerability exploited in the wild?** No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.

**How severe is This vulnerability?** Informational severity, with a CVSS score of 9.8, published 25 August 2026.

**Which products and versions are affected?** Vercel Next.js below 15.5.24 and below 16.3.3.

**Is there a fix for This vulnerability?** A patch was published on 2026-08-25: Patches available: Next.js 16.3.3, 15.5.24 and later Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is This vulnerability attacked?** It is attacked over the network, in a software library.

**Am I affected?** Check whether you run Google Cloud Platform or Vercel Next.js at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

The vulnerability is an unauthenticated remote code execution flaw in Next.js image optimization and the underlying libheif library. The root cause lies in improper processing of clean aperture boxes in HEIF/AVIF image files, which leads to code execution when malicious image data is processed. The attack vector is network-based and requires no authentication—an attacker simply supplies a crafted image file to the application's image optimization endpoint. An attacker can achieve arbitrary code execution within the application context. Patches are available: Next.js versions 16.3.3 and 15.5.24 or later address this issue. Customers must also monitor for upstream libheif patches and rebuild container base images accordingly.

## Affected products

- Vercel Next.js below 15.5.24 and below 16.3.3
- libheif <UNKNOWN>

## Timeline

- 2026-08-25: disclosed: Published in GCP-2026-055 security bulletin
- 2026-08-25: patched: Patches available: Next.js 16.3.3, 15.5.24 and later

## References

- [https://docs.cloud.google.com/support/bulletins/index](https://docs.cloud.google.com/support/bulletins/index)

## Related threats

- [AMD EPYC 5th generation processor data cache information leak](https://junglewise.ai/threats/cve-2024-36350-gcp-2026-081)
- [Istio authentication bypass or access control vulnerability](https://junglewise.ai/threats/cve-2026-31836-gcp-2026-080)
- [Slurm multiple vulnerabilities in Cluster Toolkit](https://junglewise.ai/threats/cve-2026-65107-slurm-sbcast-shared-library-validation-bypass)
- [Google Application Integration deserialization of untrusted data in SubWorkflow](https://junglewise.ai/threats/cve-2026-93327-gcp-2026-074)
- [Google Compute Engine incorrect authorization in disk access](https://junglewise.ai/threats/cve-2026-85299-gcp-2026-073)
