CVE-2024-34351: Next.js Server-Side Request Forgery in Server Actions

Published May 9, 2024
·
Updated

Impact A Server-Side Request Forgery (SSRF) vulnerability was identified in Next.js Server Actions by security researchers at Assetnote. If the Host header is modified, and the below conditions are also met, an attacker may be able to make requests that appear to be originating from the Next.js application server itself.

Prerequisites Next.js (<14.1.1) is running in a self-hosted manner. The Next.js application makes use of Server Actions. The Server Action performs a redirect to a relative path which starts with a /.

\ Many hosting providers (including Vercel) route requests based on the Host header, so we do not believe that this vulnerability affects any Next.js applications where routing is done in this manner.

Patches This vulnerability was patched in #62561 and fixed in Next.js 14.1.1. Workarounds There are no official workarounds for this vulnerability. We recommend upgrading to Next.js 14.1.1.

Credit Vercel and the Next.js team thank Assetnote for responsibly disclosing this issue to us, and for working with us to verify the fix. Thanks to:

Adam Kues - Assetnote Shubham Shah - Assetnote

Other sources

Next.js is a React framework that can provide building blocks to create web applications. A Server-Side Request Forgery (SSRF) vulnerability was identified in Next.js Server Actions. If the Host header is modified, and the below conditions are also met, an attacker may be able to make requests that appear to be originating from the Next.js application server itself. The required conditions are 1) Next.js is running in a self-hosted manner; 2) the Next.js application makes use of Server Actions; and 3) the Server Action performs a redirect to a relative path which starts with a /. This vulnerability was fixed in Next.js 14.1.1.

MITRE

Affected Software

2 affected componentsFixes available
npm/next>=13.4.0<14.1.1
14.1.1
Vercel Next.js Node.js>=13.4.0<14.1.1

Event History

May 9, 2024
CVE Published
via MITRE·04:14 PM
Data Sourced
via MITRE·04:14 PM
DescriptionSeverityWeakness
Advisory Published
via GitHub·09:18 PM
May 14, 2024
Data Sourced
via NVD·03:38 PM
RemedyDescriptionSeverityWeaknessAffected Software
Apr 2, 2026
Data Sourced
via Red Hat·03:56 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2024-34351?

CVE-2024-34351 is classified as a moderate severity Server-Side Request Forgery (SSRF) vulnerability in Next.js.

2

How do I fix CVE-2024-34351?

To mitigate CVE-2024-34351, update Next.js to version 14.1.2 or later.

3

What versions of Next.js are affected by CVE-2024-34351?

CVE-2024-34351 affects Next.js versions from 13.4.0 to 14.1.1.

4

What is the nature of the attack for CVE-2024-34351?

CVE-2024-34351 allows an attacker to manipulate the 'Host' header and potentially make unauthorized requests.

5

Who discovered CVE-2024-34351?

CVE-2024-34351 was discovered by security researchers at Assetnote.

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