Skip to content

Next.js

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?

ProductAffected versions (from the sources)Fixed in
Next.jsUbiquitous< 14.2.32; < 15.4.714.2.32, 15.4.7

What to do

Update to a fixed version: 14.2.32, 15.4.7.

Why this score

FactorValueEvidence×
ImpactMajor data exposureReads secrets, credentials, databases, arbitrary filesFrom the CVSS vector0.80
Attacker positionInternetAnyone on the Internet can reach a typical deploymentFrom the CVSS vector1.00
Privileges neededNoneNo accountFrom the CVSS vector1.00
Victim interactionNoneNothingFrom the CVSS vector1.00
ConfigurationDefaultOut-of-the-box installs are vulnerableFrom the CVSS vector1.00
ReliabilityHardNarrow race, needs an extra info leak, needs a man-in-the-middle position, or must be chained with another bugFrom the CVSS vector0.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
  1. Prerequisites multiplied together0.450
  2. Threat T4: Weaponized1.000
  3. 10 × impact 0.8 × prerequisites 0.45 × threat 13.600
  4. Rounded to one decimal between 0.1 and 103.6

How the score works

Exploitation and evidence timeline

  1. 29 Aug 2025 Published
  2. 3 Dec 2026 Nuclei scanner template first seen
  3. 3 Dec 2026 Risk 3.6 (cvss fallback)

Weakness

CWE-918

References

Get alerts for Next.js

Free email or text alerts when a vulnerability in Next.js reaches risk 8 or higher. Nothing else.