CVE-2026-114139: Sentry-Javascript: Middleware Bypass when using Tunnel route
The Sentry Next.js SDK (@sentry/nextjs) skipped your middleware for every request under the `tunnelRoute` path, not just the tunnel traffic. In affected webpack builds, an app route under that path can be reached with middleware auth never running. Fixed in 9.47.2, 10.75.2 and 11.0.0-rc.1.
Published Oct 22, 2026 · Analysis Oct 22, 2026
What an attacker can do
tunnelRoute sends browser events to a path on your own server, such as /monitoring, where a rewrite forwards them to Sentry. So that middleware does not reject these envelope requests, the SDK skips middleware for them. The rewrite serves only requests to the tunnel path itself with the o and p parameters set. The skip applied to anything under the path. Requests in that gap reach your application, and your middleware never runs on them.
Skipping middleware does not give the request extra privileges, and routes that check the session on the server stay protected. The danger is when middleware is the only authorization check.
All four conditions must hold: tunnelRoute is set to a string or true; the app is built with webpack (Turbopack builds are not affected); a route resolves under the tunnel path, either by direct collision like /monitoring/foo or through a dynamic segment at the root such as app/[locale]/..., which matches any first segment; and middleware alone enforces authorization on those routes.
If they hold, an unauthenticated visitor can read or change what those routes serve. The scoring reflects high confidentiality and integrity impact. Sentry's own services and the data in your Sentry organization are not affected.
Who is affected
@sentry/nextjs from 9.36.0 up to 9.47.2, from 10.0.0-alpha.0 up to 10.75.2, and from 11.0.0-alpha.0 up to 11.0.0-rc.1. Only webpack builds with tunnelRoute set are involved.
npm ls @sentry/nextjsThen check next.config.js for tunnelRoute and the build tool in use. From Next.js 16, next build uses Turbopack by default.
@sentry/nextjs
- Ecosystem
- npm
- Affected
- >= 9.36.0, < 9.47.2
- Fixed in
- 9.47.2
- Check
npm ls @sentry/nextjs
@sentry/nextjs
- Ecosystem
- npm
- Affected
- >= 10.0.0-alpha.0, < 10.75.2
- Fixed in
- 10.75.2
- Check
npm ls @sentry/nextjs
@sentry/nextjs
- Ecosystem
- npm
- Affected
- >= 11.0.0-alpha.0, < 11.0.0-rc.1
- Fixed in
- 11.0.0-rc.1
- Check
npm ls @sentry/nextjs
How to fix it
Upgrade to the patched version for your line:
- 9.x: 9.47.2
- 10.x: 10.75.2
- 11.x: 11.0.0-rc.1
npm install @sentry/[email protected]The skip now matches only the requests the tunnel rewrite actually serves. No configuration change is needed. Workarounds from the advisory: set tunnelRoute to a path no route can resolve under, or remove the option; build with Turbopack; and enforce authorization in the route, layout or data-access path as well as in middleware.
How to tell if you were hit
Check which routes of your app resolve under the tunnel path, including dynamic root segments like app/[locale]. Review access logs for requests under the tunnel path that lack the o and p query parameters, or that hit your application's pages and APIs instead of the Sentry rewrite, particularly from unauthenticated clients. Audit those routes to see whether they depend on middleware alone.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
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:
tunnelRouteis set (a string path ortrue),- your app is built with webpack (Turbopack builds are not affected),
- some route of your application resolves under the tunnel path. That could be a direct collision (
/monitoring/foowithtunnelRoute: '/monitoring') or a dynamic segment at the route root (app/[locale]/…), which matches any first path segment, and - 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
tunnelRouteto a path no route of yours can resolve under, or remove the option. - Build with Turbopack (default for
next buildfrom Next.js 16). - Enforce authorization in the route, layout or data-access path as well as in middleware.
Questions
- Am I affected if I use Turbopack?
No. The advisory says Turbopack builds are not affected. Only webpack builds with
tunnelRouteset are.- Does skipping middleware grant privileges?
No, but routes that rely only on middleware for authorization are open to requests that skip it. Routes that check the session in the route or data layer remain protected.
- Can a dynamic route segment trigger it?
Yes. A dynamic segment at the route root, such as app/[locale], matches any first path segment, including your tunnel path.
- Is Sentry's service affected?
No. The advisory says Sentry's own services and your Sentry organization's data are not affected.
References
Read for this analysis:
- https://nvd.nist.gov/vuln/detail/CVE-2026-114139
- https://github.com/getsentry/sentry-javascript/pull/24499
- https://github.com/getsentry/sentry-javascript/pull/24565
- https://github.com/getsentry/sentry-javascript/pull/24760
- https://github.com/getsentry/sentry-javascript/commit/878b685c85dc12045e47e1932c96f5381d7ac532
- https://github.com/getsentry/sentry-javascript/commit/c122aac4f29541eb6da494296822c91eab3cf5ae
- https://github.com/getsentry/sentry-javascript/commit/d525a2f6015b47384bc139c30d58e0d5435d52e5
- https://github.com/getsentry/sentry-javascript/releases/tag/10.75.2
- https://github.com/getsentry/sentry-javascript/releases/tag/11.0.0-rc.1
- https://github.com/getsentry/sentry-javascript/releases/tag/9.47.2
- https://github.com/advisories/GHSA-mchm-gjx6-7h55
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
