Summary
CVE-2026-64645 is a Server-Side Request Forgery (SSRF) and Open Redirect vulnerability in Next.js, the widely deployed React full-stack web framework maintained by Vercel. It affects versions 12.0.0 through 15.5.20 and 16.0.0 through 16.2.10, and carries a CVSS 4.0 score of 8.3 (High). When a rewrites() or redirects() configuration rule dynamically constructs an external destination hostname from attacker-controlled request input, the intended hostname suffix can be bypassed — enabling the Next.js server to be forced to proxy requests to any arbitrary host.
Technical details
- Root cause: Next.js interpolates user-controlled dynamic path segments (e.g., regex capture groups) directly into the destination URL of
rewrites()andredirects()rules without validating the resulting hostname. This allows attacker-supplied values containing dots to escape the intended hostname suffix. - Exploit mechanism: The attack leverages DNS treatment of a trailing dot as a fully-qualified domain name (FQDN). For example, a rule such as
destination: 'https://:tenant.api.example.com'can be exploited by supplying the tenant valueattacker.com.— DNS resolvesattacker.com.(the FQDN root) rather than the intendedattacker.com..api.example.com, causing the Next.js server to contact the attacker-controlled host instead. - Attack vector: Network-accessible, no authentication required, no user interaction needed.
- Prerequisites: The application must use
rewrites()orredirects()rules that build destination hostnames from request-controlled input (e.g., URL path parameters or query parameters); this is not a default Next.js configuration. - Impact (rewrites): Next.js proxies the request to the arbitrary host and serves the response from the application’s origin — enabling full Server-Side Request Forgery. Attackers can probe internal network services, reach cloud metadata endpoints (e.g., AWS Instance Metadata Service at
169.254.169.254), and exfiltrate sensitive data. - Impact (redirects): The user’s browser is redirected to an attacker-controlled domain — enabling Open Redirect attacks.
Affected software
- Next.js 12.0.0 through 15.5.20 (inclusive)
- Next.js 16.0.0 through 16.2.10 (inclusive)
Severity
CVSS 4.0 Base Score: 8.3 (High)
Vector: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:L/VA:N/SC:L/SI:L/SA:N
Mitigation and recommended actions
- Immediate — apply vendor patches:
- Upgrade to Next.js 15.5.21 (Maintenance LTS):
npm install [email protected] - Upgrade to Next.js 16.2.11 (Active LTS):
npm install [email protected] - Fixes are also included in Next.js 16.3 canary (
v16.3.0-canary.92) and preview (v16.3.0-preview.7) releases.
- Upgrade to Next.js 15.5.21 (Maintenance LTS):
- If immediate patching is not feasible — harden rewrite/redirect configurations:
- Restrict dynamic destination segments to hostname-safe characters only (alphanumeric and hyphens) using strict regex constraints, e.g.:
value: '(?<tenant>[a-z0-9-]+)'. This prevents dot characters from being injected into the destination hostname. - Audit all
rewrites()andredirects()rules innext.config.jsfor dynamic segments sourced from request input.
- Restrict dynamic destination segments to hostname-safe characters only (alphanumeric and hyphens) using strict regex constraints, e.g.:
IONIX Status
The IONIX research team is tracking ongoing exploitation attempts and recommends immediate patching. Potentially affected assets are outlined in this post.

