{"id":"CVE-2025-57822","aliases":["GHSA-4342-x723-ch2f"],"url":"https://o3.security/vulnerability/CVE-2025-57822","summary":"Next.js Improper Middleware Redirect Handling Leads to SSRF","details":"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.","published":"2025-08-29T21:33:15.304Z","modified":"2026-07-15T01:49:09.526881537Z","cvss":{"score":6.5,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N"},"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"npm","name":"next","fixedVersion":"14.2.32"},{"ecosystem":"npm","name":"next","fixedVersion":"15.4.7"}],"fix":{"url":"https://github.com/vercel/next.js/commit/9c9aaed5bb9338ef31b0517ccf0ab4414f2093d8","label":"vercel/next.js@9c9aaed"},"references":[{"type":"WEB","url":"https://vercel.com/changelog/cve-2025-57822"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/57xxx/CVE-2025-57822.json"},{"type":"ADVISORY","url":"https://github.com/vercel/next.js/security/advisories/GHSA-4342-x723-ch2f"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-57822"},{"type":"FIX","url":"https://github.com/vercel/next.js/commit/9c9aaed5bb9338ef31b0517ccf0ab4414f2093d8"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-07-15T01:49:09.526881537Z"}}