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.
Until a fix has propagated, optimization of AVIF files is disabled.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| npm package | next | >= 10.0.0, < 15.5.24, >= 16.0.0, < 16.3.3 | 15.5.24, 16.3.3 |
References
- https://github.com/strukturag/libheif/security/advisories/GHSA-g89c-p67h-r497
- https://github.com/vercel/next.js/security/advisories/GHSA-2xp9-vwfh-vxw4
- https://github.com/vercel/next.js/pull/97875
- https://github.com/vercel/next.js/pull/97931
- https://github.com/vercel/next.js/commit/3a15b4ac6ac8e70b1a9b18ecc18e8434462899b3
- https://github.com/vercel/next.js/commit/409772ec807def20132d251ad48fd8d8ad4c73c2
- https://github.com/vercel/next.js/commit/7a5937a8ab20b89d0a961f75eabb11577f5d5998
- https://github.com/vercel/next.js
- https://github.com/vercel/next.js/releases/tag/v15.5.24
- https://github.com/vercel/next.js/releases/tag/v16.3.3
- CVSS vector
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H- Weakness (CWE)
CWE-1395- Platform
- npm
- Package
next- Disclosed
- 08.09.2026
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-2xp9-vwfh-vxw4 - CC BY 4.0
Vulnerability history: next
All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 73
- First → latest
- 12.2017 10.2026
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- Critical 5
- High 27
- Medium 32
- Low 9
Disclosures per year
- 2017: 1
- 2018: 2
- 2019: 0
- 2020: 3
- 2021: 3
- 2022: 3
- 2023: 1
- 2024: 6
- 2025: 14
- 2026: 40
-
Next.js: Unauthenticated Remote Code Execution in Image Optimization API when AVIF files are used this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.