Node.js ImageResponse Implementation Vulnerability Enables Remote Code Execution
Next.js 16.2.0–16.3.5 Node.js ImageResponse can allow RCE via unsanitized SVG input; fixed in 16.3.6.
Improper Output Escaping in Satori SVG Generator Exposes Next.js OG Image Pipelines
Satori, the open-source library that converts HTML and CSS into SVG and powers Next.js's ImageResponse/@vercel/og image generation, fails to escape certain values before embedding them in its SVG output (CWE-116). An attacker who can get crafted content (e.g., user-controlled text, titles, or query parameters) rendered through a Satori-based endpoint can inject arbitrary SVG markup into the generated image. The impact depends on how the SVG is consumed downstream: the CVSS vector (SC:H/SI:H with UI:P) indicates high impact on subsequent systems, and public reports demonstrate cross-site scripting and, in some server-side rendering configurations, code execution. All applications using Satori from 0.0.27 up to (but not including) 0.33.5 are affected, with 0.33.5 containing the patch; the vendor states no complete workaround exists besides upgrading and warns against rendering attacker-controlled content until patched. Four public proof-of-concept repositories exist, the flaw is not yet in CISA's KEV catalog, and no confirmed in-the-wild exploitation has been reported.
What to do: Upgrade Satori to 0.33.5 or later immediately; Next.js users should update to a build that pulls the patched Satori and verify with 'npm ls satori' (or the equivalent in pnpm/yarn/lockfile inspection). Until patched, do not render attacker-controlled content (query parameters, usernames, post titles, free-text fields) through Satori or ImageResponse endpoints — restrict OG image inputs to trusted or strictly allowlisted values. Also review how generated SVGs are consumed downstream and disable script/markup execution in any server-side SVG rasterizer or renderer processing them.
| Product | Affected |
|---|---|
| Vercel Satori | >= 0.0.27, < 0.33.5 (fixed in 0.33.5) |
| Vercel Next.js ImageResponse / @vercel/og (downstream consumers of Satori) | — |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
Satori is a library to convert HTML and CSS to SVG. Starting in version 0.0.27 and prior to version 0.33.5, Satori does not properly escape certain values before including them in generated SVG output. This can allow crafted values to be interpreted as SVG markup. The impact depends on how the generated SVG is consumed. Version 0.33.5 contains a patch. No complete workaround exists besides upgrading. Applications that cannot immediately upgrade should not render attacker-controlled content with Satori.
Next.js 16.2.0–16.3.5 Node.js ImageResponse can allow RCE via unsanitized SVG input; fixed in 16.3.6.
Next.js CVE-2026-94545 can allow unauthenticated remote code execution through malicious SVG in ImageResponse.
Vercel patched critical Next.js ImageResponse flaw CVE-2026-94545 (CVSS 9.5) allowing server code execution via crafted SVG input; no attacks reported yet.
Today 1.6K readers · 2.5K views · 778 reads · all time 189K views