CVE-2026-44578: Next.js: Server-side request forgery in applications using WebSocket upgrades
Impact
Self-hosted applications using the built-in Node.js server can be vulnerable to server-side request forgery through crafted WebSocket upgrade requests. An attacker can cause the server to proxy requests to arbitrary internal or external destinations, which may expose internal services or cloud metadata endpoints. Vercel-hosted deployments are not affected.
Fix
We now apply the same safety checks to WebSocket upgrade handling that already existed for normal HTTP requests, so upgrade requests are only proxied when routing has explicitly marked them as safe external rewrites.
Workarounds
If you cannot upgrade immediately, do not expose the origin server directly to untrusted networks. If WebSocket upgrades are not required, block them at your reverse proxy or load balancer, and restrict origin egress to internal networks and metadata services where possible.
Other sources
Next.js is a React framework for building full-stack web applications. From 13.4.13 to before 15.5.16 and 16.2.5, self-hosted applications using the built-in Node.js server can be vulnerable to server-side request forgery through crafted WebSocket upgrade requests. An attacker can cause the server to proxy requests to arbitrary internal or external destinations, which may expose internal services or cloud metadata endpoints. Vercel-hosted deployments are not affected. This vulnerability is fixed in 15.5.16 and 16.2.5.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
npm/nextto a version that resolves this vulnerability.Fixed in 16.2.5 - Upgrade
Upgrade
npm/nextto a version that resolves this vulnerability.Fixed in 15.5.16 - Upgrade
Upgrade
Next.jsto a version that resolves this vulnerability.Fixed in 15.5.16 - Upgrade
Upgrade
Next.jsto a version that resolves this vulnerability.Fixed in 16.2.5 - Compensating control
If WebSocket upgrades are not required, block WebSocket upgrade requests at your reverse proxy or load balancer, and restrict origin egress to internal networks and metadata services where possible.
- Compensating control
If you cannot upgrade immediately, do not expose the origin server directly to untrusted networks.
Event History
Frequently Asked Questions
What is the severity of CVE-2026-44578?
CVE-2026-44578 is classified as a critical vulnerability due to its potential for server-side request forgery.
How do I fix CVE-2026-44578?
To fix CVE-2026-44578, upgrade to Next.js version 16.2.5 or 15.5.16.
Which versions of Next.js are affected by CVE-2026-44578?
Versions of Next.js from 13.4.13 to 15.5.16 and 16.0.0 to 16.2.5 are affected by CVE-2026-44578.
What type of attack is CVE-2026-44578 associated with?
CVE-2026-44578 is associated with a server-side request forgery (SSRF) vulnerability.
Which platform is affected by CVE-2026-44578?
CVE-2026-44578 affects self-hosted Next.js applications using the built-in Node.js server.