Align tunnel request matching in middleware with tunnel rewrite
fix(nextjs): Align tunnel request matching in middleware with tunnel rewrite (#24499)
Align tunnel request matching in middleware with tunnel rewrite878b68-fix-align-tunnel-request-matching-in-middleware-cve-2026-114139fixalign tunnel request matching middleware rewrite
Committed by chargome
commit message
fix(nextjs): Align tunnel request matching in middleware with tunnel rewrite (#24499)
The middleware wrapper treated every path under the tunnel route as a
tunnel request, while the tunnel rewrite only serves the exact route
with the org and project query params. Match tunnel requests the same
way the rewrite does so the two stay consistent.
Fixes JS-3719
Co-authored-by: Claude Fable 5.1 <[email protected]>Editor assessment
This commit patches CVE-2026-114139. Clear and focused: the body explains that the middleware treated every path under the tunnel route as a tunnel request while the rewrite only serves the exact route with org and project query params, and that both now match. The subject, type and nextjs scope are accurate. A sentence on the user-visible consequence - what broke when the two disagreed - is the only missing piece; without it the message explains the mechanism but not why it mattered. The middleware-versus-rewrite mismatch is well explained; a note on which deployments were affected would add practical context.