Critical Next.js Vulnerability Let Attackers Compromise Server Operations

by Esmeralda McKenzie
Critical Next.js Vulnerability Let Attackers Compromise Server Operations

Critical Next.js Vulnerability Let Attackers Compromise Server Operations

Severe Subsequent.js Vulnerability Let Attackers Compromise Server Operations

Two new vulnerabilities had been camouflage in Subsequent.js, linked to response queue poisoning and SSRF on obvious Subsequent.js variations.

These vulnerabilities had been assigned CVE-2024-34350 and CVE-2024-34351, and their severity has been given as 7.5 (Excessive).

EHA

The Response queue poisoning vulnerability exists on account of inconsistent interpretation of crafted HTTP requests, which are supposed to be handled as a single request and two separate requests.

Additionally, the SSRF vulnerability exists on account of a susceptible Subsequent.js notify that is recent and enabled by default.

On the change hand, these vulnerabilities had been patched within the most recent variations of Subsequent.js, and security advisories had been printed to tackle them. Moreover, a proof of conception for CVE-2024-34351 has also been printed.

CVE-2024-34350: Subsequent.js Inclined To HTTP Ask Smuggling

Per the studies shared with Cyber Security Info, this vulnerability, when exploited by threat actors, can doubtlessly lead to desynchronized responses from Subsequent.js, which in flip ends in response queue poisoning.

Response queue poisoning turned into first chanced on by Portswigger compare. It is miles a mighty assemble of request smuggling assault that can per chance manipulate a entrance-end server and contrivance defective back-end responses.

On the change hand, in squawk to profit from this vulnerability, the affected routes may per chance additionally peaceable be making utilize of the rewrites aim in Subsequent.js. There had been no workarounds for this vulnerability, but this vulnerability has been patched in Subsequent.js variations 13.5.1 and more moderen variations, in conjunction with 14.x.

CVE-2024-34351 : Server-Aspect Ask Forgery In Server Actions

This explicit vulnerability exists on account of a susceptible API endpoint _next/image dilapidated to in finding a image within the backend.

This image locating is accomplished using a URL cherish the one below, along side a fashioned image save. To compose an insight, Subsequent.js has an possibility to resize pictures using _next/image notify which is a built-in notify and enabled by default.

https://example.com/_next/image?url=https://cdn.example.com/i/rabbit.png&w=256&q=75

On the change hand, when visiting the image-locating URL, NextJS requests//localhost/duck.jpg to resize it using a server-aspect image manipulation library sooner than returning it to the actual person.

Moreover, this URL aim may per chance additionally additionally assist pictures from different domains using the remotePatterns performance in subsequent.config.js file.

The Subsequent.js source code unearths an moving truth: if a server motion is is named and the response is a redirect, obvious parameters are dilapidated within the redirect.

If the redirect begins with a /, the server will take the of the redirect _server_side_ and return it to the buyer. This explicit _server_side_ turned into chanced on to be taking the host header from the buyer.

Capture%20(48)
Exploited vulnerability SSRF (Offer: Assetnote)

If the host header is pointed to an interior host, NextJS will ranking the response from the applying itself which doubtlessly ends in a SSRF vulnerability. This vulnerability has been patched in NextJS variations 14.1.1.

Moreover, a complete proof of conception for this vulnerability has been printed by Assetnote which offers detailed recordsdata concerning the exploitation, source code and different recordsdata.

It is suggested that NextJS users upgrade to the most recent variations to stay these vulnerabilities from being exploited.

Source credit : cybersecuritynews.com

Related Posts