Packages / next / Security

HighVulnerabilityGHSA-c4j6-fc7j-m34rCVE-2026-44578Published 11 May 2026

Next.js vulnerable to server-side request forgery in applications using WebSocket upgrades

Affected releases · next

  • 16.x16.0.0 – 16.2.4Fixed in 16.2.5
  • 15.x15.0.0 – 15.5.15Fixed in 15.5.16
  • 14.x14.0.0 – 14.2.35No fix on this line yet
  • 13.x13.4.13 – 13.5.11No fix on this line yet

On 16.x, the newest line:

npm install next@16.2.5
16.x
  1. Affected

    16.0.0 – 16.2.4

    25 releases

  2. Fixed

    16.2.5 – 16.4.2

    20 releases, latest

15.x
  1. Affected

    15.0.0 – 15.5.15

    70 releases

  2. Fixed

    15.5.16 – 15.5.28

    12 releases

14.x
  1. Affected

    14.0.0 – 14.2.35

    46 releases

13.x
  1. Not affected

    13.0.0 – 13.4.12

    38 releases

  2. Affected

    13.4.13 – 13.5.11

    18 releases

423 stable releases of next, oldest to newest, one row per major.

Is your project affected?

Paste your package.json, or type the range you declare for next. It is read in your browser and sent nowhere.

What happens

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.