Skip to content
SSRF Write-up Intermediate

CVE-2026-44578 Next.js SSRF Vulnerability

A WebSocket upgrade handler in self-hosted Next.js skipped safety checks that the normal HTTP path performed, so a crafted upgrade request could be proxied to an arbitrary host. An unauthenticated attacker could make the server issue an internal GET to any host reachable on port 80, including cloud metadata services, and read the response.

medium.com

Published on medium.com

A high severity Server Side Request Forgery (SSRF) vulnerability has been disclosed in Next.js one of the most widely used React frameworks on the web. If you’re self hosting a Next.js application this demands your immediate attention.

Nisal Renuja Palliyaguru, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The WebSocket upgrade handler checked only the parsed URL protocol before proxying, ignoring the finished and statusCode flags that the equivalent HTTP request handler already checked.

Impact

An unauthenticated attacker could reach internal services or cloud metadata endpoints and read responses, potentially obtaining temporary IAM credentials; Vercel-hosted and other managed deployments are not affected.

What the attacker needed

Self-hosted Next.js on built-in Node.js server; no authentication needed; no user interaction needed

The fix

It was fixed in Next.js 15.5.16 and 16.2.5 by only proxying upgrade requests when routing has explicitly marked them as safe external rewrites.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Server-side request forgery (SSRF) is when an attacker tricks a server into making a request on their behalf, often to places the attacker cannot reach directly. Here, a special kind of request used to start a WebSocket (a two-way connection) was handled by Next.js without the checks the normal request path used. That let an outsider ask the server to fetch internal addresses, such as cloud metadata services that hand out temporary credentials.

What is SSRF?

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.

Similar reports

View all

Same bug class and techniques, clearest first.

Server-side request forgery (SSRF)

The lesson behind this report.

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.