• News/
  • https://www.bleepingcomputer.com/news/security/critical-flaw-in-nextjs-lets-hackers-bypass-authorization/

Critical flaw in Next.js lets hackers bypass authorization

BleepingComputer
·
Bill Toulas
·
Published Mar 24, 2025
·
Updated

A critical severity vulnerability has been discovered in the Next.js open-source web development framework, potentially allowing attackers to bypass authorization checks. The flaw, tracked as CVE-2025-29927, enables attackers to send requests that reach destination paths without going through critical security checks. Next.js is a popular React framework with more than 9 million weekly downloads on npm. It is used for building full-stack web apps and includes middleware components for authentication and authorization. Front-end and full-stack developers use it to build web apps with React. Some of the more notable companies using it for their sites/apps are TikTok, Twitch, Hulu, Netflix, Uber, and Nike. In Next.js, middleware components run before a request hits an application routing system and serve purposes like authentication, authorization, logging, error handling, redirecting users, applying geo-blocking or rate limits. To prevent infinite loops where middleware re-triggers itself, Next.js uses a header called 'x-middleware-subrequest' that dictates if middleware functions should be applied or not. The header is retrieved by the 'runMiddleware' function responsible for processing incoming requests. If it detects the 'x-middleware-subrequest' header, with a specific value, the entire middleware execution chain is bypassed and the request is forwarded to its destination. An attacker can manually send a request that includes the header with a correct value and thus bypass...

Read full article

Affected Software

6 affected components
Next.js Next.js
Next.js Next.js=15.2.2
Next.js Next.js=14.2.24
Next.js Next.js=13.5.8
Next.js Next.js=12.3.4
Vercel Next.js

Frequently Asked Questions

1

What is the main topic of this article?

The article focuses on a critical vulnerability in the Next.js framework that could allow unauthorized access.

2

What is the identified vulnerability in Next.js?

The vulnerability is tracked as CVE-2025-29927 and enables attackers to bypass authorization checks.

3

Which versions of Next.js are affected by this security flaw?

The affected versions include Next.js 15.2.2, 14.2.24, 13.5.8, and 12.3.4.

4

Who is the vendor of the affected software?

The vendor of the affected software is Vercel.

5

What security implications are associated with this Next.js vulnerability?

The security implications include the potential for attackers to gain unauthorized access and manipulate applications built on the Next.js framework.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203