Next.js Improper Middleware Redirect Handling Leads to SSRF
CVE-2025-57822Published 29 Aug 2025, 21:33 UTC
Real-world risk
3.6/ 10Low
Routine
PreliminaryFrom the CVSS vector only · confidence low
CVSS
6.5
scored by the vendor (CNA), CVSS 3.1
In plain words
No plain-language summary yet. The original description is below.
Original description (from GitHub_M)
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.
Am I affected?
| Product | Affected versions (from the sources) | Fixed in |
|---|---|---|
| Next.jsUbiquitous | < 14.2.32; < 15.4.7 | 14.2.32, 15.4.7 |
What to do
Update to a fixed version: 14.2.32, 15.4.7.
Why this score
| Factor | Value | Evidence | × |
|---|---|---|---|
| Impact | Major data exposureReads secrets, credentials, databases, arbitrary files | From the CVSS vector | 0.80 |
| Attacker position | InternetAnyone on the Internet can reach a typical deployment | From the CVSS vector | 1.00 |
| Privileges needed | NoneNo account | From the CVSS vector | 1.00 |
| Victim interaction | NoneNothing | From the CVSS vector | 1.00 |
| Configuration | DefaultOut-of-the-box installs are vulnerable | From the CVSS vector | 1.00 |
| Reliability | HardNarrow race, needs an extra info leak, needs a man-in-the-middle position, or must be chained with another bug | From the CVSS vector | 0.45 |
Threat level T4: Weaponized (× 1.00)
A Metasploit module, a Nuclei template, or a verified Exploit-DB entry
- Nuclei scanner template (link)
EPSS 2.8% chance of exploitation in 30 days (percentile 87), as of 2026-12-04.
The arithmetic
- Prerequisites multiplied together0.450
- Threat T4: Weaponized1.000
- 10 × impact 0.8 × prerequisites 0.45 × threat 13.600
- Rounded to one decimal between 0.1 and 103.6
Exploitation and evidence timeline
- 29 Aug 2025 Published
- 3 Dec 2026 Nuclei scanner template first seen
- 3 Dec 2026 Risk 3.6 (cvss fallback)
Weakness
CWE-918