In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsUpgrade next to version 15.5.24, 16.3.3 or higher.
next is a react framework.
Affected versions of this package are vulnerable to Insecure Automated Optimizations through the image-optimizer path in packages/next/src/server/image-optimizer.ts. An attacker can execute code in the server-side image optimization process by supplying an AVIF image to a Next.js image optimization request. The vulnerable optimization path hands AVIF content to sharp/libheif for decoding, so a crafted AVIF file processed by the image API can trigger arbitrary code execution in the Next.js server. This can compromise the application server and expose or alter data handled by the process.
Workaround
Disable AVIF image optimization in Next.js image handling so AVIF files are not processed by the image optimizer and cannot trigger the vulnerable sharp/libheif decode path.