A newly discovered security flaw in Next.js enables attackers to execute code on a server through ImageResponse, a feature used to create Open Graph and other social preview images, according to Vercel. The risk arises when an app allows values controlled by an attacker, such as text extracted from the request URL, to be incorporated into images. The vulnerability, identified as CVE-2026-94545, impacts Next.js versions 16.2.0 through 16.3.5 when ImageResponse runs on the Node.js runtime, which Next.js utilizes by default.

Apps that "accept attacker-controlled values into SVG content, attributes, or styles during image generation" are affected, as per the advisory. It remains unclear whether text within other ordinary HTML elements, like headings inside divs, is considered as well.

To locate where an app utilizes the feature, search for ImageResponse imported from next/og, typically found in route handlers and opengraph-image files. If upgrading is delayed, the workaround involves isolating any attacker-controlled values from SVG content, attributes, and styles rendered by Node.js ImageResponse. Satori's own advisory, released on the same day, indicates that certain values were not properly escaped, allowing a specially crafted value to be interpreted as SVG code instead of plain text.

Satori's advisory ranks the same CVE as moderate, with a score of 5.3, and notes that impact varies based on how SVG output is utilized.