Skip to main content
COSMICBYTEZLABS
NewsSecurityHOWTOsToolsTraining
StudyProjectsNewsletterHire MeAbout
Subscribe

Press Enter to search or Esc to close

News
Security
HOWTOs
Tools
Training
Study
Projects
Newsletter
Hire Me
About
RSS Feed
Reading List
Subscribe

Stay in the Loop

Get the latest security alerts, tutorials, and tech insights delivered to your inbox.

Subscribe NowFree forever. No spam.
COSMICBYTEZLABS

Your trusted source for IT intelligence, cybersecurity insights, and hands-on technical guides.

3012+ Articles
170+ Guides

CONTENT

  • Latest News
  • Security Alerts
  • HOWTOs
  • Checklists
  • Projects
  • Exam Prep

RESOURCES

  • Search
  • Browse Tags
  • Newsletter Archive
  • Reading List
  • RSS Feed

COMPANY

  • About Us
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CosmicBytez Labs. All rights reserved.

System Status: Operational
  1. Home
  2. News
  3. Critical Next.js ImageResponse Flaw Can Lead to Server Code Execution via Crafted SVG Input
Critical Next.js ImageResponse Flaw Can Lead to Server Code Execution via Crafted SVG Input
NEWS

Critical Next.js ImageResponse Flaw Can Lead to Server Code Execution via Crafted SVG Input

CVE-2026-94545 (CVSS 9.5) lets attacker-controlled input reach unescaped SVG output in Next.js ImageResponse, enabling RCE. Patched in 16.3.6.

Dylan H.

News Desk

September 23, 2026
3 min read

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

FieldDetails
CVE IDCVE-2026-94545 / GHSA-vcvr-r3jv-pc5j
CVSS Score9.5 (Critical) in Next.js; 5.3 (Moderate) rated directly against Satori
AffectedNext.js 16.2.0 – 16.3.5, ImageResponse on the Node.js runtime
Not AffectedEdge ImageResponse implementation; Next.js 15 (RCE does not apply)
Fixed InNext.js 16.3.6 (Active LTS); Next.js 15.5.26 (hardening only, not vulnerable to the RCE)
Root Cause LibrarySatori — 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 ImageResponse implementation, 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

  1. Upgrade immediately: npm install next@16.3.6 (or next@15.5.26 for the Maintenance LTS branch, which received hardening even though it isn't vulnerable to the RCE itself).
  2. If you use Satori directly (outside of Next.js), upgrade to v0.33.5.
  3. Audit every ImageResponse usage in your codebase for attacker-controlled input — query parameters, request body values, or externally supplied text/images — flowing into the generated SVG.
  4. Where possible, sanitize or allowlist any dynamic values before they reach ImageResponse, independent of the framework-level patch.
  5. Confirm your deployment target (Vercel, Netlify, or self-hosted) has applied the corresponding platform-level fix.

Sources

  • The Hacker News — Critical Next.js ImageResponse Flaw Can Lead to Server Code Execution via Crafted SVG Input
  • GitHub Security Advisories — Remote Code Execution in next/og ImageResponse
  • Next.js Blog — Security Update for a Critical Upstream Issue
#Next.js#Vercel#CVE-2026-94545#RCE#Vulnerability#Satori

Related Articles

Next.js Patches Two Critical RCE Flaws — AVIF and Windows Path Traversal

Vercel patched two critical Next.js RCEs: a libheif AVIF heap overflow (CVSS 9.5) and a Windows-only path traversal flaw (CVSS 9.0).

3 min read

Next.js Creator Vercel Hacked

Vercel confirmed suffering a breach after a hacker claiming to be part of ShinyHunters offered to sell stolen data for $2 million, affecting the company...

3 min read

Building a Content Platform with Next.js 16 and Contentlayer2

Create a full-featured technical blog platform using Next.js 16 App Router and Contentlayer2 for MDX content management. Covers document types, search,...

5 min read
Back to all News