Executive brief
Next.js is a popular React-based web framework used to build modern web applications. When Server Actions (a feature for handling form submissions and backend calls) are deployed to Vercel's Edge runtime without proper payload limits, attackers can send oversized requests that consume excessive memory and crash the application. This can disrupt service availability for legitimate users. Administrators can mitigate this by configuring their hosting provider to limit request body size to 5 MiB or less.
Technical details
This vulnerability (CWE-770) stems from a lack of request body size validation in Next.js Server Actions when running on the Edge runtime. Server Actions in the App Router did not enforce a default limit on incoming request payload size, allowing an attacker to send arbitrarily large POST requests that cause the serverless function to allocate excessive memory until it becomes resource-exhausted and unavailable. The attack requires network access and no authentication or special privileges; no user interaction is required. The fix, deployed in versions 15.5.21 and 16.2.11, introduces a configurable `serverActions.bodySizeLimit` setting that defaults to 1 MB, preventing memory exhaustion attacks. Administrators unable to upgrade should configure their hosting environment to reject requests exceeding ~5 MiB.
Affected products
- Vercel Next.js >=13.0.0 <15.5.21, >=16.0.0 <16.2.11
Timeline
- 2026-07-22: disclosed: Advisory published by Vercel
- 2026-07-21: patched: Patches committed for Next.js 15.5.21 and 16.2.11
References
- https://github.com/vercel/next.js/security/advisories/GHSA-4c39-4ccg-62r3
- https://github.com/vercel/next.js/commit/57c31f724d746e86a9e8b92aa8be538a922446a4
- https://github.com/vercel/next.js/commit/9a4651e754f70b12e397694ffc41f44c3ba8cc17
- https://github.com/vercel/next.js
- https://github.com/vercel/next.js/releases/tag/v15.5.21
- https://github.com/vercel/next.js/releases/tag/v16.2.11