Next.js CVE-2026-94545: ImageResponse RCE Response Guide
CVE-2026-94545 is a critical remote code execution vulnerability in the Node.js runtime implementation of Next.js's next/og ImageResponse feature, rated CVSS 9.5. ImageResponse converts JSX and CSS into a PNG using Satori to first render the JSX/CSS into SVG; Satori does not correctly escape certain values before they reach that SVG output, so attacker-controlled data placed into SVG content, an attribute, or a style can break out of its context and be interpreted as SVG markup, ultimately achieving code execution on the server generating the image. The flaw affects Next.js 16.2.0 up to (but not including) 16.3.6 running the Node.js ImageResponse implementation — Edge ImageResponse is not affected. Vercel shipped the fix in Next.js 16.3.6 on September 22, 2026, and backported a hardening release to 15.5.26 as a precaution even though 15.x's ImageResponse implementation is not vulnerable to the RCE itself.
Why an OG-Image Feature Is a Server RCE Vector
ImageResponse exists to generate dynamic Open Graph / social-preview images at request time — a feature many teams treat as presentation-layer and don't threat-model as an execution path. That assumption is exactly what makes this bug dangerous: any route that builds an ImageResponse from data an attacker can influence (query parameters, user profile fields, post titles, CMS content, or anything else rendered into the JSX passed to ImageResponse) is a candidate, not just routes that obviously accept untrusted HTML.
The underlying defect sits in Satori's SVG serialization, not in application code — meaning a project can be exposed purely by using ImageResponse with any attacker-influenced input, with no unusual or insecure code of its own to blame.
Determine Exposure
Exposure depends on the Next.js version, the runtime, and whether any ImageResponse call path includes attacker-influenced data.
- •Check your installed Next.js version — versions >= 16.2.0 and < 16.3.6 are vulnerable when ImageResponse runs on the Node.js runtime; Edge runtime ImageResponse is not affected
- •Inventory every route using next/og's ImageResponse (typically opengraph-image.tsx, twitter-image.tsx, or custom API routes generating share-card images)
- •For each usage, trace whether any value reaching the JSX/CSS passed to ImageResponse originates from user input, query parameters, database content editable by users, or third-party feeds — that is the exploitable path
- •Next.js 15.x is not affected by the RCE itself; 15.5.26 is a precautionary hardening release, not a required emergency patch for 15.x deployments
Immediate Response Steps
With a public CVSS 9.5 write-up and proof-of-concept detail already circulating, treat this as urgent for any 16.x deployment using ImageResponse on the Node.js runtime with attacker-influenced input.
- •Upgrade to Next.js 16.3.6 or later — this is the only complete fix, since the defect is in Satori's SVG escaping and not something reliably mitigated by input filtering at the application layer
- •If immediate upgrade isn't possible, as a stopgap move affected ImageResponse routes to the Edge runtime where feasible, since Edge ImageResponse is not affected by this RCE
- •Where Edge migration isn't feasible short-term, restrict or strip any user-controllable data from JSX/CSS passed into ImageResponse calls as a temporary compensating control — this reduces risk but does not close the underlying escaping defect
- •Review access and error logs for anomalous requests to opengraph-image, twitter-image, or custom OG-image routes around the disclosure window (week of September 22, 2026) for signs of exploitation attempts
Relationship to the Existing AVIF Image Optimization Advisory
This is a distinct vulnerability from the previously tracked Next.js AVIF Image Optimization RCE (GHSA-2xp9-vwfh-vxw4) — that issue is a libheif/AVIF decode flaw in the image optimizer, while CVE-2026-94545 is an SVG serialization/escaping flaw in next/og's Satori-based ImageResponse rendering. They share the same product family but not the same code path or fix. Disclosure of this CVE also moves the patch target for the AVIF advisory: the safe Next.js 16.x version is now >= 16.3.6 (up from >= 16.3.3), and the safe 15.x version is now >= 15.5.26 — teams tracking the AVIF advisory should update their target version accordingly even if ImageResponse itself is unused.
References
Primary sources for the material above. Standards are cited by identifier so they stay findable as publishers reorganise their sites.
- Vercel / Next.js Security Advisory — GHSA-vcvr-r3jv-pc5j, Next.js next/og ImageResponse RCE (CVE-2026-94545)
- Next.js 16.3.6 release notes, 2026-09-22