Description
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.
Published: 2026-07-27
Score: 8.3 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Next.js allows users to define rewrite and redirect rules that build the external destination hostname from request‑controlled input. When a rewrite rule points to an arbitrary hostname, Next.js proxies the request to that host and streams the response back to the application’s origin, creating a Server‑Side Request Forgery (SSRF) condition. A redirect rule configured in the same way becomes an Open Redirect. This flaw is governed by CWE‑601 and CWE‑918 and, if exploited, can enable external actors to probe internal network services or exfiltrate data through the application’s server.

Affected Systems

The affected product is Vercel’s Next.js framework. Versions from 12.0.0 to 15.5.20 inclusive and from 16.0.0 to 16.2.10 inclusive are vulnerable. The security fixes are included in releases 15.5.21 and 16.2.11.

Risk and Exploitability

The CVSS score of 8.3 indicates high severity with full exploitation potential. EPSS score is < 1%, and the vulnerability is not listed in CISA’s KEV catalog, suggesting limited, but possible, attack prevalence. The likely attack vector involves an unauthenticated remote attacker crafting a request that triggers a rewrite or redirect rule with a malicious destination hostname, thereby executing the SSRF or being redirected to an external site.

Generated by OpenCVE AI on August 3, 2026 at 17:06 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Next.js to version 15.5.21 or newer (or 16.2.11 or newer if using v16).
  • Review all rewrite() and redirects() configurations to ensure that destination hostnames are not constructed from user‑controlled input or from untrusted sources.
  • Disable or restrict any dynamic rewrite or redirect functionality until a vendor patch has been applied.

Generated by OpenCVE AI on August 3, 2026 at 17:06 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-p9j2-gv94-2wf4 Next.js: Server-Side Request Forgery in rewrites via attacker-controlled destination hostname
History

Wed, 29 Jul 2026 00:15:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

{'score': 8.2, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N'}

threat_severity

Important


Tue, 28 Jul 2026 16:15:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Tue, 28 Jul 2026 03:00:00 +0000

Type Values Removed Values Added
First Time appeared Vercel
Vercel next.js
Vendors & Products Vercel
Vercel next.js

Mon, 27 Jul 2026 20:30:00 +0000

Type Values Removed Values Added
Description 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.
Title Next.js: Server-Side Request Forgery in rewrites via attacker-controlled destination hostname
Weaknesses CWE-601
CWE-918
References
Metrics cvssV4_0

{'score': 8.3, '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'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-28T14:02:21.877Z

Reserved: 2026-07-20T17:11:30.895Z

Link: CVE-2026-64645

cve-icon Vulnrichment

Updated: 2026-07-28T14:02:05.303Z

cve-icon NVD

Status : Analyzed

Published: 2026-07-27T18:16:59.453

Modified: 2026-07-29T14:39:12.173

Link: CVE-2026-64645

cve-icon Redhat

Severity : Important

Publid Date: 2026-07-27T17:37:07Z

Links: CVE-2026-64645 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-03T17:15:12Z

Weaknesses
  • CWE-601

    URL Redirection to Untrusted Site ('Open Redirect')

  • CWE-918

    Server-Side Request Forgery (SSRF)