{ "canonical_id": "nextjs--CVE-2025-57822", "system_id": "nextjs", "display_name": "Next.js", "category": "frameworks", "advisory_mode": "core", "title": "Next.js Improper Middleware Redirect Handling Leads to SSRF", "summary": "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_at": "2025-08-29T21:33:09Z", "updated_at": "2026-02-04T04:20:45.658010Z", "severity": "low", "cvss_score": 3.1, "exploit_status": "unknown", "source_confidence": "official", "official_source_url": "https://github.com/vercel/next.js/security/advisories/GHSA-4342-x723-ch2f", "secondary_source_urls": [ "https://nvd.nist.gov/vuln/detail/CVE-2025-57822", "https://github.com/vercel/next.js/commit/9c9aaed5bb9338ef31b0517ccf0ab4414f2093d8", "https://github.com/vercel/next.js", "https://vercel.com/changelog/cve-2025-57822" ], "aliases": [ "CVE-2025-57822", "GHSA-4342-x723-ch2f" ], "cve_ids": [ "CVE-2025-57822" ], "ghsa_ids": [ "GHSA-4342-x723-ch2f" ], "osv_ids": [ "GHSA-4342-x723-ch2f" ], "affected_versions": [ "introduced=0.9.9, fixed<14.2.32", "introduced=15.0.0-canary.0, fixed<15.4.7" ], "fixed_versions": [ "14.2.32", "15.4.7" ], "package_name": "next", "render_markdown": true, "case_path": "07-framework-security/frameworks/nextjs/cases/nextjs-cve-2025-57822.md", "secure_code_topics": [ "authz-server-side-recheck", "proxy-trust-boundary", "token-cookie-storage", "ssrf-url-validation" ], "status": "generated", "triage_reasons": [], "metadata": { "source_names": [ "OSV Next.js" ], "source_kinds": [ "osv-batch" ], "candidate_count": 1 } }