Featured image of post Next.js v16.2.6 — One Release That Closes 13 Security Advisories at Once

Next.js v16.2.6 — One Release That Closes 13 Security Advisories at Once

A digest of the 13 GHSA advisories closed by Next.js v16.2.6 grouped into Bypass DoS XSS SSRF and Cache poisoning categories

Overview

On 2026-05-07, vercel/next.js shipped v16.2.6, a single release that closes 13 security advisories at once — 7 High, 4 Moderate, 2 Low. The most accurate one-line read came from the chat room itself: “Looking at the patch notes, you’ll be in trouble if you don’t upgrade — extremely critical.” What stands out is not the count but the shape: three Middleware/Proxy bypasses across different surfaces, one WebSocket SSRF, and three cache-poisoning advisories — these aren’t isolated bugs, they’re a common pattern.

1. Middleware/Proxy Bypass × 3 — The Most Dangerous Cluster

Middleware/Proxy is the layer where authentication, authorization, and redirects run before a route is reached. If you can bypass that layer, your auth is meaningless. v16.2.6 closes bypasses found in three different surfaces at once.

The fact that the same class of bug appeared on three different surfaces (App Router segments, dynamic routes, Pages Router i18n) is itself the message. This is not a single bug — it’s a class of bugs where Middleware path matching and the actual router disagree on what a path means. The fact that the team also bundled the incomplete-fix follow-up (26hh-7cqf-hhc6) into the same release deserves credit — it minimizes the window in which a known-incomplete patch is exposed.

2. SSRF — WebSocket Upgrades

A WebSocket upgrade path could be coerced into making outbound requests, meaning an attacker could scan the internal network, hit cloud metadata endpoints, or call protected internal APIs through the server. Apps with realtime/streaming features are squarely in the blast radius.

3. Cache Poisoning × 3

React Server Components responses are commonly cached at the CDN/Edge layer. Once those caches are poisoned, arbitrary users get the malicious response served to them. Two of these are directly attacker-triggerable. The Moderate/Low labels can underplay the real impact depending on your edge cache topology.

4. XSS × 2

CSP nonces are the last line of defense against XSS, and the bug being inside that mechanism is what makes it nasty. beforeInteractive runs the earliest and most privileged scripts on the page — there isn’t a good way to recover from untrusted input at that stage.

5. DoS × 3

All three are remotely triggerable at low cost, which is why they earned High/Moderate. Cache Components exhausts connections; the Image API burns transform budget.

What to Do Right Now

npm install next@16.2.6
yarn add next@16.2.6
pnpm add next@16.2.6
bun add next@16.2.6

Apps using App Router + Middleware for auth should upgrade immediately. Combine the three bypass advisories and you can reach a state where authentication is effectively bypassed. While you roll out the fix, consider blocking suspicious segment-prefetch patterns and unusual query parameters at the WAF/CDN layer as a temporary buffer.

Insights

Triage priority is unambiguous — 3 bypasses + 1 SSRF + 3 cache-poisoning advisories landing in one release is itself the loudest signal in this batch. The fact that middleware bypass appeared on three different surfaces says it isn’t one bug; it’s a class of defect where the App Router’s matching logic and the router’s actual resolution disagree about what a path is. Even adjusting for Next.js 16 being a relatively new major, 13 advisories in one release is unusual. Bundling the incomplete-fix follow-up into the same release is a good example of responsible disclosure — it shrinks the window when an unfinished patch is in the wild. The chat room’s instinct — “extremely critical” — is right: this should be the highest-priority upgrade in your queue. Zooming out, the release is a hint that the App Router routing model itself deserves more fuzzing and audit. As long as middleware matching and the router are independent, the same class of bug is likely to surface again.

References

Release

High severity advisories

Moderate / Low advisories

Next.js docs

Built with Hugo
Theme Stack designed by Jimmy