@sentry/nextjs
Affected
- introduced
9.36.0, fixed9.47.2(semver)
Fixed versions
9.47.2
Fix
- Fixed version
9.47.2npm install @sentry/[email protected]
Advisory
Also known as: CVE-2026-114139
Sentry-Javascript: Middleware Bypass when using Tunnel route
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:
tunnelRoute is set (a string path or true),/monitoring/foo with tunnelRoute: '/monitoring') or a dynamic segment at the route root (app/[locale]/…), which matches any first path segment, andSentry'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
tunnelRoute to a path no route of yours can resolve under, or remove the option.next build from Next.js 16).Critical Basis: The source's own band: CRITICAL
9.36.0, fixed 9.47.2 (semver)9.47.2
9.47.2npm install @sentry/[email protected]10.0.0-alpha.0, fixed 10.75.2 (semver)10.75.2
10.75.2npm install @sentry/[email protected]11.0.0-alpha.0, fixed 11.0.0-rc.1 (semver)11.0.0-rc.1
11.0.0-rc.1npm install @sentry/[email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0