# GHSA-2xp9-vwfh-vxw4: Next.js: Unauthenticated Remote Code Execution in Image Optimization API when AVIF files are used

- Severity: Critical (CVSS:4.0, scored by GitHub) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2026-09-08T21:21:12.000Z
- Modified: 2026-09-08T21:30:04.767Z
- Weaknesses: CWE-1395

## 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.

(As written by GitHub Advisory Database.)

## Affected

- next (npm): from 10.0.0 before 15.5.24; from 16.0.0 before 16.3.3

## References

- <https://github.com/strukturag/libheif/security/advisories/GHSA-g89c-p67h-r497> (web)
- <https://github.com/vercel/next.js/security/advisories/GHSA-2xp9-vwfh-vxw4> (web)
- <https://github.com/vercel/next.js/pull/97875> (web)
- <https://github.com/vercel/next.js/pull/97931> (web)
- <https://github.com/vercel/next.js/commit/3a15b4ac6ac8e70b1a9b18ecc18e8434462899b3> (web)
- <https://github.com/vercel/next.js/commit/409772ec807def20132d251ad48fd8d8ad4c73c2> (web)
- <https://github.com/vercel/next.js/commit/7a5937a8ab20b89d0a961f75eabb11577f5d5998> (web)
- <https://github.com/vercel/next.js> (package)
- <https://github.com/vercel/next.js/releases/tag/v15.5.24> (web)
- <https://github.com/vercel/next.js/releases/tag/v16.3.3> (web)

## Sources

- GitHub Advisory Database: [GHSA-2xp9-vwfh-vxw4](https://github.com/advisories/GHSA-2xp9-vwfh-vxw4), CC-BY-4.0, modified 2026-09-08

---

Page: https://cve.day/GHSA-2xp9-vwfh-vxw4 · Whole record: https://cve.day/GHSA-2xp9-vwfh-vxw4.json · Rebuilt by cve.day 2026-11-25T22:56:43.697Z
