GHSA-2xp9-vwfh-vxw4: Npm/next vulnerability
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 Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
npm/nextto a version that resolves this vulnerability.Fixed in 16.3.3 - Upgrade
Upgrade
npm/nextto a version that resolves this vulnerability.Fixed in 15.5.24 - Configuration
Disable image optimization for AVIF files (libheif via sharp) until a fix has propagated to prevent remote code execution during AVIF optimization.
Next.js image optimization (sharp/libheif AVIF optimization) AVIF optimization = disabled
Event History
Frequently Asked Questions
Who is exposed to this issue?
Next.js deployments that use image optimization are exposed when AVIF files are optimized, because Next.js uses sharp and its underlying libheif library for that processing.
What must an attacker provide to exploit the vulnerability?
An attacker would need to cause a vulnerable deployment to optimize an AVIF file. The stated impact is remote code execution through the underlying libheif processing.
Is AVIF optimization currently enabled?
No. AVIF optimization is disabled until a fix has propagated.