{"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":"A vulnerability in **Next.js Middleware** has been fixed in **v14.2.32** and **v15.4.7**. The issue occurred when request headers were directly passed into `NextResponse.next()`. In self-hosted applications, this could allow Server-Side Request Forgery (SSRF) if certain sensitive headers from the incoming request were reflected back into the response.\n\nAll users implementing custom middleware logic in self-hosted environments are strongly encouraged to upgrade and verify correct usage of the `next()` function.\n\nMore details at [Vercel Changelog](https://vercel.com/changelog/cve-2025-57822)","published":"2025-08-29T21:33:15.304Z","modified":"2026-08-12T03:51:08.436282376Z","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"},{"type":"PACKAGE","url":"https://github.com/vercel/next.js"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:08.436282376Z"}}