Vulnerabilities / GHSA-2xp9-vwfh-vxw4

critical

GHSA-2xp9-vwfh-vxw4

Next.js: Unauthenticated Remote Code Execution in Image Optimization API when AVIF files are used

Published Modified
In the Trivy database since at least 24 Oct 2026, 07:11 UTCWhen it arrived before that build is not recorded.

Severity by source

GHSA9.5CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H

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

SourcePackageFixed in
npm::GitHub Security Advisory npmnext15.5.24, 16.3.3
echo npm::Echo OSVnext15.5.24
seal npm::Seal Security Database@seal-security/next, next16.0.6-sp999
Show all 4 entries from 3 sources
SourcePackageFixed in
npm::GitHub Security Advisory npmnext15.5.24, 16.3.3
echo npm::Echo OSVnext15.5.24
seal npm::Seal Security Database@seal-security/next16.0.6-sp999
seal npm::Seal Security Databasenext16.0.6-sp999

References

All 12 references

Vulnerability data compiled from the Trivy vulnerability database (trivy-db, Aqua Security, Apache License 2.0), which aggregates third-party advisories. CVE records are published by The MITRE Corporation under the CVE Terms of Use; CVE is a trademark of MITRE. This product uses data from the NVD API but is not endorsed or certified by the NVD. Severity, titles and advisory data from the GitHub Advisory Database (CC BY 4.0), Red Hat security data (CC BY 4.0) and the other sources linked on each entry. Entries may be summarised or re-formatted; the linked original is the authoritative record.