GHSA-vcvr-r3jv-pc5j: Next Remote Code Execution Vulnerability
CRITICALGHSA-vcvr-r3jv-pc5j is a CRITICAL remote code execution vulnerability (CWE-1395: Dependency on Vulnerable Third-Party Component) affecting Next libraries in the npm ecosystem. The issue involves remote code execution in next/og imageresponse. Remediation is available by upgrading affected packages to version 16.3.6.
GHSA-vcvr-r3jv-pc5j at a Glance
How to Fix GHSA-vcvr-r3jv-pc5j
To remediate this vulnerability, upgrade all affected Next dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install next@16.3.6
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls next
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-vcvr-r3jv-pc5j, inspect your project dependencies using npm:
npm ls next
Analyze the terminal output to locate any version of Next in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 16.3.6), your application is affected.
Note: The npm ls next command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-1395: Dependency on Vulnerable Third-Party Component, where the product has a dependency on a third-party component that contains one or more known vulnerabilities. In Next, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-vcvr-r3jv-pc5j Affected Next Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
next
|
npm |
≥ 16.2.0
< 16.3.6
|
16.3.6
|
References
Frequently Asked Questions
What is GHSA-vcvr-r3jv-pc5j?
Which Next versions are affected?
What version fixes GHSA-vcvr-r3jv-pc5j?
Is next affected?
What CWE is associated with GHSA-vcvr-r3jv-pc5j?
How can I check npm dependencies for GHSA-vcvr-r3jv-pc5j?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-vcvr-r3jv-pc5j",
"modified" : "2026-09-30T14:48:30Z",
"published" : "2026-09-30T14:48:30Z",
"aliases" : [ ],
"summary" : "Next.js: Remote Code Execution in next/og ImageResponse",
"details" : "## Impact\n\nThe Node.js `ImageResponse` implementation from `next/og` is affected by an upstream vulnerability. This can lead to remote code execution.\n\nAffected applications pass attacker-controlled values into SVG content, attributes, or styles during image generation:\n\n```tsx\nimport { ImageResponse } from 'next/og'\n\nexport async function GET(request: Request) {\n const value = new URL(request.url).searchParams.get('value') ?? ''\n\n return new ImageResponse(\n <svg width=\"1200\" height=\"630\">\n <title>{value}</title>\n </svg>\n )\n}\n```\n\nApplications using the Edge `ImageResponse` implementation, or applications that do not pass attacker-controlled values into SVG content, attributes, or styles, are not affected.\n\n## Workaround\n\nIf 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`.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "next"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "16.2.0"
}, {
"fixed" : "16.3.6"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/vercel/next.js/security/advisories/GHSA-vcvr-r3jv-pc5j"
}, {
"type" : "WEB",
"url" : "https://github.com/vercel/satori/security/advisories/GHSA-wx4j-mvgx-mqwp"
}, {
"type" : "WEB",
"url" : "https://github.com/vercel/next.js/commit/868fad38690d72088868f299fa2bef339b26838e"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/vercel/next.js"
}, {
"type" : "WEB",
"url" : "https://github.com/vercel/next.js/releases/tag/v16.3.6"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1395" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2026-09-30T14:48:30Z",
"nvd_published_at" : null
}
}