I found a different article that goes into more detail: https://zeropath.com/blog/nextjs-middleware-cve-2025-29927-a... This looks trivially easy to bypass. More generally, the entire concept of using middleware which communicates using the same mechanism that is also used for untrusted user input seems pretty wild to me. It divorces the place you need to write code for user request validation (as soon as the user re…
> More generally, the entire concept of using middleware which communicates using the same mechanism that is also used for untrusted user input seems pretty wild to me. That's basically the same way phone phreaking worked back in the day. Time is a flat circle.
Next.js version 15.2.3 has been released to address a security vulnerability
61–70 of 220 posts
Re: Next.js version 15.2.3 has been released to address a security vulnerability
#62Earlier quoted context omitted.
expect you know, when you can bypass auth by adding an http header :)
Not that this isn't a serious attack vector (a possible one), but most implementations are not simply using middleware as a standalone check for authorization then blindly serving paths/content up. That'd be pretty bad architecture in any stack.
Re: Next.js version 15.2.3 has been released to address a security vulnerability
#63Earlier quoted context omitted.
Not that this isn't a serious attack vector (a possible one), but most implementations are not simply using middleware as a standalone check for authorization then blindly serving paths/content up. That'd be pretty bad architecture in any stack.
so having "some protections" like db foreign key scoping that mitigates "well anyone can now bypass auth middleware for any route" makes this… "not that bad on nextjs part" no no, this is absolutely nuts.
>Not that this isn't a serious attack vector
At no point did I say or imply what you put in quotes.
Re: Next.js version 15.2.3 has been released to address a security vulnerability
#64This is a wild vuln in how trivial it is to execute. But maybe even wilder is the timeframe to event _start_ triaging the bug after it was reported. How? Was it incorrectly named? Was the severity not correctly stated? Someone help me understand how this sits for 2+ weeks. 2025-02-27T06:03Z: Disclosure to Next.js team via GitHub private vulnerability reporting 2025-03-14T17:13Z: Next.js team started triaging the repo…
Re: Next.js version 15.2.3 has been released to address a security vulnerability
#65Next.js is based on a fundamentally flawed premise that one can write code that runs in the browser as well as the backend. The security posture for the code running in the browser is very different from the code running on a trusted backend. A separation of concerns allows one to have two codebases, one frontend (untrustworthy but limited access) and one backend (trustworthy but a lot of access).
Re: Next.js version 15.2.3 has been released to address a security vulnerability
#66I hate how productive with this framework I am. I try to move on and can’t. I’ll take a security hit to use it lover leptos.
What does this get you over vanilla express servicing a react front end? Is it the rest of the deploy infra? The vanilla app you can push to Heroku or any of its clones.
The deploy infrastructure is quite nice. Nextjs is surprisingly low config, even if you forego the Vercel deployment route it’s not difficult to generate a static site or docker container
Re: Next.js version 15.2.3 has been released to address a security vulnerability
#67Oh my word: The exploit involves crafting HTTP requests containing the malicious header: GET /protected-route HTTP/1.1 Host: vulnerable-app.com x-middleware-subrequest: true So... just adding a "x-middleware-subrequest: true" header bypasses auth? Am I understanding this correctly?
Re: Next.js version 15.2.3 has been released to address a security vulnerability
#68Next.js is based on a fundamentally flawed premise that one can write code that runs in the browser as well as the backend. The security posture for the code running in the browser is very different from the code running on a trusted backend. A separation of concerns allows one to have two codebases, one frontend (untrustworthy but limited access) and one backend (trustworthy but a lot of access).
Re: Next.js version 15.2.3 has been released to address a security vulnerability
#69Next.js is based on a fundamentally flawed premise that one can write code that runs in the browser as well as the backend. The security posture for the code running in the browser is very different from the code running on a trusted backend. A separation of concerns allows one to have two codebases, one frontend (untrustworthy but limited access) and one backend (trustworthy but a lot of access).