Next.js
Next.js Improper Middleware Redirect Handling Leads to SSRF
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.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 14.2.32
- < 15.4.7
Fixed in 14.2.32, 15.4.7
Mitigation
Upgrade next.js to 14.2.32 or 15.4.7 or later.
References
- Vendor advisory github.com/vercel/next.js/security/advisories/…
- Patch github.com/vercel/next.js/commit/9c9aaed5bb933…
- Release notes vercel.com/changelog/cve-2025-57822
Timeline
Days relative to CVE publicationFirst public PoC 3.4 days after publication; not in CISA KEV. First PoC: nuclei template: Next.js Middleware - Server-Side Request Forgery (nuclei template, 2 Sep 2025).
PoC repositories
Found on GitHub.No PoC repositories found yet.
Other public exploits
Exploit-DB, Metasploit and nuclei count as public PoCs. Exploit-tagged references from the CVE record and NVD are links only. None of these are analysed by us.| Source | Title | Published | Found by us |
|---|---|---|---|
| nuclei template | nuclei template: Next.js Middleware - Server-Side Request Forgery | 2 Sep 2025 | 16 Nov 2026 |