SSRF Vulnerability in Next.js Framework Affects Vercel Products
CVE-2025-57822
6.5MEDIUM
What is CVE-2025-57822?
Next.js, a popular React framework, has a vulnerability that occurs when the next() function is used without explicitly passing a request object. This can lead to Server-Side Request Forgery (SSRF) in self-hosted applications, particularly if they incorrectly forward user-supplied headers. To mitigate this risk, it is essential for users employing custom middleware logic in self-hosted environments to upgrade to Next.js Middleware versions 14.2.32 and 15.4.7, and to verify the proper use of the next() function in their applications.
Affected Version(s)
next.js < 14.2.32 < 14.2.32
next.js < 15.4.7 < 15.4.7