This is one of the worst security vulnerabilities I have seen in a while. It's so blatant, so easy to exploit. So many nextjs applications written by beginners that are completely exposed.
Next.js version 15.2.3 has been released to address a security vulnerability
11–20 of 220 posts
Re: Next.js version 15.2.3 has been released to address a security vulnerability
#12Re: Next.js version 15.2.3 has been released to address a security vulnerability
#13Is NextJS considered safe? Would you build something for the government or a big Corp with it?
I'd just use Koa and keep it simple.
Re: Next.js version 15.2.3 has been released to address a security vulnerability
#14This is one of the worst security vulnerabilities I have seen in a while. It's so blatant, so easy to exploit. So many nextjs applications written by beginners that are completely exposed.
It's going to take awhile for the LLMs to catch up so we can un-vibe our way out of this
Re: Next.js version 15.2.3 has been released to address a security vulnerability
#15> Next.js uses an internal header x-middleware-subrequest to prevent recursive requests from triggering infinite loops. The security report showed it was possible to skip running Middleware, which could allow requests to skip critical checks—such as authorization cookie validation—before reaching routes.
Are they saying they had a special flag that allowed requests to bypass auth, intended to be used by calls generated internally?
And someone figured out you could just send that on the first request and skip auth entirely?
Re: Next.js version 15.2.3 has been released to address a security vulnerability
#16Is NextJS considered safe? Would you build something for the government or a big Corp with it?
Re: Next.js version 15.2.3 has been released to address a security vulnerability
#17https://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 request arrives) from the middleware itself.
Allowing ANY headers from the user except a whitelisted subset also seems like an accident waiting to happen. I think the mindset of ignoring unknown/invalid parts of a request as long as some of it is valid also plays a role.
The framework providing crutches for bad server design is also a consequence of this mindset - are there any concrete use cases where the flow for processing a request should not be a DAG? Allowing recursive requests across authentication boundaries seems like a problem waiting to happen as well.
Re: Next.js version 15.2.3 has been released to address a security vulnerability
#18We opted for self-hosted next.js as the architecture for the web app we are building because we believed a lot of the hype. The more comments I read about it in HN, the less comfortable I feel about this decision.
Next.JS is more than fine for 99% of web apps, and the fit only gets better the bigger your web app/platform. In general it's probably the framework that will give you the most bang for your buck.
Re: Next.js version 15.2.3 has been released to address a security vulnerability
#19Is NextJS considered safe? Would you build something for the government or a big Corp with it?
However, there is one argument you could make regarding the massive amount of complexity which Next takes on trying to blur client and server execution. That’s prone to creating confusion around validation and control flow, which is a notorious source of security vulnerabilities and it looks like this might be another one as it appears to be related to how they try to transition from edge execution to server-side.
So less a Next-specific point than recognizing that poor architecture is an ongoing risk. This kind approach has been tried and generally failed to deliver in it’s promised repeatedly over the decades because it only saves time building out a quick demo. Once you have a real app, with multiple people working on it, you really want a clear definition of what runs where because it’s much easier to reasonable about security, performance, and reliability if you don’t have layers of abstraction trying to pretend unlike things are alike.
Re: Next.js version 15.2.3 has been released to address a security vulnerability
#20Is NextJS considered safe? Would you build something for the government or a big Corp with it?