Published Date: January 5, 2025
Package | Affected Versions | Patched Versions | Severity |
---|---|---|---|
📦 next (npm) | >= 13.0.0, < 13.5.8 | 13.5.8 | Moderate |
Description
Affected Versions:
>= 13.0.0, < 13.5.8
>= 14.0.0, < 14.2.21
>= 15.0.0, < 15.1.2
Patched Versions:
13.5.8
14.2.21
15.1.2
Description
Attackers can exploit this vulnerability by sending crafted requests to Server Actions. These requests hang indefinitely until the hosting provider cancels them.
While the Next.js server doesn’t consume significant CPU or memory during this time, the connection remains open, preventing it from handling new requests.
Deployments without protections against long-running Server Action invocations are at higher risk. Hosting providers like Vercel or Netlify typically enforce time limits on function execution to avoid excessive billing.
This issue resembles attacks using invalid
Content-Length
headers or connections that never close. If the hosting environment lacks protections against such scenarios, this vulnerability becomes more significant.Key Note: Only deployments using Server Actions are affected.
Patches & Workarounds
Recommended Fix
Update Next.js to one of the patched versions:
13.5.8
14.2.21
15.1.2
Run:
Or specify the exact version:
Additionally:
- Set reasonable timeout limits on your hosting provider.
- Monitor long-running requests and enforce cancellation rules.