Skip to content Skip to footer
0 items - $0.00 0

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

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

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

22 Comments

  • Post Author
    makepanic
    Posted March 22, 2025 at 9:19 pm

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

  • Post Author
    ldjkfkdsjnv
    Posted March 22, 2025 at 10:38 pm

    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.

  • Post Author
    urbandw311er
    Posted March 22, 2025 at 10:42 pm

    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.

  • Post Author
    butterlettuce
    Posted March 22, 2025 at 10:47 pm

    Vercel’s reputation is so cooked. Jeez.

  • Post Author
    czk
    Posted March 22, 2025 at 10:47 pm

    it only took 16 days to triage a global next.js auth bypass

  • Post Author
    Lucasoato
    Posted March 22, 2025 at 10:48 pm

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

  • Post Author
    ratorx
    Posted March 22, 2025 at 11:02 pm

    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.

  • Post Author
    tdhz77
    Posted March 22, 2025 at 11:23 pm

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

  • Post Author
    ronbenton
    Posted March 22, 2025 at 11:26 pm

    I am concerned it took over 2 weeks to start triaging a security bug along the lines of "auth can be bypassed"

  • Post Author
    ronbenton
    Posted March 22, 2025 at 11:29 pm

    Oh 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?

  • Post Author
    ramoz
    Posted March 22, 2025 at 11:47 pm

    VC influence in the web space has been a fascinating thing.

    I hope Next's downfall sends a signal to the quality lib maintainers and changes direction (e.g. Remix and a f'd up router, TanStack w/ Start).

    SSR frameworks make me vomit.

  • Post Author
    ashishb
    Posted March 22, 2025 at 11:58 pm

    Next.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).

  • Post Author
    prdonahue
    Posted March 23, 2025 at 12:13 am

    Vibe security.

  • Post Author
    mikeocool
    Posted March 23, 2025 at 12:20 am

    Looking at next I have to think that something went horribly wrong with front end development. It adds so much complexity for things that provide such minimal value to most apps.

    React added a lot of complexity to the front end, but, for an app with a lot of front end state, brought a ton of value.

    Next brings us file based routing, which seems cool, until you get into any sort of mildly complex use case, and — if your careful and don’t fuck it up, server side rendering, which I guess is cool, if you’re building an e-commerce product and is maybe cool for maybe a few other verticals?

  • Post Author
    dvektor
    Posted March 23, 2025 at 12:29 am

    Ouch, 13 days to triage that is crazy. I definitely wasn't in need of any more reasons not to use something like nextJS, but I'll add this to my list.

  • Post Author
    ronbenton
    Posted March 23, 2025 at 12:30 am

    This 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 report

  • Post Author
    rvz
    Posted March 23, 2025 at 12:31 am

    1) What.

    Add a single header 'x-middleware-subrequest' and it allows you to completely bypass any self-hosted Next.js middleware, including authorization.

    This is beyond damning.

    It's also exactly the reason why the whole Javascript ecosystem is really showing how immature it is and the hype and euphoria of Vercel is contributing to its clumsiness.

    They are now also pushing "Vibe Coding", which is a hot air hype parade, about to be brutally hit with reality when others are deploying production code that is riddled with hundreds of security vulnerabilities.

    A delightful golden age for professional security researchers.

  • Post Author
    smlx
    Posted March 23, 2025 at 12:50 am

    next.js has a history of similar vulnerabilities.

    I was made aware recently of a vulnerability that was fixed by this patch: https://github.com/vercel/next.js/pull/73482/files

    In this vulnerability, adding a 'x-middleware-rewrite: https://www.example.com' header would cause the server to respond with the contents of example.com. i.e. the worlds dumbest SSRF.

    Note that there is no CVE for this vulnerability, nor is there any clear information about which versions are affected.

    Also note that according to the published support policy for nextjs only "stable" (15.2.x) and "canary" (15.3.x) receive patches. But for the vulnerability reported here they are releasing patches for 14.x and 13.x apparently?

    https://github.com/vercel/next.js/blob/canary/contributing/r…

    IMO you are playing with fire using nextjs for anything where you care about security and maintenance. Which seems insane for a project with 130k+ Github stars and supported by a major company like vercel.

  • Post Author
    banana_dick_12
    Posted March 23, 2025 at 1:02 am

    [flagged]

  • Post Author
    banana_dick_13
    Posted March 23, 2025 at 1:03 am

    [dead]

  • Post Author
    greysteil
    Posted March 23, 2025 at 1:13 am

    Can we take a moment to appreciate how good the disclosure and coordination process on this were?

    * Reported to the maintainers privately

    * Patch published and CVE issued before wider disclosure

    * Automated fix PRs created within minutes of public disclosure (and for folks doing proactive updates, before)

    The above is _really_ excellent. Compare that to Log4j, which no CVE and no patch at the time it became public knowledge, and it's clear we've come a long way.

    Supply chain security isn't a solved problem – there's lots we can still improve, and not everything here was perfect. But hats off to @leerob and everyone else involved in handling a tough situation really well.

  • Post Author
    blahbblah25
    Posted March 23, 2025 at 2:43 am

    [dead]

Leave a comment

In the Shadows of Innovation”

© 2025 HackTech.info. All Rights Reserved.

Sign Up to Our Newsletter

Be the first to know the latest updates

Whoops, you're not connected to Mailchimp. You need to enter a valid Mailchimp API key.