CVE-2026-44578 PoC and fix: the Next.js WebSocket upgrade SSRF on self-hosted servers

CVE-2026-44578 is a high-severity (CVSS 8.6) server-side request forgery in self-hosted Next.js 13.4.13 to 15.5.15 and 16.0.0 to 16.2.4. A crafted WebSocket upgrade request with no login makes the server fetch internal addresses, such as a cloud metadata service. A public proof of concept exists. Fixed in 15.5.16 and 16.2.5; in November 2026, use 16.4.5 or 15.5.29. Apps on Vercel are not affected.

The team behind Keybrum's attacksUpdated 9 min read
CVE-2026-44578high · CVSS 8.6
Component
Next.js built-in Node.js server (WebSocket upgrade handling) (next)
Affected
Next.js 13.4.13 to 15.5.15 and 16.0.0 to 16.2.4, self-hosted with the built-in Node.js server. Vercel-hosted deployments are not affected
Fixed in
15.5.16, 16.2.5. Current patches: 16.4.5 or 15.5.29
Published
May 13, 2026
Does it reach a version you install? Drop your lockfile in the dependency checker: it reads every package, this one included.

In short

  • A stranger sends one crafted WebSocket upgrade request and your self-hosted Next.js server fetches an address of their choice, inside your network included. This is server-side request forgery (SSRF), scored 8.6, high.
  • Affected: next 13.4.13 to 15.5.15 and 16.0.0 to 16.2.4, served by the built-in Node.js server (next start or the standalone server.js). The advisory says Vercel-hosted deployments are not affected.
  • Your app needs no WebSocket feature of its own to be exposed. The flaw sits in the server's own upgrade handling, which is why the advisory tells you to block upgrades you do not need.
  • Fixed in 15.5.16 and 16.2.5, published on 6 May 2026. In November 2026 the current patches are 16.4.5 and 15.5.29.
  • A public proof of concept exists and the EPSS score is high (35.5% on 15 November 2026). If you cannot upgrade today, stop WebSocket upgrades at your reverse proxy and keep the origin off the open internet.
On this page

What CVE-2026-44578 is, in plain words

Server-side request forgery (SSRF) means a stranger makes your server send a request for them. The request leaves from inside your network, so it reaches what a stranger cannot: an admin panel bound to localhost, a database's HTTP interface, the cloud metadata service that hands out credentials to the machine.

Next.js can proxy requests to another server when you configure a rewrite to an external address. For normal HTTP requests, the built-in server checks that routing really asked for such a proxy before it forwards anything. A WebSocket upgrade, the request a browser sends to switch a connection from HTTP to WebSocket, took a second path through the server, and that path lacked the check. The advisory says a crafted upgrade request can cause the server to proxy requests to arbitrary internal or external destinations.

SonicWall's analysis of 21 May 2026 places the flaw in the upgrade listener of router-server.ts and adds the detail that makes it serious: the server relays the internal response back to the sender. The attacker does not guess blindly. They read the answer.

What a stranger can do with it

Your setup, on an affected versionWhat a request with no login can do
next start or standalone server.js on a cloud virtual machine, reachable from the internetFetch the cloud metadata service through your server. On a machine that still accepts unauthenticated metadata requests, that can include temporary cloud credentials
The same server, with other services on localhost or a private networkRead HTTP pages of services that were never meant to be public: admin consoles, internal APIs, monitoring endpoints
Behind a reverse proxy that forwards WebSocket upgradesThe same: the crafted request still reaches Next.js
Behind a proxy or load balancer that does not forward WebSocket upgradesThe upgrade never reaches Next.js. Blocking upgrades is one of the advisory's workarounds
Deployed on VercelNot affected, per the advisory
The impact is reading, not writing: the advisory scores confidentiality as high, integrity and availability as none.

Severity, proof of concept and exploitation status

GitHub, the numbering authority for the Next.js maintainers, scores it 8.6, high, with the CVSS 3.1 vector AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N: reachable over the network, low complexity, no account, no click from a victim. The scope is rated changed because the damage lands on other systems than the Next.js server itself.

Vercel's May 2026 security release note adds one more reason to patch instead of filtering: it says Vercel deployed no new firewall rules for that release, because these advisories cannot be reliably blocked at the firewall layer.

Who is affected

ConditionExposedNot exposed
Next.js version13.4.13 to 15.5.15, 16.0.0 to 16.2.415.5.16, 16.2.5 and later. Versions before 13.4.13 are outside the published range
How the app is servedThe built-in Node.js server: next start, or node server.js from the standalone output, on a VPS, in Docker, on a container platformVercel-hosted deployments
What sits in frontNothing, or a proxy that forwards the Upgrade headerA proxy or load balancer that drops WebSocket upgrades
App featuresNo WebSocket code of your own is needed: the advisory's workaround is to block upgrades when the app does not use themA static export served as plain files has no Next.js server to attack

Self-hosted is wider than a server in a closet. If your app runs as a container with next start on a container platform or on a VPS, the built-in server answers your traffic. Whether the proxy in front would pass the crafted request is not something to bet on. Upgrade.

Apps built with AI tools

A generated Next.js app deployed to Vercel is outside this CVE. The exposed case is the app that was moved: exported from the builder, given a Dockerfile by a coding agent, and pushed to a VPS. That Dockerfile ends with next start or node server.js, and the lockfile still holds the version the builder picked at the time.

How to check your own app

bash
# Installed version: use the line for your package manager
npm ls next
pnpm why next
yarn why next

# How production starts: look for next start or server.js
grep -n '"start"' package.json
grep -n -i 'CMD\|ENTRYPOINT' Dockerfile

# nginx: does the config forward WebSocket upgrades to the app?
grep -rn 'http_upgrade' /etc/nginx/
Anything from 13.4.13 to 15.5.15 or 16.0.0 to 16.2.4 on the built-in server is affected. nginx forwards the Upgrade header only when the config says so, with a line such as proxy_set_header Upgrade $http_upgrade;.

Then check what production runs: open your live site, open the browser console and type next.version. On a cloud virtual machine, also check the metadata service. On AWS, an instance set to require IMDSv2 answers only requests that carry a session token obtained with a separate PUT request, and a WebSocket upgrade is a GET.

Keybrum has no attack that sends the crafted upgrade request of CVE-2026-44578, so for this CVE the version check is the test. Three of its attacks cover the ground around it, on apps whose owner proved ownership. infra.origin-exposed looks for the real address of the server behind your domain and requests your site from it directly, which tells you whether the origin can be reached around your CDN or proxy. web.ssrf gives every URL-shaped route of your app a unique callback address, then the cloud metadata address. infra.cloud-metadata-ssrf sends the metadata address to common proxy routes such as /api/proxy and /api/fetch. Those two prove SSRF in your own code, the kind no framework patch fixes.

How to fix CVE-2026-44578

Upgrade. The first fixed versions are 15.5.16 and 16.2.5, published on 6 May 2026. The advisory describes the fix in one sentence: the safety checks that already existed for normal HTTP requests now apply to WebSocket upgrades, so an upgrade is proxied only when routing has explicitly marked it as a safe external rewrite.

Do not stop at those versions. One day later, 15.5.18 and 16.2.6 fixed an incomplete patch for the middleware bypass CVE-2026-44575 from the same release, and later releases fixed more, such as the image optimizer SSRF CVE-2026-94483. The security release of 3 November 2026 ships 16.4.5 and 15.5.29. Next.js 13 and 14 get no fix for this CVE: those apps need a major upgrade.

bash
npm install [email protected]
# or, to stay on 15
npm install [email protected]
Commit the lockfile, rebuild the image and redeploy.

If you cannot upgrade today

The advisory lists three workarounds. Use them together.

  • Do not expose the origin server directly to untrusted networks. Close the app's port (3000 by default) in the firewall and let only your proxy or CDN reach it.
  • Block WebSocket upgrades at the reverse proxy or load balancer if the app does not need them. A production Next.js app uses none unless you added a WebSocket feature yourself.
  • Restrict what the server can call out to. Deny outbound traffic from the app to internal networks and to the metadata address 169.254.169.254 where your host lets you.
nginx
location / {
    proxy_pass http://127.0.0.1:3000;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;

    # No WebSocket upgrade is forwarded: these two lines stay out
    # proxy_set_header Upgrade $http_upgrade;
    # proxy_set_header Connection "upgrade";
}
nginx does not pass the hop-by-hop headers Upgrade and Connection to the app unless you add them. If your config has them and nothing in your app uses WebSockets, remove them and test the site after the change.

What to do after upgrading

  1. 1

    Confirm production runs the fixed version

    Type next.version in the browser console on the live site. On a server you manage, make sure no old container still answers behind the proxy.

  2. 2

    Close the direct road to the origin

    The next flaw in the built-in server will also need to reach it. Keep the app's port closed to the internet and serve it only through your proxy or CDN.

  3. 3

    Require a token on the metadata service

    On AWS, set the instance to require IMDSv2. Requests without a session token then get a 401 error, which takes the easiest prize away from any future SSRF. Other clouds have their own equivalent.

  4. 4

    Review the cloud role if you were exposed for long

    If an affected version faced the internet on a cloud machine with an instance role and unauthenticated metadata, treat the role's credentials as possibly read. They expire on their own, so review what the role may do, revoke its active sessions if your cloud lets you, and read the audit log for calls you do not recognise.

  5. 5

    Test the SSRF you wrote yourself

    An image proxy, a link preview, a webhook tester or an import-from-URL feature can fetch internal addresses on any Next.js version. The Next.js security guide shows how to restrict them.

CVEHow the server is made to fetchFixed in
CVE-2024-34351A Server Action that redirects, with a forged Host header14.1.1
CVE-2025-57822Middleware that copies request headers into its response, with a forged Location header14.2.32, 15.4.7
CVE-2026-44578 (this page)A crafted WebSocket upgrade request to the built-in server15.5.16, 16.2.5
CVE-2026-94483The image optimizer, through an allowed host whose DNS the attacker controls16.3.8
Four different doors, the same lesson: a self-hosted Next.js server should not be able to reach more of your network than it needs.

Timeline

DateEvent
6 May 2026Next.js 16.2.5 and 15.5.16 published on npm. Advisory GHSA-c4j6-fc7j-m34r goes public in the Next.js repository. CVE ID reserved
7 May 2026Vercel announces the May 2026 security release, 13 advisories in all. Next.js 16.2.6 and 15.5.18 follow
11 May 2026Advisory added to the GitHub Advisory Database
13 May 2026CVE record and NVD entry published. CISA's assessment: no known exploitation, automatable
21 May 2026SonicWall publishes its analysis and notes a public proof of concept
3 November 2026November 2026 security release: 16.4.5 and 15.5.29 become the current patches
13 November 2026Still absent from CISA's Known Exploited Vulnerabilities catalog

Questions

Is there a public PoC for CVE-2026-44578?

Yes. SonicWall's analysis of 21 May 2026 notes a public proof of concept that demonstrates the SSRF. The CVE is not in CISA's Known Exploited Vulnerabilities catalog, and we found no confirmed report of an attack. This page does not reproduce the exploit: the version check answers the question for your own app.

Are apps on Vercel affected by CVE-2026-44578?

No. The advisory states that Vercel-hosted deployments are not affected. The flaw is in the built-in Node.js server that self-hosted apps run with next start or the standalone server.js.

My app does not use WebSockets. Am I still affected?

Treat the app as affected if you self-host an affected version. The flaw is in how the Next.js server itself handles an upgrade request, and the advisory's workaround is to block upgrades when the app does not need them. For such an app, blocking them at the proxy breaks nothing.

Does a reverse proxy protect me?

Only if it does not forward WebSocket upgrades. nginx forwards the Upgrade header only when the config contains a line such as proxy_set_header Upgrade $http_upgrade;. Other proxies and load balancers often pass upgrades with no setting at all, so check yours instead of assuming.

Is Next.js 14 affected by CVE-2026-44578?

Yes. The affected range runs from 13.4.13 to 15.5.15, which includes every 14.x release, and no 13.x or 14.x version fixes it. Move to 15.5.29 or 16.4.5.

What can an attacker read through this SSRF?

Whatever your server can reach over HTTP and a stranger cannot: services on localhost, hosts on the private network, the cloud metadata service. According to SonicWall, the server relays the internal response back, so the attacker reads the answer.

Sources

  1. 1.GHSA-c4j6-fc7j-m34r: server-side request forgery in applications using WebSocket upgrades, Vercel (Next.js) on GitHub
  2. 2.CVE-2026-44578, NIST National Vulnerability Database
  3. 3.CVE-2026-44578, CVE Program
  4. 4.GitHub advisory database: GHSA-c4j6-fc7j-m34r, GitHub
  5. 5.Next.js May 2026 security release, Vercel
  6. 6.Next.js v16.2.5 release notes, Vercel (Next.js) on GitHub
  7. 7.Next.js WebSocket Upgrade Handler SSRF, SonicWall Capture Labs
  8. 8.November 2026 Security Release, Next.js Blog
  9. 9.Known Exploited Vulnerabilities Catalog, CISA
  10. 10.EPSS score for CVE-2026-44578, FIRST
  11. 11.WebSocket proxying, nginx
  12. 12.Use the Instance Metadata Service to access instance metadata (IMDSv2), AWS Docs

Your app is public. So are its mistakes.

Check what any attacker can already see in it, free, in ten seconds. The full attack, with proof and fixes: €49 once, or €29 a month on a plan.

or continue with Google or GitHub