8.2
HIGH CVSS 3.1
CVE-2025-57822
Next.js Improper Middleware Redirect Handling Leads to SSRF
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.

INFO

Published Date :

Aug. 29, 2025, 10:15 p.m.

Last Modified :

Sept. 8, 2025, 4:41 p.m.

Remotely Exploit :

Yes !
Affected Products

The following products are affected by CVE-2025-57822 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Vercel next.js
CVSS Scores
The Common Vulnerability Scoring System is a standardized framework for assessing the severity of vulnerabilities in software and systems. We collect and displays CVSS scores from various sources for each CVE.
Score Version Severity Vector Exploitability Score Impact Score Source
CVSS 3.1 MEDIUM [email protected]
CVSS 3.1 MEDIUM MITRE-CVE
CVSS 3.1 HIGH [email protected]
Solution
Upgrade Next.js to patched versions and verify next() function usage.
  • Upgrade Next.js to version 14.2.32 or later.
  • Upgrade Next.js to version 15.4.7 or later.
  • Verify correct usage of the next() function.
Public PoC/Exploit Available at Github

CVE-2025-57822 has a 1 public PoC/Exploit available at Github. Go to the Public Exploits tab to see the list.

References to Advisories, Solutions, and Tools

Here, you will find a curated list of external links that provide in-depth information, practical solutions, and valuable tools related to CVE-2025-57822.

URL Resource
https://github.com/vercel/next.js/commit/9c9aaed5bb9338ef31b0517ccf0ab4414f2093d8 Patch
https://github.com/vercel/next.js/security/advisories/GHSA-4342-x723-ch2f Vendor Advisory
https://vercel.com/changelog/cve-2025-57822 Mitigation Vendor Advisory
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2025-57822 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2025-57822 weaknesses.

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

爬取secwiki和xuanwu.github.io/sec.today,分析安全信息站点、安全趋势、提取安全工作者账号(twitter,weixin,github等)

Python HTML

Updated: 6 days, 5 hours ago
1364 stars 226 fork 226 watcher
Born at : Feb. 19, 2019, 10:24 a.m. This repo has been linked 11 different CVEs too.

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2025-57822 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2025-57822 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • Initial Analysis by [email protected]

    Sep. 08, 2025

    Action Type Old Value New Value
    Added CVSS V3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N
    Added CPE Configuration OR *cpe:2.3:a:vercel:next.js:*:*:*:*:*:node.js:*:* versions up to (excluding) 14.2.32 *cpe:2.3:a:vercel:next.js:*:*:*:*:*:node.js:*:* versions from (including) 15.0.0 up to (excluding) 15.4.7
    Added Reference Type GitHub, Inc.: https://github.com/vercel/next.js/commit/9c9aaed5bb9338ef31b0517ccf0ab4414f2093d8 Types: Patch
    Added Reference Type GitHub, Inc.: https://github.com/vercel/next.js/security/advisories/GHSA-4342-x723-ch2f Types: Vendor Advisory
    Added Reference Type GitHub, Inc.: https://vercel.com/changelog/cve-2025-57822 Types: Mitigation, Vendor Advisory
  • New CVE Received by [email protected]

    Aug. 29, 2025

    Action Type Old Value New Value
    Added 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.
    Added CVSS V3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N
    Added CWE CWE-918
    Added Reference https://github.com/vercel/next.js/commit/9c9aaed5bb9338ef31b0517ccf0ab4414f2093d8
    Added Reference https://github.com/vercel/next.js/security/advisories/GHSA-4342-x723-ch2f
    Added Reference https://vercel.com/changelog/cve-2025-57822
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
Vulnerability Scoring Details
Base CVSS Score: 8.2
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality Impact
Integrity Impact
Availability Impact