Live data from Hacker News

Next.js version 15.2.3 has been released to address a security vulnerability

nextjs.org

11–20 of 220 posts

Re: Next.js version 15.2.3 has been released to address a security vulnerability

#11

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.

Middleware skipping could expose all kinds of problems. A lot is done in middleware that the rest of the code can lay back and assume is dealt with.

Re: Next.js version 15.2.3 has been released to address a security vulnerability

#12

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.

Written by anybody

Vibe coding framework of choice

Re: Next.js version 15.2.3 has been released to address a security vulnerability

#13

Is NextJS considered safe? Would you build something for the government or a big Corp with it?

No. I wasn't concerned about security but just churn. They keep changing things. They also don't fix stuff people care about alot.

I'd just use Koa and keep it simple.

Re: Next.js version 15.2.3 has been released to address a security vulnerability

#14
post #7

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.

It's going to take awhile for the LLMs to catch up so we can un-vibe our way out of this

Unvibe AI (YC S25) is hiring.

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.

Not a web dev, so struggling a bit to understand this.

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

#16

Is NextJS considered safe? Would you build something for the government or a big Corp with it?

Yes, as much hate as it tends to get on here it's really fine. This vulnerability is unfortunate but every library/framework will have security issues over its lifespan.

Re: Next.js version 15.2.3 has been released to address a security vulnerability

#17
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 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

#18

We 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.

HN has a very weird mind-set when it comes to JS frameworks.

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

#19

Is NextJS considered safe? Would you build something for the government or a big Corp with it?

I think you have to ask what it’s compared to. Certainly this is no worse than things we’ve seen in the PHP or Java space and people still use those.

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.

Post reply on HN