GHSA-2xp9-vwfh-vxw4
Next.js: Unauthenticated Remote Code Execution in Image Optimization API when AVIF files are used
Severity by source
Trivy's own label is CRITICAL. Rated critical 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 and fixed versions
| Source | Package | Fixed in |
|---|---|---|
| npm::GitHub Security Advisory npm | next | 15.5.24, 16.3.3 |
| echo npm::Echo OSV | next | 15.5.24 |
| seal npm::Seal Security Database | @seal-security/next, next | 16.0.6-sp999 |
Show all 4 entries from 3 sources
| Source | Package | Fixed in |
|---|---|---|
| npm::GitHub Security Advisory npm | next | 15.5.24, 16.3.3 |
| echo npm::Echo OSV | next | 15.5.24 |
| seal npm::Seal Security Database | @seal-security/next | 16.0.6-sp999 |
| seal npm::Seal Security Database | next | 16.0.6-sp999 |
References
- https://advisory.echohq.com/cve/GHSA-2xp9-vwfh-vxw4
- https://github.com/advisories/GHSA-2xp9-vwfh-vxw4
- https://github.com/strukturag/libheif/security/advisories/GHSA-g89c-p67h-r497
- https://github.com/vercel/next.js
- 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/pull/97875