CVE-2025-57822
Description
Next.js is a React framework for building full-stack web applications. Prior to versions 14.2.32 and 15.4.7, when next() was used without explicitly passing the request object, it could lead to SSRF in self-hosted applications that incorrectly forwarded user-supplied headers. This vulnerability has been fixed in Next.js versions 14.2.32 and 15.4.7. All users implementing custom middleware logic in self-hosted environments are strongly encouraged to upgrade and verify correct usage of the next() function.
How to fix
- vercel next.js14.2.32, 15.4.7 or later
- next14.2.32, 15.4.7 or later
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| vercel next.js | v < 14.2.32, 15.0.0 ≤ v < 15.4.7 | 14.2.32, 15.4.7 |
| nextnpm | 0.9.9 ≤ v < 14.2.32, 15.0.0-canary.0 ≤ v < 15.4.7 | 14.2.32, 15.4.7 |
Check your version
Choose the product and enter the version you run to see whether it falls in the affected range.
Attack Surface Management
See the assets tied to your domains, the technologies they run and known vulnerabilities in one list.