Next.js: Remote Code Execution in next/og ImageResponse
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.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| npm package | next | >= 16.2.0, < 16.3.6 | 16.3.6 |
References
- https://github.com/vercel/next.js/security/advisories/GHSA-vcvr-r3jv-pc5j
- https://github.com/vercel/satori/security/advisories/GHSA-wx4j-mvgx-mqwp
- https://github.com/vercel/next.js/commit/868fad38690d72088868f299fa2bef339b26838e
- https://github.com/vercel/next.js
- https://github.com/vercel/next.js/releases/tag/v16.3.6
- CVSS vector
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- Weakness (CWE)
CWE-1395- Platform
- npm
- Package
next- Disclosed
- 30.09.2026
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-vcvr-r3jv-pc5j - CC BY 4.0
Vulnerability history: next
All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 73
- First → latest
- 12.2017 10.2026
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- Critical 5
- High 27
- Medium 32
- Low 9
Disclosures per year
- 2017: 1
- 2018: 2
- 2019: 0
- 2020: 3
- 2021: 3
- 2022: 3
- 2023: 1
- 2024: 6
- 2025: 14
- 2026: 40
-
Next.js: Remote Code Execution in next/og ImageResponse this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.