GHSA-2xp9-vwfh-vxw4: Npm/next vulnerability

Published Sep 8, 2026
·
Updated

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

2 affected componentsFixes available
npm/next>=16.0.0<16.3.3
16.3.3
npm/next>=10.0.0<15.5.24
15.5.24

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/next to a version that resolves this vulnerability.

    Fixed in 16.3.3
  2. Upgrade

    Upgrade npm/next to a version that resolves this vulnerability.

    Fixed in 15.5.24
  3. 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

Sep 8, 2026
Advisory Published
via GitHub·09:21 PM
Data Sourced
via GitHub·09:21 PM
DescriptionWeaknessAffected Software

Frequently Asked Questions

1

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.

2

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.

3

Is AVIF optimization currently enabled?

No. AVIF optimization is disabled until a fix has propagated.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203