Authorization Bypass in Next.js Middleware

by nilsbungeron 3/22/2025, 3:14 PMwith 2 comments

by cjbprimeon 3/22/2025, 4:34 PM

Looks like it was possible to include the `x-middleware-subrequest` header in your request, tricking the state machine into thinking you'd passed auth already.

(Don't use the user input itself to encode state!)