CVE-2025-57822: medium-severity vulnerability in vercel next.js
Next.js Improper Middleware Redirect Handling Leads to SSRF
Published · Updated
E-mail alert when it lands in KEV, gets a public PoC or its score goes up.
Patch soon. It has a working public exploit.
Next.js middleware in certain versions can inadvertently allow attackers to make requests to internal servers when the next() function is used improperly, potentially exposing sensitive internal resources in self-hosted applications.
When next() is called without explicitly passing the request object in custom middleware, user-supplied headers may be forwarded unsafely in self-hosted environments, enabling Server-Side Request Forgery (SSRF) attacks against internal infrastructure. The vulnerability affects Next.js versions before 14.2.32 and 15.4.7; exploitation requires improper middleware configuration that fails to sanitize or control header propagation.
In the same product, most dangerous first.