Critical

Sentry-Javascript: Middleware Bypass when using Tunnel route

  • Disclosed: 22.10.2026
  • Updated: 23.10.2026 00:02

Impact

The tunnelRoute option makes the SDK send browser events to a path on your own Next.js server (for example /monitoring), where a rewrite forwards them to Sentry to prevent ad blockers from blocking them. To keep those envelope requests from being rejected by your middleware, the SDK skips middleware for them.

The middleware skip was wider than the rewrite. The rewrite only serves requests to the tunnel path itself with the o and p parameters set. The skip applied to anything under the tunnel path. Requests in that gap go to your application instead of Sentry, and your middleware never runs on them.

Skipping middleware does not grant the request any privileges. Routes that check the session server-side are still protected.

You are affected only if all of the following are true:

  1. tunnelRoute is set (a string path or true),
  2. your app is built with webpack (Turbopack builds are not affected),
  3. some route of your application resolves under the tunnel path. That could be a direct collision (/monitoring/foo with tunnelRoute: '/monitoring') or a dynamic segment at the route root (app/[locale]/…), which matches any first path segment, and
  4. your middleware is the only place that enforces authorization for those routes.

Sentry's own services, and the data in your Sentry organization, are not affected.

Patches

Fixed in 9.47.2, 10.75.2 and 11.0.0-rc.1. The skip now matches only the requests the tunnel rewrite actually serves. No configuration change is needed.

Workarounds

  • Set tunnelRoute to a path no route of yours can resolve under, or remove the option.
  • Build with Turbopack (default for next build from Next.js 16).
  • Enforce authorization in the route, layout or data-access path as well as in middleware.

What to do

Upgrade to fixed versions 9.47.2, 10.75.2, or 11.0.0-rc.1. If unable to update immediately, configure tunnelRoute to a non-colliding path, build with Turbopack, or enforce authorization within route handlers and layouts.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
npm package @sentry/nextjs >= 9.36.0, < 9.47.2, >= 10.0.0-alpha.0, < 10.75.2, >= 11.0.0-alpha.0, < 11.0.0-rc.1 9.47.2, 10.75.2, 11.0.0-rc.1

References

CVSS score -
CVSS vector
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
Weakness (CWE)
CWE-693
Platform
npm
Package
@sentry/nextjs
Disclosed
22.10.2026
Updated
23.10.2026 00:02

Sources and licenses · Edited or translated by DockRay; source rights and applicable licenses are retained.

OSV / GitHub Advisory Database - GHSA-mchm-gjx6-7h55 - CC BY 4.0

Vulnerability history: @sentry/nextjs

All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.

Total entries
4
First → latest
11.2023 10.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • Critical 1
  • Medium 2
  • Low 1

Disclosures per year

  1. 2023: 1
  2. 2024: 0
  3. 2025: 2
  4. 2026: 1
  1. Sentry-Javascript: Middleware Bypass when using Tunnel route this entry
    Critical CVE-2026-114139 >= 9.36.0, < 9.47.2, >= 10.0.0-alpha.0, < 10.75.2, >= 11.0.0-alpha.0, < 11.0.0-rc.1 9.47.2, 10.75.2, 11.0.0-rc.1
  2. Medium CVE-2025-65944 >= 10.11.0, < 10.27.0 10.27.0
  3. Low · 3.7 ghsa-r5w7-f542-q2j4 >= 8.10.0, < 8.49.0 8.49.0
  4. Medium · 6.1 CVE-2023-46729 >= 7.26.0, < 7.77.0 7.77.0

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.