Vulnerability
CVE-2026-64645
Next.js is a React framework for building full-stack web applications. In versions 12.0.0 through 15.5.20 and 16.0.0 through 16.2.10, a rewrites() or redirects() rule that builds its external destination hostname from request-controlled input can be pointed at an arbitrary hostname, regardless of the rule's hostname suffix. For a rewrite, Next.js proxies the request to that arbitrary host and serves the response from the application's origin, leading to Server-Side Request forgery. A redirects() rule configured this way is vulnerable to an Open Redirect. This issue has been fixed in versions 15.5.21 and 16.2.11.
29 advisories report this vulnerability, across 3 ecosystems.
Advisories
- CGA-239p-fmf3-wvp8
- CGA-2f5h-pmjc-g66p
- CGA-2mf2-2xp4-q9vm
- CGA-5gf6-7x23-9735
- CGA-5xgg-fw2w-xj6p
- CGA-6ghx-6rxg-6xhg
- CGA-6ppq-pf48-99g7
- CGA-8hp6-36jw-mrvh
- CGA-9hgv-2vg3-qcm7
- CGA-9mrv-795m-mjmf
- CGA-9ppj-5f8j-qx6h
- CGA-9vwq-x94r-3pvw
- CGA-9wgq-9qrf-7mpq
- CGA-9wqf-9996-m94j
- CGA-ccrh-r4g7-xxx3
- CGA-cxcq-6r85-9w9r
- CGA-g37m-rwpf-rw87
- CGA-hrv7-5m96-p9jh
- CGA-hw8r-h942-q7q9
- CGA-hwgp-9rg7-wf3h
- CGA-j33j-jh9j-jq6m
- CGA-mjjp-rrh9-44hx
- CGA-p4qj-9q7r-3cg4
- CGA-pghp-v78w-p6h8
- CGA-q68f-3vwg-gc9f
- CGA-q7h3-5487-gp2j
- CGA-r342-c5q6-74gh
- CGA-wgj5-jh8p-rhcc
-
GHSA-p9j2-gv94-2wf4
Next.js: Server-Side Request Forgery in rewrites via attacker-controlled destination hostname
References
- https://github.com/vercel/next.js/commit/35f501357e9b0fe7c950b0d6aa8fcf5343f707e9
- https://github.com/vercel/next.js/commit/d3033266c6dff23f7be71e19341fe3a8c6e2c599
- https://github.com/vercel/next.js/releases/tag/v15.5.21
- https://github.com/vercel/next.js/releases/tag/v16.2.11
- https://github.com/vercel/next.js/security/advisories/GHSA-p9j2-gv94-2wf4