CVE-2025-57822 — 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.
Who exploits it and how urgent it is
A 0–100 score combining confirmed exploitation, ransomware and APT use, public exploits, EPSS and severity.
How the score was calculated
- Public exploit/PoC (nuclei)+4
- EPSS 2.6% (30-day exploitation probability)+13
- Technical severity (high)+6
The score orders the patch queue; it does not replace your asset context (internet exposure, criticality, compensating controls).
Triage
Is it exploited, how likely is exploitation, what does it touch, and how severe do the sources call it.
CISA SSVC assessment CISA
Three decision points CISA publishes for the CVEs it assesses (SSVC 2.0.3). A stakeholder decision, not a severity score.
Remediation
Fixes and mitigations documented by the sources — linked to the original advisory.
- Documented patch — github.com (NIST National Vulnerability Database)
- Documented mitigation — vercel.com (NIST National Vulnerability Database)
- Npm Next: fixed in version 15.4.7 — github.com (GitHub Security Advisories)
- Npm Next: fixed in version 14.2.32 — github.com (GitHub Security Advisories)
First 24 hours
Ordered from the record’s own fields — exposure first, because you cannot patch what you have not found. A rule-generated starting point.
- Identify exposed assets running the affected vendor/product/version combinations (Vercel Next.js, Npm Next).
- The attack is network-based and needs no privileges: restrict exposure (ACLs, VPN, WAF) until patched.
- Apply the fixed version or the patch documented under Remediation.
- Search available logs for exploit probes matching the vulnerability class (ssrf), errors and authentication anomalies.
Affected scope
Vendor, product and versions as the sources word them.
| Vendor | Product | Versions | Status | Source |
|---|---|---|---|---|
| Vercel | Next.js | < 14.2.32≥ 15.0.0 and < 15.4.7 | Vulnerable | NIST National Vulnerability Database |
| Vercel | Next.js | version < 14.2.32version < 15.4.7 | Vulnerable | CVE Program (cve.org) e CISA ADP |
| Npm | Next | ≥ 15.0.0-canary.0 and < 15.4.7≥ 0.9.9 and < 14.2.32 | Vulnerable | GitHub Security Advisories |
Attack characteristics
The CVSS vector, decoded. It describes the attack, not your exposure to it.
Every base score collected
Sources score independently and may disagree; each row says who scored it and under which version.
| Score | Version | Severity | Expl. | Impact | Scored by |
|---|---|---|---|---|---|
| 8.2 | CVSS 3.1 | High | 3.9 | 4.2 | nvd@nist.gov via NIST National Vulnerability Database |
| 6.5 | CVSS 3.1 | Medium | 2.2 | 4.2 | security-advisories@github.com via NIST National Vulnerability Database |
| 6.5 | CVSS 3.1 | Medium | — | — | GitHub, Inc. via GitHub Security Advisories |
| 6.5 | CVSS 3.1 | Medium | — | — | GitHub_M via CVE Program (cve.org) e CISA ADP |
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N (score shown at the top: nvd@nist.gov) Weakness MITRE
Weakness class according to MITRE’s CWE catalog.
Public exploits, PoCs and detection templates
Public code that demonstrates or tests the flaw raises the odds of mass exploitation — and Nuclei templates help find vulnerable assets in your environment.
Warning: public PoCs are sometimes disguised malware. Use them only for authorized testing in an isolated environment. This portal does not host exploit code — it only points to the sources.
Detection
Read off the CVSS vector and the weakness class. Starting points, not tested rules.
- Prioritize edge telemetry for the network-reachable component (proxy, WAF, IDS/IPS).
- Monitor outbound requests from the server to internal IPs and cloud metadata endpoints.
Timeline
What happened to this CVE, newest first.
- 2026
- Fix documented
- Affected products added · npm/next
- Affected products added · vercel/next.js
- SSVC assessment updated
- Record published
- Fix documented
- Affected products added · vercel/next.js
- CVSS changed · 8.2
- Source status changed · → Analyzed
- Record created in this database
- 2025
- CVE published
Source activity
Repeated readings are counted rather than listed.
- 2× References added · Oct 18, 2026 – Oct 18, 2026
- 1× Official description updated · Oct 18, 2026 – Oct 18, 2026
References
5 on the record
Elsewhere on this site
Related CVEs (same products)
- Medium CVE-2026-94544 Next.js: Pending `use cache` fill can leak Draft Mode content into regular responses and persisted pages 17d
- Medium CVE-2026-94543 Next.js: Cache poisoning of SSG and ISR pages in self-hosted Next.js applications 17d
- Medium CVE-2026-94486 Next.js: Information disclosure in the Next.js development server's Model Context Protocol endpoint 17d
- Medium CVE-2026-94484 Next.js: Cache poisoning in Next.js SSG/ISR rendering leads to cross-user content substitution and persistent denial of service 17d
- Medium CVE-2026-94485 Next.js: Information disclosure in Next.js App Router metadata image routes via dynamicParams bypass 17d
- Medium CVE-2026-94483 Next.js: Server-Side Request Forgery in Image Optimization 17d
Not in any source we poll
Listed rather than left blank: an empty field and an unmeasured one look identical on screen, and only one is a reason to look elsewhere.
- No confirmed IOCs, IP addresses, domains, file hashes, or malware artifacts supplied.
- No organization-specific asset inventory, compensating-control status, or patch deployment evidence supplied.
- No exploit packet captures, log samples, or incident case IDs supplied.
Answered from this record
Text assembled only from the fields above — no additional claims.
What should defenders know first?
CVE-2025-57822 is "Next.js Improper Middleware Redirect Handling Leads to SSRF", rated High. It affects Next.js (Vercel); versions are in the scope table. It is not in CISA KEV, which does not rule out exploitation. CVSS 8.2 describes technical severity. EPSS 2.58% estimates the probability of exploitation in 30 days; neither replaces your asset context. First verify whether exposed or business-critical assets run the affected versions, apply vendor fixes or mitigations, and preserve logs for review.
Comments
Moderated technical discussion. Read the community guidelines.
No comments yet.
Sign in or create an account to comment and suggest corrections.