Skip to content
OpenAdvisories
Critical GHSA-2xp9-vwfh-vxw4

Next.js: Unauthenticated Remote Code Execution in Image Optimization API when AVIF files are used

Published Sep 8, 2026 · Updated Sep 8, 2026 · Assigned by GHSA

Description

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.

Affected packages

EcosystemPackageAffectedFixedRecord
npm next >= 10.0.0, < 15.5.24 15.5.24 GHSA-2xp9-vwfh-vxw4
npm next >= 16.0.0, < 16.3.3 16.3.3 GHSA-2xp9-vwfh-vxw4

References