Back to News
News · Cybersecurity

Critical Next.js Flaw Lets Attackers Execute Code via ImageResponse

A CVSS 9.5 vulnerability in a widely used Next.js image-generation feature can be triggered through crafted SVG input, and Vercel has already shipped a fix.

Source: The Hacker News · September 22, 2026

The Hacker News reports a critical flaw, tracked as CVE-2026-94545 with a CVSS score of 9.5, in Next.js's ImageResponse feature, the tool that generates Open Graph and other social preview images. It affects Next.js versions 16.2.0 through 16.3.5 when ImageResponse runs on the Node.js runtime, which Next.js uses by default. Per Vercel's advisory, apps are affected if they pass attacker-controlled values into SVG content, attributes, or styles during image generation. ImageResponse relies on Satori, a Vercel library, to convert the image layout into SVG code before rendering the final PNG, and that conversion step is where the crafted input can lead to server code execution.

The Edge runtime version of ImageResponse is not affected, and neither is Next.js 15. Vercel fixed the flaw on September 22 in Next.js 16.3.6, and developers who call Satori directly should update it to version 0.33.5, which carries the same fix. Where upgrading has to wait, the advisory's workaround is to keep attacker-controlled values out of the SVG content, attributes, and styles that the Node.js ImageResponse renders.

Why it matters: Next.js runs a large share of production web and AI-facing applications, and a server-side code execution path in a default, widely used rendering feature is a reminder to patch cloud-hosted frameworks quickly and to treat any user-controlled input reaching a rendering pipeline as untrusted, the same discipline we build into the applications we run for clients.