Latest Next.js vulnerabilities #

On March 22nd, 2025, Next.js disclosed an authentication bypass vulnerability in the middleware layer. Exploitation is trivial and can be achieved by sending an extra HTTP header. For specifics, please see the research paper.

What is the impact? #

Successful exploitation of this vulnerability would allow a remote attacker to bypass security checks implemented in the middleware layer, including many forms of authentication.

Are updates or workarounds available? #

Next.js recommends that customers upgrade to 15.2.3 or 14.2.25. For users that cannot upgrade they recommend filtering the `x-middleware-subrequest` header from requests before they reach the application (case insensitive).

How to find Next.js installations with runZero #

From the Service Inventory, use the following query to locate assets running any version of Next.js

_asset.protocol:http AND protocol:http AND (has:http.head.xPoweredBy AND http.head.xPoweredBy:="Next.js")

A slower, but more comprehensive Service Inventory query:

_asset.protocol:http AND protocol:http AND (
http.head.xPoweredBy:="Next.js" OR
http.head.vary:"Next-Router" OR
has:http.head.xNextjsCache OR
http.body:"/_next/static/"
)

Written by HD Moore

HD Moore is the founder and CEO of runZero. Previously, he founded the Metasploit Project and served as the main developer of the Metasploit Framework, which is the world's most widely used penetration testing framework.

More about HD Moore
Subscribe Now

Get the latest news and expert insights delivered in your inbox.


Explore more

Webcasts
The Unreasonable Effectiveness of Inside Out Attack Surface Management
HD Moore, founder of runZero (and previously Metasploit), presents new research that will forever redefine how you approach attack surface...
Webcasts
Safeguarding OT/ICS Assets: Insights from the U.S. Department of Energy
Security experts from the National Renewable Energy Lab’s (NREL) Clean Energy Cybersecurity Accelerator™ (CECA) program join runZero to discuss...
runZero Insights
Ensure compliance with DORA’s ICT risk framework using runZero
Learn how to uncover unmanaged and unknown assets— including IT, OT, and IoT— to meet DORA's hidden risk requirements using runZero.
Talks
DEF CON 32: SSHamble: Unexpected Exposures in SSH (Video)
This talk digs deep into SSH, the lesser-known implementations, many of the surprising security issues found along the way, and how to exploit them.

See Results in Minutes

See & secure your total attack surface. Even the unknowns & unmanageable.

© Copyright 2025 runZero, Inc. All Rights Reserved

Discover the new era of exposure management!