Root Cause: Unescaped Values Reaching SVG Output
Vercel disclosed a critical vulnerability in Next.js's ImageResponse feature — the API behind next/og, used to generate Open Graph images and other social preview cards. Tracked as CVE-2026-94545 (GHSA-vcvr-r3jv-pc5j), the flaw carries a CVSS score of 9.5 and affects Next.js 16.2.0 through 16.3.5 when ImageResponse runs on the Node.js runtime — the default runtime Next.js uses.
The underlying bug lives in Satori, the library Next.js uses to convert JSX into SVG for ImageResponse. Per Satori's own advisory, certain values reached its SVG output without being properly escaped, meaning a specially crafted value could be interpreted as SVG markup rather than plain text. In a Next.js application, values reaching that unescaped output could trigger vulnerabilities in other dependent libraries — which Vercel has not named — resulting in code execution on the server.
Vulnerability Summary
| Field | Details |
|---|---|
| CVE ID | CVE-2026-94545 / GHSA-vcvr-r3jv-pc5j |
| CVSS Score | 9.5 (Critical) in Next.js; 5.3 (Moderate) rated directly against Satori |
| Affected | Next.js 16.2.0 – 16.3.5, ImageResponse on the Node.js runtime |
| Not Affected | Edge ImageResponse implementation; Next.js 15 (RCE does not apply) |
| Fixed In | Next.js 16.3.6 (Active LTS); Next.js 15.5.26 (hardening only, not vulnerable to the RCE) |
| Root Cause Library | Satori — fixed in v0.33.5 |
What Triggers It
The vulnerability requires an application to pass attacker-controlled values into SVG content, attributes, or styles during image generation via ImageResponse — for example, reading a value from a request URL query parameter and rendering it directly inside the generated <svg>. Applications that:
- Use the Edge
ImageResponseimplementation, or - Never pass attacker-controlled values into the SVG output
...are not affected.
Netlify confirmed the same scoping for its customers: sites are only affected if they use ImageResponse and the generated image incorporates untrusted input such as request text or a request-supplied image URL.
Detection Caveat
Vercel's advisory does not provide a way to determine whether an affected route was exploited before the patch shipped. If your application used a vulnerable ImageResponse configuration with attacker-controlled input, treat prior exploitation as unconfirmable rather than ruled out, and prioritize the upgrade regardless of whether you've observed suspicious activity.
Remediation
- Upgrade immediately:
npm install next@16.3.6(ornext@15.5.26for the Maintenance LTS branch, which received hardening even though it isn't vulnerable to the RCE itself). - If you use Satori directly (outside of Next.js), upgrade to v0.33.5.
- Audit every
ImageResponseusage in your codebase for attacker-controlled input — query parameters, request body values, or externally supplied text/images — flowing into the generated SVG. - Where possible, sanitize or allowlist any dynamic values before they reach
ImageResponse, independent of the framework-level patch. - Confirm your deployment target (Vercel, Netlify, or self-hosted) has applied the corresponding platform-level fix.