A critical vulnerability in Next.js tracked as CVE-2025-29927 allows attackers to bypass authorization controls when applications rely on Middleware for access checks under specific deployment conditions. Researchers showed that specially crafted requests using the x-middleware-subrequest header can cause Middleware processing to be skipped, forwarding requests directly to protected endpoints. The issue was described as an authorization bypass with a CVSS 9.1 severity rating and was later detailed by the Next.js team in a postmortem.
The flaw affects multiple Next.js release lines, with fixes released in 15.2.3, 14.2.25, 13.5.9, and 12.3.5. Guidance from defenders and the vendor says organizations should patch immediately, and those unable to update should block external requests containing the x-middleware-subrequest header. The exposure is tied to applications run with next start using the output: 'standalone' setting, while hosted Next.js deployments on Vercel and Netlify were reported as protected from this issue.

See affected versions and whether adversaries are exploiting it.
5 events from the most recent confirmed update back to the earliest known activity.
CSIRT.SK published an advisory on the critical Next.js flaw, summarizing affected versions, patched releases, and the recommendation to block external requests carrying the x-middleware-subrequest header if patching was not immediately possible. The notice also stated that Vercel- and Netlify-hosted instances were protected.
Next.js publicly disclosed CVE-2025-29927, a critical authorization bypass affecting applications that rely on Middleware for auth checks in certain deployment configurations. Patched releases were made available for multiple supported branches, including 15.2.3, 14.2.25, 13.5.9, and 12.3.5.
Zhero Web Security published research describing how the x-middleware-subrequest header could be abused to bypass authorization checks implemented in Next.js Middleware. The write-up publicly documented the issue's mechanics before the vendor postmortem.
According to Next.js's postmortem, Vercel received a private report from researchers about an authorization bypass involving Next.js Middleware and the x-middleware-subrequest header. This initiated the coordinated response to what became CVE-2025-29927.
Assetnote reported that common public checks could miss redirect-based Next.js middleware implementations because expected middleware headers may not be exposed. It described using x-nextjs-data to reveal redirect or rewrite indicators, consolidating middleware-path tests in X-Middleware-Subrequest, and filtering locale redirects to reduce scanning false positives.
Vulnerabilities, threat actors, malware, products, organizations, and breaches Mallory has linked to this story.
See whether adversaries are exploiting this yet, and where the affected versions run in your environment.
4 references tracked. Mallory keeps watching after this page renders.
slcyber.io
Open sourcecsirt.sk
Open sourcenextjs.org
Open sourcezhero-web-sec.github.io
Open sourceMap indicators from this story to your assets and identify affected systems in minutes.
Every observed campaign, victim, and pivot linked to actors named in this story.
Malware, exploits, and IOCs connected to the activity described here.
YARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Get matching new stories delivered to your team as they break — not the next morning.
Ask questions about this story and take action on the answers.