Skip to content

[GHSA-f82v-jwr5-mffw] Authorization Bypass in Next.js Middleware#7074

Open
Wenxin-Jiang wants to merge 1 commit intoWenxin-Jiang/advisory-improvement-7074from
Wenxin-Jiang-GHSA-f82v-jwr5-mffw
Open

[GHSA-f82v-jwr5-mffw] Authorization Bypass in Next.js Middleware#7074
Wenxin-Jiang wants to merge 1 commit intoWenxin-Jiang/advisory-improvement-7074from
Wenxin-Jiang-GHSA-f82v-jwr5-mffw

Conversation

@Wenxin-Jiang
Copy link

Updates

  • Affected products

Comments
The vulnerability (CVE-2025-29927) is an authorization bypass via the x-middleware-subrequest HTTP header, which is part of Next.js's middleware recursion prevention mechanism. This mechanism was introduced in Next.js 12.0.0 as part of the Middleware feature (October 2021). Version 11.1.4 (September 2021) predates the Middleware feature entirely.

The vulnerable code path is:

  1. External request arrives with x-middleware-subrequest header
  2. dist/server/web/sandbox/sandbox.js reads the header and skips middleware if the value matches

In 11.1.4, none of these files or functions exist. There is no web/sandbox/ directory, no sandbox.js, no x-middleware-subrequest header handling, and no middleware execution runtime.

@github-actions github-actions bot changed the base branch from main to Wenxin-Jiang/advisory-improvement-7074 February 25, 2026 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant