It is possible to bypass authorization checks within a Next.js application, if the authorization check occurs in middleware.
15.2.314.2.25Note: Next.js deployments hosted on Vercel are automatically protected against this vulnerability.
If patching to a safe version is infeasible, we recommend that you prevent external user requests which contain the x-middleware-subrequest header from reaching your Next.js application.
{
"github_reviewed": true,
"severity": "CRITICAL",
"cwe_ids": [
"CWE-285",
"CWE-863"
],
"nvd_published_at": "2025-03-21T15:15:42Z",
"github_reviewed_at": "2025-03-21T15:20:12Z"
}