CVE-2026-64649: Next.js: Server-Side Request Forgery in Server Actions on Custom Servers

Published Jul 22, 2026
·
Updated

Impact

When a Server Action forwards or redirects a request, an attacker can cause the server to send that outbound request to a malicious host (Server-Side Request Forgery). This requires the attacker's request to control Host-associated headers. In some configurations, it's also possible to obtain internal values that weaken middleware/proxy authorization.

Applications that use Server Actions are affected when the incoming host header is not fixed to a trusted value. This typically occurs on custom servers, or on deployments not behind a proxy that pins the host. Managed hosting pins the host upstream and is not affected; next start and standalone output do the same from version 14.2 onward.

Workarounds

If you cannot upgrade, ensure clients do not control the host header your application receives. Pin or validate Host and X-Forwarded-Host at your edge or proxy. On version 14.2.0 and later, you can additionally set the NEXTPRIVATEORIGIN environment variable to your deployment's real origin:

bash NEXTPRIVATEORIGIN=https://www.example.com node server.js

Other sources

Next.js is a React framework for building full-stack web applications. In versions 14.1.1 through 15.5.20 and 16.0.0 through 16.2.10, when a Server Action forwards or redirects a request, an attacker can cause the server to send that outbound request to a malicious host (Server-Side Request Forgery). This requires the attacker's request to control Host-associated headers. In some configurations, it's also possible to obtain internal values that weaken middleware/proxy authorization. Applications that use Server Actions are affected when the incoming host header is not fixed to a trusted value. This typically occurs on custom servers, or on deployments not behind a proxy that pins the host. Managed hosting pins the host upstream and is not affected; next start and standalone output do the same from version 14.2 onward. This issue has been fixed in versions 15.5.21 and 16.2.11.

MITRE

Affected Software

4 affected componentsFixes available
npm/next>=16.0.0<16.2.11
16.2.11
npm/next>=14.1.1<15.5.21
15.5.21
Vercel Next.js Node.js>=14.1.1<15.5.21
Vercel Next.js Node.js>=16.0.0<16.2.11

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/next to a version that resolves this vulnerability.

    Fixed in 16.2.11
  2. Upgrade

    Upgrade npm/next to a version that resolves this vulnerability.

    Fixed in 15.5.21
  3. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 15.5.21
  4. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 16.2.11
  5. Configuration

    Pin or validate the incoming Host header and X-Forwarded-Host header at your edge or proxy so clients cannot control the host-associated headers your application receives.

    Next.js (custom server) Host and X-Forwarded-Host = Pinned/validated to a trusted value at edge or proxy
  6. Configuration

    On Next.js version 14.2.0 and later, set the __NEXT_PRIVATE_ORIGIN environment variable to your deployment's real origin to help prevent SSRF in Server Actions on custom servers.

    Next.js __NEXT_PRIVATE_ORIGIN = Set to your deployment's real origin (example: https://www.example.com)
  7. Compensating control

    If you cannot upgrade, ensure clients do not control the Host header your application receives (especially for custom servers or deployments not behind a proxy that pins the host).

Event History

Jul 22, 2026
Advisory Published
via GitHub·11:09 PM
Data Sourced
via GitHub·11:09 PM
DescriptionWeaknessAffected Software
Jul 27, 2026
CVE Published
via MITRE·07:27 PM
Data Sourced
via MITRE·07:27 PM
DescriptionWeakness
Data Sourced
via NVD·08:16 PM
RemedyDescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-64649?

CVE-2026-64649 has a risk score of 47.

2

What impact does CVE-2026-64649 have on server security?

CVE-2026-64649 can lead to Server-Side Request Forgery, allowing attackers to send outbound requests to a malicious host.

3

How can I fix CVE-2026-64649 in npm/next applications?

To mitigate CVE-2026-64649, ensure that Host-associated headers are properly validated and sanitized.

4

What type of vulnerability is CVE-2026-64649 classified as?

CVE-2026-64649 is classified as a Server-Side Request Forgery (SSRF) vulnerability.

5

When was CVE-2026-64649 published?

CVE-2026-64649 was published on July 22, 2026.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203