Vulnerability · Published Aug 29, 2025 · Assigned by GitHub_M

CVE-2025-57822Next.js Improper Middleware Redirect Handling Leads to SSRF

Medium 6.5

In plain English

A medium-severity server-side request forgery in next.js from vercel. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 2.6% (higher than 85% of all known vulnerabilities). Ready-made attack tooling exists: Nuclei. Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)6.5Medium
Exploit odds (30 days)2.6%top 14.7% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack tooling1Nuclei

Official 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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
npmnext14.2.32GHSA-4342-x723-ch2f
npmnext15.4.7GHSA-4342-x723-ch2f

Affected products (as reported)

VendorProductVersions
vercel next.js < 14.2.32< 15.4.7

Weakness: CWE-918 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N

References