CriticalVulnerabilityGHSA-2xp9-vwfh-vxw4Published 8 Sep 2026
Next.js: Unauthenticated Remote Code Execution in Image Optimization API when AVIF files are used
Affected releases · next
- 16.x16.0.0 – 16.3.2Fixed in 16.3.3
- 15.x15.0.0 – 15.5.23Fixed in 15.5.24
- 14.x14.0.0 – 14.2.35No fix on this line yet
- 13.x and older10.0.0 – 13.5.11No fix, no longer updated
On 16.x, the newest line:
npm install next@16.3.316.x
Affected
16.0.0 – 16.3.2
36 releases
Fixed
16.3.3 – 16.4.2
9 releases, latest
15.x
Affected
15.0.0 – 15.5.23
77 releases
Fixed
15.5.24 – 15.5.28
5 releases
14.x
Affected
14.0.0 – 14.2.35
46 releases
13.x
Affected
13.0.0 – 13.5.11
56 releases
12.x
Affected
12.0.0 – 12.3.7
33 releases
11.x
Affected
11.0.0 – 11.1.4
7 releases
10.x
Affected
10.0.0 – 10.2.3
18 releases
Is your project affected?
Paste your package.json, or type the range you declare for next. It is read in your browser and sent nowhere.
What happens
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.