Package vulnerability, severity high
Next.js unauthenticated RCE via crafted image in image optimization (libheif)
Published , updated
Google Cloud bulletin GCP-2026-055 describes an unauthenticated remote code execution flaw in Next.js image optimization (GHSA-2xp9-vwfh-vxw4, GHSA-g89c-p67h-r497). An attacker can run arbitrary code in the application by supplying a crafted HEIF/AVIF image, caused by how libheif handles clean aperture boxes. Google Cloud infrastructure is not affected, but customer Next.js workloads, for example on Cloud Run, GKE or App Engine, may be.
What's affected
- next (npm)>=16.0.0 <16.3.3; >=15.0.0 <15.5.24
What to do
- Upgrade Next.js to 16.3.3, 15.5.24 or later in package.json
- Redeploy updated workloads so running containers use the patched version
- If you use libheif, watch for upstream OS patches and rebuild container base images
Check whether you were affected
Pharon tells teams automatically when this affects something they run. To check a machine, run this in Claude Code with the Pharon plugin, in the repository that uses it:
/pharon:check-incident nextjs-libheif-rce-2026-08References
Notice nextjs-libheif-rce-2026-08, signed with key feed-prod-2026-10 (Ed25519). The Pharon CLI verifies the signature before using a notice.