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

- Severity: Medium 6.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 2.85%, higher than 87% of CVEs (2026-12-01)
- Published: 2025-08-29T21:33:09.000Z
- Modified: 2026-10-18T21:10:00.120Z
- Also known as: GHSA-4342-x723-ch2f
- Weaknesses: CWE-918
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

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

(As written by CVE List.)

## Affected

- vercel next.js: < 14.2.32; < 15.4.7; before 14.2.32; from 15.0.0 before 15.4.7
- next (npm): from 0.9.9 before 14.2.32; from 15.0.0-canary.0 before 15.4.7

## Every score

- GitHub_M: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N`
- GitHub: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N`
- NVD: CVSS:3.1 8.2 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N`

## References

- <https://github.com/vercel/next.js/security/advisories/GHSA-4342-x723-ch2f> (vendor-advisory, web)
- <https://github.com/vercel/next.js/commit/9c9aaed5bb9338ef31b0517ccf0ab4414f2093d8> (patch, web)
- <https://vercel.com/changelog/cve-2025-57822> (mitigation, vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-57822> (advisory)
- <https://github.com/vercel/next.js> (package)

## Sources

- CVE List: [CVE-2025-57822](https://www.cve.org/CVERecord?id=CVE-2025-57822), CVE Terms of Use, modified 2025-09-02
- GitHub Advisory Database: [GHSA-4342-x723-ch2f](https://github.com/advisories/GHSA-4342-x723-ch2f), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2025-57822](https://nvd.nist.gov/vuln/detail/CVE-2025-57822), Public domain, modified 2026-10-18

---

Page: https://cve.day/CVE-2025-57822 · Whole record: https://cve.day/CVE-2025-57822.json · Rebuilt by cve.day 2026-11-25T22:59:03.909Z
