CVE-2025-29927CWE-285

Authorization Bypass in Next.js Middleware

Critical · published March 21, 2025

Patch now

High probability of exploitation

CVSS calls it critical at 9.1. It sits in the 99.9th percentile for exploit probability.

CVSS v3.1
9.1
EPSS
99%
Percentile
99.9
In the wild
Unconfirmed
What it is

🚨 A sneaky bypass lurking in Next.js middleware could let unauthorized users slip right through! 🔥 Think of it as a restaurant where the bouncer checks IDs at the door, but a clever guest distracts him, allowing anyone to stroll right in. If the authorization isn't properly enforced in your kitchen, anyone could take a seat and start ‘ordering’ without a reservation! If exploited, this vulnerability could allow attackers to gain unauthorized access to sensitive parts of your application, potentially exposing user data or altering internal operations. It’s absolutely devastating if the wrong person walks in and starts tampering with your data!

Put simply

Think of it as a restaurant where the bouncer checks IDs at the door, but a clever guest distracts him, allowing anyone to stroll right in. If the authorization isn't properly enforced in your kitchen, anyone could take a seat and start ‘ordering’ without a reservation! This vulnerability stems from improper authorization checks in Next.js middleware versions 1.11.4 up to but not including 12.3.5, 13.5.9, 14.2.25, and 15.2.3, allowing users to bypass security measures.

What to do

If exploited, this vulnerability could allow attackers to gain unauthorized access to sensitive parts of your application, potentially exposing user data or altering internal operations. It’s absolutely devastating if the wrong person walks in and starts tampering with your data! To secure your application, immediately upgrade to Next.js versions 12.3.5, 13.5.9, 14.2.25, or 15.2.3. If upgrading isn't possible right away, block external requests that include the x-middleware-subrequest header from reaching your application. Don't leave the front door wide open! This is fixable! With these steps, you'll have your security back on track in no time. 🛡️

The record
Technical detail
CVSS v3.1
9.1 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
CVSS v4.0
Not supplied
EPSS
0.99225 · 99.9th percentile
Weakness
CWE-285 · Improper Authorization
Published
2025-03-21T14:34Z
EPSS history
Timeline
  • 21 MAR 14:34Z
    Authorization Bypass in Next.js Middleware
    cvelistv5