CVE-2026-44575: the Next.js middleware bypass through segment-prefetch URLs

CVE-2026-44575 is a high-severity Next.js flaw (CVSS 7.5) in App Router apps that check authorization in middleware.ts or proxy.ts. Crafted .rsc and segment-prefetch URLs reach the same page without matching the middleware rule, so protected content can load with no session. It affects 15.2.0 to 15.5.15 and 16.0.0 to 16.2.4. Upgrade to 15.5.18 or 16.2.6 or later.

The team behind Keybrum's attacksUpdated 11 min read
CVE-2026-44575high ยท CVSS 7.5
Component
Next.js middleware and proxy (App Router) (next)
Affected
Next.js 15.2.0 to 15.5.15 and 16.0.0 to 16.2.4, App Router apps that enforce authorization in middleware or proxy
Fixed in
15.5.16, 16.2.5 (with middleware.ts built by Turbopack: 15.5.18, 16.2.6, CVE-2026-45109). Current patches: 16.4.5 or 15.5.29
Published
May 13, 2026

In short

  • Affected: App Router apps on Next.js 15.2.0 to 15.5.15 or 16.0.0 to 16.2.4 whose login check for a page runs only in middleware.ts or proxy.ts. Apps that use only the Pages Router are outside this CVE.
  • Install at least 16.2.6 or 15.5.18, not 16.2.5 or 15.5.16: the first fix did not cover middleware.ts built with Turbopack (CVE-2026-45109). The current patches are 16.4.5 and 15.5.29.
  • Hosting on Vercel does not protect you. Vercel deployed no WAF rule for this release and says these advisories cannot be reliably blocked at the WAF layer.
  • It is not in CISA's Known Exploited Vulnerabilities catalog, and EPSS gave it about a 1.6% chance of exploitation in the next 30 days on November 6, 2026.
  • The fix that outlasts this CVE is a session check in every page, route handler and Server Action that touches private data. Middleware should only redirect early.
On this page

What CVE-2026-44575 is, in plain words

Next.js lets you run code before a request reaches a page. The file is middleware.ts, renamed proxy.ts in Next.js 16, where the old name still works but is deprecated. Many apps use it as their login gate: no session cookie, redirect to /login. A matcher in the same file tells Next.js which paths the gate covers, for example everything under /dashboard.

The App Router does not load pages only through their normal URL. To prefetch links and navigate without a full reload, it fetches the page's React Server Components payload (the data the page renders from) through transport-specific URL variants: .rsc URLs and segment-prefetch routes. On affected versions, those variants resolved to the same page but were not matched by the middleware rule written for the page URL. The gate never ran, and the page could render for a visitor with no session.

The fix, as the advisory describes it: Next.js now includes the App Router transport variants when it generates middleware matchers, so the same protection applies to those requests as to the page URL. GitHub files the flaw under CWE-288, authentication bypass using an alternate path or channel. The advisory does not publish the exact URLs and neither do we. You do not need them to check or fix your app.

If your app...What a stranger gets on an affected version
Redirects signed-out visitors in middleware or proxy, and the page itself never checks the sessionThe protected page's content, rendered on the server as if the gate had let them in: whatever that page loads, from user lists to invoices
Gates a static or prerendered page, such as a paywalled article, in middleware onlyThe content. A static page runs no check of its own per request, so middleware was the only lock
Checks the session again in the page or in the function that loads the dataNothing useful: the request reaches the page, and the page's own check refuses it
Protects API route handlers and Server Actions in middlewareThis advisory covers page requests. Those endpoints still need their own check: CVE-2025-29927 skipped middleware for every route
The CVSS vector rates the confidentiality impact high and the integrity and availability impact none: the flaw lets a stranger read a protected page, not change your data.

Severity and exploitation status

GitHub, the CVE numbering authority for Next.js, scores it 7.5, high, with the vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N: reachable over the network, low complexity, no account and no user interaction needed. NVD lists GitHub's 7.5 and the same score from Red Hat, and has not added a score of its own.

  • Known exploitation: CVE-2026-44575 is not in CISA's Known Exploited Vulnerabilities catalog (version 2026.11.06, checked on November 7, 2026). We found no vendor statement or credible incident report of attacks using it.
  • CISA's assessment: on May 13, 2026, CISA added an SSVC rating to the CVE record (Stakeholder-Specific Vulnerability Categorization, a triage scheme): exploitation "none", automatable "yes", technical impact "partial". Automatable means an attacker can run it at scale without manual work, which is the reason not to wait.
  • Likelihood: FIRST's EPSS model, which estimates the probability of exploitation in the next 30 days, gave it 1.6% on November 6, 2026, higher than about 76% of scored CVEs.

Who is affected

Release lineAffected by CVE-2026-44575First fixFix that also covers middleware.ts with Turbopack
16.x16.0.0 to 16.2.416.2.516.2.6
15.x15.2.0 to 15.5.1515.5.1615.5.18
15.0, 15.1, 14.x, 13.xOutside this CVE's rangeNone needed for this CVEOther advisories in the same May 2026 release still apply: Vercel lists every 13.x and 14.x version, and 15.x up to 15.5.17, as affected, with the upgrade path 15.5.18 or 16.2.6
Ranges from GitHub advisories GHSA-267c-6grr-h53f and GHSA-26hh-7cqf-hhc6, matching the CVE record and NVD. Version 15.5.17 was never published on npm.

On those versions, your app is exposed when three things are true:

  1. It uses the App Router (an app/ directory). The advisory is about App Router transport variants. A sibling flaw, CVE-2026-44573, covers the Pages Router with i18n.
  2. middleware.ts or proxy.ts makes an authorization decision: redirect signed-out visitors, block a role, gate paid content.
  3. The page behind it trusts that decision and does not check the session on its own.

Where the app runs does not change the answer. The flaw is in how Next.js builds the middleware matcher, so it ships with your build, on Vercel as on a VPS or a container. Vercel's changelog for the release says it has not deployed new WAF rules, because these advisories cannot be reliably blocked at the WAF layer, and that patching is the only complete mitigation.

How to check your Next.js version

Look at the version that is installed and locked, not the range in package.json: ^16.2.0 can resolve to 16.2.4 or to 16.4.5 depending on when the lockfile was written.

bash
# installed version
npm ls next
pnpm why next        # add -r in a monorepo
yarn why next

# what the lockfile pins (your host installs this)
grep -A1 '"node_modules/next"' package-lock.json
grep -E '^  /?next@' pnpm-lock.yaml
grep -A1 -E '^"?next@' yarn.lock
In a monorepo, run it in every app that depends on next.

Then check the two details that decide whether the first fix was enough:

bash
# which gate file do you have? middleware.* or proxy.*
ls middleware.* proxy.* src/middleware.* src/proxy.* 2>/dev/null

# does your build use Turbopack? On 16.x it does unless the script says --webpack
grep '"build"' package.json
A middleware.ts file plus a Turbopack build needs 16.2.6 or 15.5.18 at least.

How to check whether a page would leak

Your version tells you the flaw is there. Whether a page leaks depends on what that page checks for itself. From outside, the bypass shows as a protected page that redirects a signed-out visitor at its normal URL but returns its content through one of the App Router's transport URL forms. You do not need those URLs to find your exposed pages, because your code tells you: list the paths your matcher covers, then open each page under them and look for a server-side session check that runs before any private data loads.

bash
# the paths your gate covers
grep -n -A10 'matcher' middleware.* proxy.* src/middleware.* src/proxy.* 2>/dev/null

# pages under a protected folder that never mention a session check
# (change app/dashboard and the names to match your app and auth library)
find app/dashboard -name 'page.*' -exec grep -L -E 'getSession|getServerSession|auth\(|currentUser|verifySession' {} +
A file in the second list is a page to read, not proof of a leak: the check may sit in a helper it calls. A page that relies on the middleware redirect alone is the one an affected version exposes.

Keybrum's live attacks cover the neighbours of this CVE on pages behind a sign-in, on apps whose owner proved ownership. web.nextjs-middleware-bypass finds the pages that send a signed-out visitor to sign-in or answer 401 or 403, from common paths and from paths named in your JavaScript, then requests each one again with the internal header of CVE-2025-29927 and as an App Router prefetch request. Only a 200 that carries the page and is not a login form counts as proof, and the finding shows both requests side by side. web.middleware-path-bypass tries the path variants a matcher can miss, such as a double slash, an encoded letter or a case change. Both send GET requests only and keep a redacted text excerpt, never the page. Neither sends the .rsc and segment-prefetch URL forms named in this advisory, so for CVE-2026-44575 itself, rely on the version and the code check above.

How to fix CVE-2026-44575

  1. 1

    Upgrade past both advisories

    The floor is 16.2.6 or 15.5.18. Go to the current patch instead: 16.4.5 on Next.js 16 (Active LTS) or 15.5.29 on Next.js 15, published on November 3, 2026. Releases since May fixed more middleware bypasses, such as CVE-2026-64642 in 16.2.11, along with other flaws. Next.js publishes security releases for 15 until January 31, 2027.

  2. 2

    Rebuild and redeploy

    The fix changes how matchers are generated, which happens when Next.js builds your app. Commit the new lockfile, let your host build from it, and confirm that production runs the new version.

  3. 3

    On 13.x or 14.x, plan the major upgrade

    This CVE does not reach those lines, but Vercel lists every 13.x and 14.x version as affected by other advisories in the same release and points to 15.5.18 or 16.2.6. Read the Next.js upgrade guides before you jump a major version.

bash
# Next.js 16
npm install [email protected]
pnpm add [email protected]
yarn add [email protected]

# Next.js 15
npm install [email protected]
Commit the lockfile with the change. Your coding agent can run this, but check that it did not pin an older version.

If you cannot upgrade today

The advisory's workaround is to enforce authorization in the underlying route or page logic instead of relying on middleware alone. In practice, every page that renders private data reads and verifies the session on the server before it loads anything:

tsx
// app/billing/page.tsx
import { redirect } from 'next/navigation'
import { getSession } from '@/lib/session' // verifies the session cookie on the server
import { listInvoices } from '@/lib/invoices'
import { InvoiceTable } from './invoice-table'

export default async function BillingPage() {
  const session = await getSession()
  if (!session) redirect('/login')

  // fetch only the rows of the signed-in user
  const invoices = await listInvoices(session.userId)
  return <InvoiceTable invoices={invoices} />
}
This check runs whichever URL reached the page, so a request that slipped past middleware still gets redirected.

Put the check in the page, not only in layout.tsx. The Next.js authentication guide warns that a layout does not control whether the rest of the route renders: route segments are rendered by the router, so a layout that hides them does not stop them from running or from appearing in the RSC payload. Segment prefetches request parts of a route on their own, so the check belongs in the page and in the code that loads the data.

What to check after upgrading

  • Production runs 16.2.6, 15.5.18 or later, in every app of the monorepo, and the lockfile in the repository says the same.
  • Every page that shows private data checks the session itself. A check in a layout or in middleware does not count.
  • Every route handler and Server Action checks the session and that the record belongs to the caller. A missing owner check is an IDOR vulnerability, and no Next.js upgrade fixes it.
  • Static pages gated only by middleware, such as paid articles, are either rendered per request with a check or moved behind an API that checks.
  • After the deploy, the code check above lists no protected page that relies on middleware alone, and a signed-out visit to each protected page still ends at the sign-in page.

Middleware still has a job. The Next.js guide calls checks in Proxy "optimistic": read the cookie, redirect early, keep database calls out because Proxy runs on every route, prefetches included. The real decision belongs next to the data. Our Next.js security guide covers that pattern and the other settings that matter, and the vibe coding security risks guide explains why generated apps so often put the only check in middleware.

CVEWhat it doesSeverityFixed in
CVE-2026-44573Pages Router apps with i18n: a path variant bypasses middleware or proxy (from 12.2.0)High, 7.515.5.16, 16.2.5
CVE-2026-44574Injected dynamic route parameters bypass middleware or proxy (from 15.4.0)High, 8.115.5.16, 16.2.5
CVE-2026-44575This page: App Router .rsc and segment-prefetch URLs miss the middleware ruleHigh, 7.515.5.16, 16.2.5
CVE-2026-45109The 44575 fix did not apply to middleware.ts with TurbopackHigh, 7.515.5.18, 16.2.6
CVE-2026-64642App Router apps built with Turbopack and a single locale bypass middleware or proxyHigh, 8.3 (CVSS 4.0)16.2.11
CVE-2025-29927One internal header made Next.js skip middleware entirelyCritical, 9.115.2.3, 14.2.25, 13.5.9, 12.3.5
Severities and versions from the GitHub advisories. Every 2026 advisory here that lists a workaround gives the same one: authorize in the page or route, not only in middleware.

Six advisories since March 2025 point the same way: a pattern match on the URL is a weak place for the only lock. For the bigger risk on the same Next.js lines, read React2Shell, CVE-2025-55182, which let a stranger run code on App Router servers and has been in CISA's catalog of exploited vulnerabilities since December 5, 2025.

Timeline

DateEvent
February 26, 2025Next.js 15.2.0, the first affected 15.x version, is published on npm.
October 21, 2025Next.js 16.0.0 ships. Middleware is renamed Proxy and Turbopack becomes the default bundler.
May 6, 2026Next.js 16.2.5 and 15.5.16 are published. The advisory GHSA-267c-6grr-h53f goes public in the Next.js repository.
May 7, 2026Vercel announces the May 2026 security release, 13 advisories in all. Next.js 16.2.6 and 15.5.18 fix the Turbopack follow-up, GHSA-26hh-7cqf-hhc6 (CVE-2026-45109).
May 11, 2026Both advisories are added to the GitHub Advisory Database.
May 13, 2026CVE-2026-44575 is published on cve.org and NVD. CISA adds its SSVC rating: no known exploitation.
July 22, 2026Advisory for CVE-2026-64642, a related bypass with Turbopack and a single locale, fixed in 16.2.11.
November 3, 2026Next.js 16.4.5 and 15.5.29, the current patches on both supported lines.
November 6, 2026Still absent from CISA's KEV catalog. EPSS: 1.6%.

Questions

What is CVE-2026-44575?

A Next.js vulnerability, scored 7.5 by GitHub, in App Router apps that enforce authorization in middleware.ts or proxy.ts. Crafted .rsc and segment-prefetch URLs reach the same page without matching the middleware rule, so protected content can load without the login check. It affects 15.2.0 to 15.5.15 and 16.0.0 to 16.2.4.

How does the Next.js middleware bypass through prefetch work?

The App Router fetches pages through extra URL variants when it prefetches links. Before the fix, the middleware matcher was generated for the page URL only, so those variants slipped past it while still rendering the page. Next.js now adds the variants to the matcher when it builds your app.

Is upgrading to Next.js 16.2.5 enough?

Not if you build with Turbopack and still use middleware.ts: the first fix missed that setup, tracked as CVE-2026-45109 and fixed in 16.2.6 and 15.5.18. Turbopack is the default for builds on Next.js 16. Go to the current patch, 16.4.5 or 15.5.29.

Is my app on Vercel affected by CVE-2026-44575?

Yes, if the version and setup match. The flaw is in the matcher Next.js generates at build time, and Vercel says it did not deploy WAF rules for this release because these advisories cannot be reliably blocked at the WAF layer. Upgrading is the only complete fix.

Does CVE-2026-44575 affect the Pages Router?

No. It concerns App Router transport variants. Pages Router apps that use i18n had their own middleware bypass in the same release, CVE-2026-44573, fixed in 15.5.16 and 16.2.5, with affected versions going back to 12.2.0.

Is CVE-2026-44575 being exploited?

No exploitation has been reported that we could find. It is not in CISA's Known Exploited Vulnerabilities catalog as of November 2026, and CISA's SSVC rating says no known exploitation but automatable. EPSS put the 30-day probability at about 1.6%.

Sources

  1. 1.Middleware / Proxy bypass in App Router applications via segment-prefetch routes (GHSA-267c-6grr-h53f), Next.js (GitHub security advisory)
  2. 2.CVE-2026-44575 Detail, NIST National Vulnerability Database
  3. 3.CVE-2026-44575 record, CVE Program
  4. 4.GHSA-267c-6grr-h53f, GitHub Advisory Database
  5. 5.Segment-prefetch bypass, incomplete fix follow-up (GHSA-26hh-7cqf-hhc6, CVE-2026-45109), GitHub Advisory Database
  6. 6.Next.js May 2026 security release, Vercel
  7. 7.Known Exploited Vulnerabilities Catalog, CISA
  8. 8.EPSS score for CVE-2026-44575, FIRST
  9. 9.How to implement authentication in Next.js, Next.js Docs
  10. 10.proxy.js file convention, Next.js Docs
  11. 11.Next.js 16, Next.js Blog
  12. 12.November 2026 Security Release, Next.js Blog
  13. 13.Support policy, Next.js
  14. 14.Middleware / Proxy bypass in Pages Router applications using i18n (GHSA-36qx-fr4f-26g5), GitHub Advisory Database
  15. 15.Middleware / Proxy bypass through dynamic route parameter injection (GHSA-492v-c6pp-mqqv), GitHub Advisory Database
  16. 16.Middleware / Proxy bypass with Turbopack and single locale (GHSA-6gpp-xcg3-4w24), GitHub Advisory Database
  17. 17.next: versions, npm

Your app is public. So are its mistakes.

Check what any attacker can already see in it, free, in ten seconds. The full attack, with proof and fixes: โ‚ฌ49 once, or โ‚ฌ29 a month on a plan.

or continue with Google or GitHub