Next.js vulnerable to 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.
Affected Packages
| Ecosystem | Package | Vulnerable Versions | Patched Version |
|---|---|---|---|
| npm |
next
|
>= 16.0.0, < 16.2.5>= 13.4.13, < 15.5.16 |
16.2.5
|
chore(deps): bump next from 15.1.6 to 15.5.21 in /apps/web
Closed 2 months agoBump next from 14.2.7 to 15.5.21 in /test/bundling/fixtures/next-webpack4
Closed 2 months agochore(deps-dev): bump next from 14.2.6 to 15.5.21
Closed 2 months agochore(deps): bump next from 13.2.4 to 15.5.21
Closed 2 months agobuild(deps): bump next from 14.2.5 to 15.5.21 in /apps/nextjs
Closed 2 months agoBump next from 13.4.19 to 15.5.21
Closed 2 months agoBump next from 13.1.1 to 15.5.21
Closed 2 months agochore(deps): bump next from 14.2.5 to 15.5.21 in /recipes/natural_language_processing/chatbot-nodejs/app
Closed 2 months agoBump next from 13.4.2 to 15.5.21 in /examples/with-clerk
Closed 2 months agochore(deps): bump next from 13.5.4 to 15.5.21 in /environments/next
Closed 2 months agobuild(deps): bump next from 14.2.5 to 15.5.21 in /frontend
Closed 2 months agobuild(deps): bump the npm_and_yarn group across 7 directories with 3 updates
Closed 2 months agoBump next from 13.2.3 to 15.5.21
Closed 2 months agoBump next from 12.1.5 to 15.5.21
Closed 2 months agoBump next from 13.4.2 to 15.5.21
Closed 2 months agoBump next from 12.3.1 to 15.5.21
Closed 2 months agoBump next from 15.0.4 to 15.5.21
Closed 2 months agoBump next from 14.0.4 to 15.5.21
Closed 2 months agochore(deps): bump next from 14.1.0 to 15.5.21 in /apps/web
Closed 2 months agoBump next from 14.1.1 to 15.5.21 in /app/public
Closed 2 months agochore(deps): bump next from 14.2.4 to 15.5.21
Open 2 months agoBump next from 14.0.4 to 15.5.21 in /apps/nextjs
Closed 2 months agoBump next from 14.1.1 to 15.5.21
Closed 2 months agobuild(deps): bump next from 14.1.1 to 15.5.21
Closed 2 months agoBump next from 14.1.3 to 15.5.21 in /frontend
Closed 2 months agoBump next from 14.1.3 to 15.5.21
Closed 2 months agochore(deps): bump next from 14.1.1 to 15.5.21
Closed 2 months agobuild(deps): bump next from 15.5.10 to 15.5.21
Closed 2 months agoBump next from 15.5.15 to 15.5.21 in /apps/web
Closed 2 months agochore(deps): bump next from 15.3.8 to 15.5.21
Closed 2 months agoBump next from 15.5.12 to 15.5.21
Closed 2 months agoBump next from 15.5.14 to 15.5.21 in /client
Closed 2 months agoBump next from 15.5.9 to 15.5.21 in /compiler/apps/playground
Closed 2 months agochore(deps): bump next from 14.2.35 to 15.5.21
Closed 2 months agoBump next from 15.5.4 to 15.5.21
Closed 2 months agochore(deps): bump the npm_and_yarn group across 16 directories with 12 updates
Open 2 months agoBump next from 15.5.4 to 15.5.21
Closed 2 months agoBump next from 15.5.2 to 15.5.21
Closed 2 months agoBump next from 15.5.4 to 15.5.21
Closed 2 months agobuild(deps): bump next from 15.5.3 to 15.5.21
Closed 2 months agoBump next from 14.2.3 to 15.5.21
Closed 2 months agochore(deps): bump next from 14.2.35 to 15.5.21 in /frontend
Closed 2 months agochore(deps): bump next from 14.2.21 to 15.5.21
Closed 2 months agobuild(deps): bump next from 15.5.0 to 15.5.21 in /resmatic-app
Closed 2 months agochore(deps)(deps): bump next from 15.3.3 to 15.5.21
Closed 2 months agochore(deps): bump next from 14.2.35 to 15.5.21
Closed 2 months agochore(deps): bump next from 14.2.35 to 15.5.21
Closed 2 months agobuild(deps-dev): bump next from 12.0.9 to 15.5.21 in /docs
Closed 2 months agoBump next from 15.0.3-canary.2 to 15.5.21
Closed 2 months agochore(deps): bump next from 15.4.11 to 15.5.21
Open 2 months agoActions
Advisory Details
| Published: | May 11, 2026 5 months ago |
| Updated: | September 25, 2026 9 days ago |
| CVSS Score: | 8.6 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N |
| EPSS: | 1.90% 79th percentile |
| Source: | Github |
| Classification: | GENERAL |
| UUID: | GSA_kwCzR0hTQS1jNGo2LWZjN2otbTM0cs4ABWkN |