Wednesday, October 21, 2026

Next.js ImageResponse Vulnerability Lets Remote Attackers Execute Code Through SVG Content

A critical vulnerability in Next.js could let unauthenticated remote attackers execute code on affected servers by supplying crafted input that gets rendered into SVG content during dynamic image generation.

This issue, tracked as GHSA-vcvr-r3jv-pc5j, affects the Node.js implementation of ImageResponse in the next/og package.

The flaw impacts Next.js versions 16.2.0 to 16.3.5. Vercel has released Next.js version 16.3.6 to address this issue. In contrast, the 15.x release line has received version 15.5.26 as a related security-hardening update.

Next.js ImageResponse Vulnerability

ImageResponse is commonly used to generate Open Graph images, social media preview cards, and other server-generated graphics from JSX and CSS. The vulnerable Node.js path processes output through Satori, a library that converts JSX-like layout data into SVG before an image is produced.

The underlying problem stems from improper escaping of values placed into generated SVG output. An application becomes exposed when it accepts attacker-controlled data, such as a query parameter, API value, form field, or URL-derived string, and embeds it in SVG content, an attribute, or a style processed by Node.js ImageResponse.

Crafted content could then be interpreted as SVG markup rather than inert text, creating conditions that can lead to remote code execution.

A vulnerable implementation might resemble the following pattern:

import { ImageResponse } from 'next/og'
export async function GET(request: Request) {
  const value = new URL(request.url).searchParams.get('value') ?? ''
  return new ImageResponse(
    <svg width="1200" height="630">
      <title>{value}</title>
    </svg>
  )
}

In this scenario, an attacker may send a specifically crafted value parameter to an internet-facing image endpoint. If the application runs the affected Node.js implementation and passes that input into SVG generation, the request could reach the vulnerable rendering chain.

Not every Next.js application using ImageResponse is vulnerable. The advisory states that the flaw applies only under specific conditions:

  • The application uses Next.js versions 16.2.0 through 16.3.5.
  • The `next/og` image generation runs through the Node.js implementation of ImageResponse.
  • Untrusted input reaches SVG content, attributes, or CSS-style values.
  • The image-generation route is accessible to an attacker over the network.

Applications using the Edge ImageResponse implementation are not affected. Deployments that never insert attacker-controlled data into SVG output are also outside the identified vulnerable scope.

Organizations should immediately upgrade affected Next.js deployments to version 16.3.6 and redeploy applications. Teams should prioritize reviewing Open Graph image endpoints, route handlers, and dynamic preview-image generators that read request-controlled values.

Where patching cannot occur immediately, developers should ensure that untrusted input is not supplied to SVG content, attributes, or styles rendered by Node.js ImageResponse.

Satori itself was patched in version 0.33.5, and its advisory warns that no complete workaround exists for direct Satori usage beyond upgrading and avoiding attacker-controlled rendered content.

Given the potential for server-side code execution without authentication or user interaction, exposed `next/og` image-generation endpoints should be treated as a high-priority patching target.

Cut every SOC alert investigation by 21 min. Power your SOC with instant IOC context for immediate response: Integrate TI Lookup in your SOC

Divya
Divya
Divya is a Senior Journalist at GBhackers covering Cyber Attacks, Threats, Breaches, Vulnerabilities and other happenings in the cyber world.

Hot this week

How To Access Dark Web Anonymously and know its Secretive and Mysterious Activities

What is Deep Web The deep web, invisible web, or...

How to Build and Run a Security Operations Center (SOC Guide) – 2023

Today’s Cyber security operations center (CSOC) should have everything...

Russian Hackers Bypass EDR to Deliver a Weaponized TeamViewer Component

TeamViewer's popularity and remote access capabilities make it an...

Web Server Penetration Testing Checklist – 2026

Web server pentesting is performed under three significant categories: identity,...

ATM Penetration Testing – Advanced Testing Methods to Find The Vulnerabilities

ATM Penetration testing, Hackers have found different approaches to...

Gemini-Compatible AI Browsers Could Help Scammers Run Thousands of Fake Accounts, Researchers Warn

Antidetect browsers tools that create separate browser profiles with...

Industrial Defender Unifies Endpoint Intelligence and Network Monitoring for CIP-015, Adds Risk Signal

Orlando, Florida, United States, October 20th, 2026, CyberNewswire Industrial Defender...

Gentlemen Ransomware Hackers Hijack Legitimate Lenovo Drivers to Disable Security Software

The Gentlemen ransomware operation is abusing legitimate Lenovo and...

Cloudflare Warns of Active Exploitation Attempts Against Two Leaked PHP Flaws

Cloudflare has issued a warning about emerging attacks targeting...

BRONZE SANDCASTLE Hackers Steal Active Directory Database Using Hidden Windows Backdoors

BRONZE SANDCASTLE intrusions involving hidden Windows backdoors and the...

Google Chrome 156 Fixes 353 Security Vulnerabilities, Including 6 Critical Flaws

Google released Chrome version 156 to the stable channel...

Related Articles

Recent News