← All advisories

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.

01.

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.

02.

How to check

  1. Affected: next (npm) >= 10.0.0, < 15.5.24.
  2. Affected: next (npm) >= 16.0.0, < 16.3.3.
  3. Compare your installed version with the range above (command below).
03.

How to fix

  1. Upgrade next to 15.5.24 or later.
  2. Upgrade next to 16.3.3 or later.
npm ls next
04.

Sources

More advisories for this tool
The weekly email

One email a week. Only what changed.

Every new security hole in AI coding tools, MCP servers, app builders and the stacks they generate (Next.js, Supabase, Node, PHP), each with how to check your app and the fix. No roundups of things you already read.

Free, one email a week. Read the latest issue first if you like. One-click unsubscribe in every email. We never sell or share addresses.