GHSA-2xp9-vwfh-vxw4criticalCode execution2026-09-08
Next.js: Unauthenticated Remote Code Execution in Image Optimization API when AVIF files are used
A vulnerability in the underlying libheif library used by sharp which Next.js uses for image optimization can lead to remote code execution when AVIF files are optimized.
What it is
A vulnerability in the underlying libheif library used by sharp which Next.js uses for image optimization can lead to remote code execution when AVIF files are optimized.
Until a fix has propagated, optimization of AVIF files is disabled.
How to check
- Affected: next (npm) >= 10.0.0, < 15.5.24.
- Affected: next (npm) >= 16.0.0, < 16.3.3.
- Compare your installed version with the range above (command below).
How to fix
- Upgrade next to 15.5.24 or later.
- Upgrade next to 16.3.3 or later.
npm ls next Sources
More advisories for this tool
- criticalCVE-2026-114125: A malicious website can tamper with your project through a running Storybook dev server
- criticalCVE-2026-96889: Next.js image optimization RCE via SVG
- criticalNext.js ‘use cache’ remote code execution via typed arrays
- criticalNext.js: Remote Code Execution in next/og ImageResponse