nextjs - 💡(How to fix) Fix Clarification on reported DoS issue related to Next.js middleware and request handling [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vercel/next.js#86676Fetched 2026-04-08 02:09:49
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
closed ×1commented ×1issue_type_added ×1labeled ×1

Code Example

NA
RAW_BUFFERClick to expand / collapse

Link to the code that reproduces this issue

https://www.harmonyintelligence.com/taking-down-next-js-servers

To Reproduce

NA

Current vs. Expected behavior

NA

Provide environment information

NA

Which area(s) are affected? (Select all that apply)

Not sure

Which stage(s) are affected? (Select all that apply)

Other (Deployed)

Additional context

Hi team, I came across this blog post that describes a possible DoS issue in self-hosted Next.js when middleware processes large streaming requests: https://www.harmonyintelligence.com/taking-down-next-js-servers

The post mentions:

  • The request body is buffered without a size limit.
  • An attacker can send a long streaming request that leads to high memory usage.
  • The fix is noted as available in 15.5.5 and 16.0.0.

I want to ask for a few clarifications:

  • Is the behavior in the post accurate?
  • Will there be an official security advisory or CVE for this issue?
  • Are there plans to backport the fix to older supported versions such as 14.x, 13.x, or 12.x?

Thank you

extent analysis

TL;DR

Upgrading to Next.js version 15.5.5 or 16.0.0 may fix the potential DoS issue caused by unbounded request body buffering in middleware.

Guidance

  • Verify the issue by checking if your current Next.js version is older than 15.5.5 or 16.0.0.
  • Consider upgrading to a fixed version (15.5.5 or 16.0.0) if possible, to mitigate the potential DoS vulnerability.
  • If upgrading is not feasible, monitor memory usage and consider implementing external measures to limit request body size.
  • Wait for an official security advisory or CVE for more information on the issue and potential backports to older versions.

Notes

The provided information does not include specific code or environment details, so a precise fix or workaround cannot be guaranteed. The suggested upgrade is based on the information provided in the linked blog post.

Recommendation

Apply workaround: Upgrade to a fixed version (15.5.5 or 16.0.0) to mitigate the potential DoS issue, as it is a straightforward and effective solution to prevent high memory usage due to unbounded request body buffering.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING