Add maximum size limit for postponed body parsing (#88175)
Adds a configurable `experimental.maxPostponedStateSize` limit for PPR postponed state body parsing to prevent OOM/DoS attacks. The postponed state body was read entirely without size limits, creating a potential denial-of-service vector through unbounded memory allocation. Enforces a 10 MB default limit (configurable via next.config.js) with byte counting during body parsing. Returns HTTP 413 when exceeded with a helpful error message directing users to increase the limit if needed. <!-- Closes NEXT- --> <!-- Fixes # -->
Showing
Please
register
or
sign in
to comment