Sentry JavaScript middleware bypass in Next.js tunnel routing
getsentry sentry-javascript
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| @sentry/nextjs npm |
|
|
getsentry sentry-javascript
| Product | Affected | Fixed in |
|---|---|---|
| @sentry/nextjs npm |
|
|
Sentry-Javascript is an official Sentry SDKs for JavaScript. From 9.36.0 until 9.47.2, 10.75.2, and 11.0.0-rc.1, the webpack integration for @sentry/nextjs skips application middleware for every request path under a configured tunnelRoute, while the tunnel rewrite serves only the exact tunnel path with valid o and p query parameters. When an application route directly collides with the tunnel path or a root dynamic segment resolves under it, an unauthenticated request can reach that route without middleware authorization. Exploitation requires tunnelRoute, a webpack build, a colliding route, and middleware being the only authorization control. This issue is fixed in versions 9.47.2, 10.75.2, and 11.0.0-rc.1.
From the CVE record · GitHub_M
The @sentry/nextjs webpack integration can skip application middleware for request paths under a configured tunnelRoute. An unauthenticated request can reach an application route without middleware authorization if a route collides with the tunnel path or a root dynamic segment resolves under it, and middleware is the only authorization control.
Check npm applications using @sentry/nextjs versions >=9.36.0 <9.47.2, >=10.0.0-alpha.0 <10.75.2, or >=11.0.0-alpha.0 <11.0.0-rc.1.