Skip to main content

GHSA-vcvr-r3jv-pc5j — Next.js: Remote Code Execution in next

CRITICAL

Next.js: Remote Code Execution in next/og ImageResponse

Published September 30, 2026Updated October 1, 2026Source: OSV

Does your project use an affected next version?

Paste your package-lock.json to check it for GHSA-vcvr-r3jv-pc5j and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my package-lock.json

Summary

Impact

The Node.js ImageResponse implementation from next/og is affected by an upstream vulnerability. This can lead to remote code execution.

Affected applications pass attacker-controlled values into SVG content, attributes, or styles during image generation:

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>
  )
}

Applications using the Edge ImageResponse implementation, or applications that do not pass attacker-controlled values into SVG content, attributes, or styles, are not affected.

Workaround

If upgrading is not immediately possible, do not pass attacker-controlled values into SVG content, attributes, or styles rendered by the Node.js ImageResponse implementation from next/og.

Advisory Timeline

  • First published September 30, 2026 (57 days ago).
  • Last revised October 1, 2026 — 1 day after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

npm
Update next to 16.3.6 or later
npm install next@16.3.6

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: npm (1).

PackageFixed In
next npm · Affected: All versions16.3.6

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
—
Confidentiality
—
Integrity
—
Availability
—

CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H

Frequently Asked Questions

What is GHSA-vcvr-r3jv-pc5j?
Next.js: Remote Code Execution in next/og ImageResponse. This vulnerability has been assigned a severity rating of CRITICAL.
How do I check if my project is affected by GHSA-vcvr-r3jv-pc5j?
GHSA-vcvr-r3jv-pc5j affects next. Use GeekWala's free vulnerability scanner to check your dependencies against GHSA-vcvr-r3jv-pc5j and 200,000+ other known vulnerabilities.

Severity & Exploitability

Related CVEs

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my package-lock.json