支持本站 — 捐款将帮助我们持续运营

目标:1000 元,已筹:640

64.0%
一、 漏洞 CVE-2025-29927 基础信息
漏洞信息
                                        # Next.js 中间件中的授权绕过漏洞

## 漏洞概述

Next.js 是一个用于构建全栈 Web 应用的 React 框架。在某些版本中,如果授权检查发生在中间件中,则可能发生绕过授权检查的问题。

## 影响版本

- 1.11.4 到 12.3.5(不包括 12.3.5)
- 1.11.4 到 13.5.9(不包括 13.5.9)
- 1.11.4 到 14.2.25(不包括 14.2.25)
- 1.11.4 到 15.2.3(不包括 15.2.3)

## 细节

授权检查如果在中间件中进行,攻击者可以通过特定方法绕过这些授权检查。这一漏洞允许未经授权的用户访问受保护的内容或执行敏感操作。

## 影响

此漏洞可能导致未经授权的访问和潜在的安全风险。建议更新到以下修复版本:12.3.5, 13.5.9, 14.2.25 和 15.2.3,或者在无法立即修补的情况下,阻止带有 `x-middleware-subrequest` 请求头的外部用户请求到达 Next.js 应用程序。
                                        
神龙判断

是否为 Web 类漏洞:

判断理由:

是。这个漏洞允许攻击者通过特定的请求头(如 x-middleware-subrequest)绕过Next.js应用中的授权检查,主要影响服务端的中间件处理逻辑。这个问题在Next.js的14.2.25和15.2.3版本中得到了修复。
提示
尽管我们采用了先进的大模型技术,但其输出仍可能包含不准确或过时的信息。
神龙会尽力确保数据准确,但也请结合实际情况进行甄别与判断。
神龙祝您一切顺利!
漏洞标题
Authorization Bypass in Next.js Middleware
来源:美国国家漏洞数据库 NVD
漏洞描述信息
Next.js is a React framework for building full-stack web applications. Starting in version 1.11.4 and prior to versions 12.3.5, 13.5.9, 14.2.25, and 15.2.3, it is possible to bypass authorization checks within a Next.js application, if the authorization check occurs in middleware. If patching to a safe version is infeasible, it is recommend that you prevent external user requests which contain the x-middleware-subrequest header from reaching your Next.js application. This vulnerability is fixed in 12.3.5, 13.5.9, 14.2.25, and 15.2.3.
来源:美国国家漏洞数据库 NVD
CVSS信息
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
来源:美国国家漏洞数据库 NVD
漏洞类别
授权机制不恰当
来源:美国国家漏洞数据库 NVD
漏洞标题
Next.js 安全漏洞
来源:中国国家信息安全漏洞库 CNNVD
漏洞描述信息
Next.js是Vercel开源的一个 React 框架。 Next.js 14.2.25之前版本和15.2.3之前版本存在安全漏洞,该漏洞源于如果授权检查发生在中间件中,可能绕过授权检查。
来源:中国国家信息安全漏洞库 CNNVD
CVSS信息
N/A
来源:中国国家信息安全漏洞库 CNNVD
漏洞类别
其他
来源:中国国家信息安全漏洞库 CNNVD
二、漏洞 CVE-2025-29927 的公开POC
#POC 描述源链接神龙链接
1Verify Next.js CVE-2025-29927 on Netlify not vulnerablehttps://github.com/serhalp/test-cve-2025-29927POC详情
2Next.js Middleware Authorization Bypasshttps://github.com/Ademking/CVE-2025-29927POC详情
3A Nuclei template to detect CVE-2025-29927 the Next.js authentication bypass vulnerabilityhttps://github.com/6mile/nextjs-CVE-2025-29927POC详情
4undefinedhttps://github.com/azu/nextjs-cve-2025-29927-pocPOC详情
5Nonehttps://github.com/lirantal/vulnerable-nextjs-14-CVE-2025-29927POC详情
6CVE-2025-29927 Proof of Concepthttps://github.com/aydinnyunus/CVE-2025-29927POC详情
7Nonehttps://github.com/ticofookfook/poc-nextjs-CVE-2025-29927POC详情
8Next.js における認可バイパスの脆弱性を再現するデモです。https://github.com/t3tra-dev/cve-2025-29927-demoPOC详情
9Proof-of-Concept for Authorization Bypass in Next.js Middlewarehttps://github.com/websecnl/CVE-2025-29927-PoC-ExploitPOC详情
10Authorization Bypass in Next.js Middlewarehttps://github.com/MuhammadWaseem29/CVE-2025-29927-POCPOC详情
11CVE-2025-29927 labhttps://github.com/strobes-security/nextjs-vulnerable-appPOC详情
12CVE-2025-29927 Exploit Checkerhttps://github.com/RoyCampos/CVE-2025-29927POC详情
13Demo for Next.js middleware bypass - CVE-2025-29927https://github.com/fourcube/nextjs-middleware-bypass-demoPOC详情
14Next.Js 权限绕过漏洞(CVE-2025-29927)https://github.com/iSee857/CVE-2025-29927POC详情
15CVE-2025-29927 Proof of Concepthttps://github.com/Eve-SatOrU/POC-CVE-2025-29927POC详情
16CVE-2025-29927 Authorization Bypass in Next.js Middlewarehttps://github.com/arvion-agent/next-CVE-2025-29927POC详情
17Next.js Middleware Auth Bypasshttps://github.com/Oyst3r1ng/CVE-2025-29927POC详情
18New nuclei CVE https://github.com/lediusa/CVE-2025-29927POC详情
19Nonehttps://github.com/lem0n817/CVE-2025-29927POC详情
20CVE-2025-29927の検証https://github.com/kuzushiki/CVE-2025-29927-testPOC详情
21A deliberately Next.js app, vulnerable to CVE-2025-29927, Authorization Bypass https://github.com/ricsirigu/CVE-2025-29927POC详情
22Async Python scanner for Next.js CVE-2025-29927. Uses aiohttp & aiofiles to efficiently process large URL lists, detect vulnerabilities, and save results. Features connection pooling, caching, and chunked processing for fast performancehttps://github.com/0xWhoknows/CVE-2025-29927POC详情
23Nuclei Template: CVE-2025-29927 - Next.js Middleware Authentication Bypasshttps://github.com/tobiasGuta/CVE-2025-29927-POCPOC详情
24Sigma Rule for CVE-2025–29927 Detectionhttps://github.com/elshaheedy/CVE-2025-29927-Sigma-RulePOC详情
25Critical vulnerability in next.js : Bypass middleware authenticationhttps://github.com/furmak331/CVE-2025-29927POC详情
26Ghost Route detects if a Next JS site is vulnerable to the corrupt middleware bypass bug (CVE-2025-29927)https://github.com/takumade/ghost-routePOC详情
27Nonehttps://github.com/memmedrehimzade/CVE-2025-29927-vuln-appPOC详情
28Nonehttps://github.com/0xPb1/Next.js-CVE-2025-29927POC详情
29Nonehttps://github.com/jeymo092/cve-2025-29927POC详情
30PoC for CVE-2025-29927: Next.js Middleware Bypass Vulnerability. Demonstrates how x-middleware-subrequest can bypass authentication checks. Includes Docker setup for testing.https://github.com/alihussainzada/CVE-2025-29927-PoCPOC详情
31PowerShell script to test if a web app is vulnerable to CVE-2025-29927https://github.com/TheresAFewConors/CVE-2025-29927-TestingPOC详情
32Nonehttps://github.com/0xPThree/next.js_cve-2025-29927POC详情
33Nonehttps://github.com/0xcucumbersalad/cve-2025-29927POC详情
34script to check cve "CVE-2025-29927" while waiting to add it to HExHTTPhttps://github.com/c0dejump/CVE-2025-29927-checkPOC详情
35Nonehttps://github.com/maronnjapan/claude-create-CVE-2025-29927POC详情
36This repository contains a proof of concept (POC) and an exploit script for CVE-2025-29927, a critical vulnerability in Next.js that allows attackers to bypass authorization checks implemented in middleware.https://github.com/kOaDT/poc-cve-2025-29927POC详情
37Nonehttps://github.com/yugo-eliatrope/test-cve-2025-29927POC详情
38A touch of securityhttps://github.com/Slvignesh05/CVE-2025-29927POC详情
39Next.js Acceso no autorizado CVE-2025-29927https://github.com/aleongx/CVE-2025-29927POC详情
40A demo of the CVE-2025-29927 vulnerability for a NebraskaJS lightning talkhttps://github.com/nicknisi/next-attackPOC详情
41Next.js CVE-2025-29927 Vulnerability Scannerhttps://github.com/jmbowes/NextSecureScanPOC详情
42Este script verifica la vulnerabilidad CVE-2025-29927 en servidores Next.js, probando múltiples cargas en la cabecera x-middleware-subrequest para detectar accesos no autorizados.https://github.com/aleongx/CVE-2025-29927_ScannerPOC详情
43how to hack 90% of next.js created websites with CVE-2025-29927 vulnerability exploit https://github.com/Nekicj/CVE-2025-29927-exploitPOC详情
44Nonehttps://github.com/Heimd411/CVE-2025-29927-PoCPOC详情
45Nonehttps://github.com/m2hcz/m2hcz-Next.js-security-flaw-CVE-2025-29927---PoC-exploitPOC详情
46CVE-2025-29927에 대한 설명 및 리서치https://github.com/KaztoRay/CVE-2025-29927-ResearchPOC详情
47python script for evaluate if you are vulnerable or not to next.js CVE-2025-29927https://github.com/nocomp/CVE-2025-29927-scannerPOC详情
48This repository is for educational and research purposes.https://github.com/yuzu-juice/CVE-2025-29927_demoPOC详情
49CVE-2025-29927: Next.js Middleware Exploithttps://github.com/0x0Luk/0xMiddlewarePOC详情
50NextSploit is a command-line tool designed to detect and exploit CVE-2025-29927, a security flaw in Next.jshttps://github.com/AnonKryptiQuz/NextSploitPOC详情
51Here is a simple but effective exploit for CVE-2025-29927.https://github.com/w2hcorp/CVE-2025-29927-PoCPOC详情
52This script scans a list of URLs to detect if they are using **Next.js** and determines whether they are vulnerable to **CVE-2025-29927**. It optionally attempts exploitation using a wordlist.https://github.com/ferpalma21/Automated-Next.js-Security-Scanner-for-CVE-2025-29927POC详情
53Next.js CVE-2025-29927 demonstrationhttps://github.com/dante01yoon/CVE-2025-29927POC详情
54Next.js Auth Bypass Lab ‐ CVE-2025-29927https://github.com/ayato-shitomi/WebLab_CVE-2025-29927POC详情
55Nonehttps://github.com/Kamal-418/Vulnerable-Lab-NextJS-CVE-2025-29927POC详情
56Next.js Middleware Bypass Vulnerability https://github.com/alastair66/CVE-2025-29927POC详情
57Next.js CVE-2025-29927 güvenlik açığı hakkındahttps://github.com/BilalGns/CVE-2025-29927POC详情
58Nonehttps://github.com/nyctophile0969/CVE-2025-29927POC详情
59A basic proof of concept of the CVE-2025-29927 vulnerability that allows to bypass the middleware scripts.https://github.com/Naveen-005/Next.Js-middleware-bypass-vulnerability-CVE-2025-29927POC详情
60Next.js and the corrupt middleware...TRY TO HACK IT..!https://github.com/Gokul-Krishnan-V-R/cve-2025-29927POC详情
61Next.js Middleware Authorization Bypass Tool (CVE-2025-29927)https://github.com/fahimalshihab/NextBypassPOC详情
62Nonehttps://github.com/sn1p3rt3s7/NextJS_CVE-2025-29927POC详情
63CVE-2025-29927 is a critical vulnerability in Next.js, a popular React-based web framework. The flaw exists in how the middleware feature handles certain internal headers — specifically, the x-middleware-subrequest headerhttps://github.com/Balajih4kr/cve-2025-29927POC详情
64vulnerable-nextjs-14-CVE-2025-29927https://github.com/YEONDG/nextjs-cve-2025-29927POC详情
65Next.js Middleware Bypass Scannehttps://github.com/gotr00t0day/CVE-2025-29927POC详情
66CVE-2025-29927https://github.com/pixilated730/NextJS-Exploit-POC详情
67CVE-2025-29927 ~ a poc of the next.js middleware authentication bypasshttps://github.com/ValGrace/middleware-auth-bypassPOC详情
68Nonehttps://github.com/goncalocsousa1/CVE-2025-29927POC详情
69Nonehttps://github.com/pickovven/vulnerable-nextjs-14-CVE-2025-29927POC详情
70Research on Next.js middleware vulnerability (CVE-2025-29927) allowing authorization bypass and potential exploits.https://github.com/l1uk/nextjs-middleware-exploitPOC详情
71Next.js CVE-2025-29927 Hunterhttps://github.com/darklotuskdb/nextjs-CVE-2025-29927-hunterPOC详情
72Next.js contains a critical middleware bypass vulnerability affecting versions 11.1.4 through 15.2.2. The vulnerability allows attackers to bypass middleware security controls by sending a specially crafted 'x-middleware-subrequest' header, which can lead to authorization bypass and other security control circumvention. https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2025/CVE-2025-29927.yamlPOC详情
73A critical vulnerability in Next.js middleware allows attackers to bypass authorization checks by manipulating the x-middleware-subrequest header. This flaw affects Next.js versions prior to 14.2.25 and 15.2.3, potentially granting unauthorized access to sensitive resources. https://github.com/projectdiscovery/nuclei-templates/blob/main/headless/cves/2025/CVE-2025-29927-HEADLESS.yamlPOC详情
74Nonehttps://github.com/Threekiii/Awesome-POC/blob/master/%E4%B8%AD%E9%97%B4%E4%BB%B6%E6%BC%8F%E6%B4%9E/Next.js%20%E4%B8%AD%E9%97%B4%E4%BB%B6%E9%89%B4%E6%9D%83%E7%BB%95%E8%BF%87%E6%BC%8F%E6%B4%9E%20CVE-2025-29927.mdPOC详情
75https://github.com/vulhub/vulhub/blob/master/next.js/CVE-2025-29927/README.mdPOC详情
76POC CVE-2025-29927https://github.com/ethanol1310/POC-CVE-2025-29927-POC详情
77Exploit for CVE-2025-29927 (Next.js) - Authorization Bypasshttps://github.com/UNICORDev/exploit-CVE-2025-29927POC详情
78Simulates CVE-2025-29927, a critical Next.js vulnerability allowing attackers to bypass middleware authorization by exploiting the internal x-middleware-subrequest HTTP header. Demonstrates unauthorized access to protected routes and provides mitigation strategies.https://github.com/Knotsecurity/CVE-2025-29927-NextJs-Middleware-SimulationPOC详情
79Nonehttps://github.com/mhamzakhattak/CVE-2025-29927POC详情
80New nuclei CVE https://github.com/emadshanab/CVE-2025-29927POC详情
81A touch of securityhttps://github.com/bitdotioinc/CVE-2025-29927POC详情
82> 🔓 Proof-of-Concept for a fictional Next.js middleware bypass (CVE-2025-29927) — craft sub-requests to test protected routes.https://github.com/m2hcz/PoC-for-Next.js-MiddlewarePOC详情
83CVE-2025-29927에 대한 설명 및 리서치https://github.com/AventurineJun/CVE-2025-29927-ResearchPOC详情
84CVE-2025-29927: Next.js Middleware Exploithttps://github.com/luq0x/0xMiddlewarePOC详情
85Nonehttps://github.com/0xnxt1me/CVE-2025-29927POC详情
86Nonehttps://github.com/enochgitgamefied/NextJS-CVE-2025-29927POC详情
87Nonehttps://github.com/Grand-Moomin/Vuln-Next.js-CVE-2025-29927POC详情
88Nonehttps://github.com/pouriam23/Next.js-Middleware-Bypass-CVE-2025-29927-POC详情
89CVE-2025-29927: Next.js Middleware Bypass Vulnerabilityhttps://github.com/kh4sh3i/CVE-2025-29927POC详情
90Next.js middleware bypass exploithttps://github.com/EQSTLab/CVE-2025-29927POC详情
91Next js middlewareauth Bypass https://github.com/Hirainsingadia/CVE-2025-29927POC详情
92CVE-2025-29927https://github.com/hed1ad/CVE-2025-29927POC详情
93This is a CVE-2025-29927 Scanner.https://github.com/HoumanPashaei/CVE-2025-29927POC详情
94Nonehttps://github.com/rubbxalc/CVE-2025-29927POC详情
95Nonehttps://github.com/olimpiofreitas/CVE-2025-29927_scannerPOC详情
96Next.js Auth Bypass PoC Edge Runtime Env Leak via Middleware Bughttps://github.com/moften/CVE-2025-29927POC详情
97x-middleware exploit for next.js CVE-2023–46298 cache poisoning and CVE-2025-29927 bypasshttps://github.com/EarthAngel666/x-middleware-exploitPOC详情
98Nonehttps://github.com/enochgitgamefied/NextJS-CVE-2025-29927-Docker-LabPOC详情
99🔐 Python-based smart scanner for CVE-2025-29927 — Next.js middleware authentication bypass vulnerability. Detects meta refresh, keyword-based redirects, and more.https://github.com/sagsooz/CVE-2025-29927POC详情
100vulnerable-nextjs-14-CVE-2025-29927https://github.com/SugiB3o/vulnerable-nextjs-14-CVE-2025-29927POC详情
101CVE-2025-29927https://github.com/B1ack4sh/Blackash-CVE-2025-29927POC详情
102Nonehttps://github.com/amitlttwo/Next.JS-CVE-2025-29927POC详情
103Nonehttps://github.com/KamalideenAK/poc-cve-2025-29927POC详情
104CVE-2025-29927 PoC | Auth Bypass Exploit | Python Tool using httpx | Middleware Vulnerability | Ethical Hacking Toolkithttps://github.com/mickhacking/Thank-u-NextPOC详情
105CVE‑2025‑29927 is a critical vulnerability (CVSS 9.1) in Next.js that allows attackers to bypass middleware‑based security checks.https://github.com/Kamal-Hegazi/CVE-2025-29927-Next.js-Middleware-Authorization-BypassPOC详情
106Authorization Bypass in Next.js Middlewarehttps://github.com/dedibagus/cve-2025-29927-pocPOC详情
107Nonehttps://github.com/olimpiofreitas/CVE-2025-29927-scannerPOC详情
108The POC for m6.fr websitehttps://github.com/sahbaazansari/CVE-2025-29927POC详情
109A touch of securityhttps://github.com/newweshi/CVE-2025-29927POC详情
110→ poc for CVE-2025-29927https://github.com/b4sh0xf/PoC-CVE-2025-29927POC详情
111🔓 Next.js Auth Bypass Demo - Educational application demonstrating CVE-2025-29927 middleware authentication bypass vulnerability . ⚠️ For educational use only.https://github.com/aayush256-sys/next-js-auth-bypassPOC详情
112Nonehttps://github.com/rgvillanueva28/vulnbox-easy-CVE-2025-29927POC详情
113CVE-2025-29927에 대한 설명 및 리서치https://github.com/Haruaventure/CVE-2025-29927-ResearchPOC详情
114Nonehttps://github.com/R3verseIN/Nextjs-middleware-vulnerable-appdemo-CVE-2025-29927POC详情
115PoC | NextJS Middleware 15.2.2 - Authorization Bypass https://github.com/zs1n/CVE-2025-29927POC详情
116CVE-2025-29927에 대한 설명 및 리서치https://github.com/AventurineJ/CVE-2025-29927-ResearchPOC详情
117This repository contains **research and analysis** related to CVE-2025-29927. It demonstrates safe, controlled testing approaches for a path traversal/middleware misconfiguration vulnerability in web applications.https://github.com/MKIRAHMET/CVE-2025-29927-PoCPOC详情
118do not use. vulnerablehttps://github.com/adjscent/vulnerable-nextjs-14-CVE-2025-29927POC详情
119Nonehttps://github.com/sdrtba/CVE-2025-29927POC详情
120Nonehttps://github.com/JOOJIII/CVE-2025-29927POC详情
121Nonehttps://github.com/iteride/CVE-2025-29927POC详情
122CVE-2025-29927https://github.com/sermikr0/nextjs-middleware-auth-bypassPOC详情
123Next.js middleware auth-bypass lab (CVE-2025-29927 simulation)https://github.com/amalpvatayam67/day10-nextjs-middleware-labPOC详情
124CVE‑2025‑29927 is a critical vulnerability (CVSS 9.1) in Next.js that allows attackers to bypass middleware‑based security checks.https://github.com/0xh3g4z1/CVE-2025-29927-Next.js-Middleware-Authorization-BypassPOC详情
125CVE-2025-29927에 대한 설명 및 리서치https://github.com/Viperazor/CVE-2025-29927-ResearchPOC详情
126Nonehttps://github.com/kuyrathdaro/cve-2025-29927POC详情
127Simple script to attempt a Bypass on a server possibly vulnerable to CVE-2025-29927 (Next.js Middleware)https://github.com/diogolourencodev/middleforcePOC详情
128Reproduction and fix of the CVE-2025-29927 vulnerability.https://github.com/Bongni/CVE-2025-29927POC详情
129Next.js Auth Bypass PoC Edge Runtime Env Leak via Middleware Bughttps://github.com/moften/CVE-2025-29927_Next.js_Auth_BypassPOC详情
130Una CTF, in formato DSP-compliant, basata sulla CVE-2025-29927 di nextjs.https://github.com/NS-Projects-Unina/CTF_CVE_DSP_1POC详情
131Nonehttps://github.com/lucaschanzx/CVE-2025-29927-PoCPOC详情
132Nonehttps://github.com/BugHawak/CVE-2025-29927POC详情
133🔓 Next.js Auth Bypass Demo - Educational application demonstrating CVE-2025-29927 middleware authentication bypass vulnerability . ⚠️ For educational use only.[Made using Ai]https://github.com/kazuya256/next-js-auth-bypassPOC详情
134Ghost Route detects if a Next JS site is vulnerable to the corrupt middleware bypass bug (CVE-2025-29927)https://github.com/phoscoder/ghost-routePOC详情
135CVE-2025-29927https://github.com/Ashwesker/Blackash-CVE-2025-29927POC详情
136PoC for testing CVE-2025-29927 for Next.js versions 11.x, 12.x <= 12.3.5, 13.x <= 13.5.9, 14.x <=14.2.25, 15.x <= 15.2.3https://github.com/liamromanis101/CVE-2025-29927-NextJSPOC详情
137Nonehttps://github.com/radzek15/CVE-2025-29927-Next.js-middlewarePOC详情
138A touch of securityhttps://github.com/w3shinew/CVE-2025-29927POC详情
三、漏洞 CVE-2025-29927 的情报信息
  • 标题: Release v12.3.5 · vercel/next.js · GitHub -- 🔗来源链接

    标签:x_refsource_MISC

    神龙速读:
                                            从这个网页截图中可以获取到以下关于漏洞的关键信息:
    
    - **CVE编号**: CVE-2025-29927
    - **安全补丁**: v12.3.5 版本包含了一个针对 CVE-2025-29927 的安全补丁。
    - **发布说明**: 这个版本是回溯修复错误的版本,不包括所有待定的功能/更改。
    
    ```markdown
    ### 关键漏洞信息
    
    - **CVE编号**: CVE-2025-29927
    - **安全补丁**: v12.3.5 版本包含了一个针对 CVE-2025-29927 的安全补丁。
    - **发布说明**: 这个版本是回溯修复错误的版本,不包括所有待定的功能/更改。
    ```
                                            
    Release v12.3.5 · vercel/next.js · GitHub
  • 标题: Release v13.5.9 · vercel/next.js · GitHub -- 🔗来源链接

    标签:x_refsource_MISC

    神龙速读:
                                            从这个网页截图中可以获取到以下关于漏洞的关键信息:
    
    - **CVE编号**: CVE-2025-29927
    - **安全补丁**: v13.5.9 版本包含了一个针对 CVE-2025-29927 的安全补丁。
    - **发布说明**: 这个版本是回溯修复错误的版本,不包括所有待定的功能/更改。
                                            
    Release v13.5.9 · vercel/next.js · GitHub
  • 标题: Authorization Bypass in Next.js Middleware · Advisory · vercel/next.js · GitHub -- 🔗来源链接

    标签:x_refsource_CONFIRM

    Authorization Bypass in Next.js Middleware · Advisory · vercel/next.js · GitHub
  • 标题: Update middleware request header (#77201) · vercel/next.js@52a078d · GitHub -- 🔗来源链接

    标签:x_refsource_MISC

    神龙速读:
                                            从这个网页截图中,可以获取到以下关于漏洞的关键信息:
    
    - **漏洞编号**:#77281
    - **描述**:该提交添加了一个额外的请求头到内部过滤列表中,用于中间件。
    - **代码更改**:
      - 在 `packages/next/src/server/lib/router-server.ts` 文件中,添加了对 `x-middleware-subrequest` 头的处理逻辑,以确保在请求未来自当前会话时正确过滤该头。
      - 在 `packages/next/src/server/lib/server-ipc/utils.ts` 文件中,添加了对 `x-middleware-subrequest-id` 头的处理逻辑,以确保在请求未来自当前会话时正确过滤该头。
      - 在 `packages/next/src/server/web/sandbox/context.ts` 文件中,添加了对 `x-middleware-subrequest-id` 头的设置逻辑。
      - 在 `test/e2e/middleware-general/test/index.test.ts` 文件中,添加了测试用例,确保请求头被正确过滤。
    
    这些更改表明,之前可能存在一个漏洞,使得恶意请求可以通过特定的请求头绕过中间件的过滤逻辑。通过这些代码更改,修复了该漏洞,确保了中间件的安全性。
                                            
    Update middleware request header (#77201) · vercel/next.js@52a078d · GitHub
  • 标题: [backport] Update middleware request header (#77202) · vercel/next.js@5fd3ae8 · GitHub -- 🔗来源链接

    标签:x_refsource_MISC

    神龙速读:
                                            从这个网页截图中,可以获取到以下关于漏洞的关键信息:
    
    - **漏洞类型**:该提交主要修复了一个与中间件请求头相关的漏洞。
    - **修复措施**:
      - 在 `router-server.ts` 文件中,添加了生成随机的 `middlewareSubrequestId` 并将其存储在全局变量中。
      - 在 `utils.ts` 文件中,更新了 `filterInternalHeaders` 函数,以过滤掉内部请求头,特别是 `x-middleware-subrequest` 头,防止其被错误地传递给中间件。
      - 在 `context.ts` 文件中,确保在请求上下文中正确设置 `x-middleware-subrequest-id`。
      - 在测试文件 `index.test.ts` 中,增加了测试用例以验证中间件运行时是否能正确处理请求头过滤。
    
    这些更改表明存在一个潜在的安全问题,即内部请求头可能被恶意利用,导致中间件行为异常或安全风险。通过这些修复措施,确保了中间件请求头的正确性和安全性。
                                            
    [backport] Update middleware request header (#77202) · vercel/next.js@5fd3ae8 · GitHub
  • https://nvd.nist.gov/vuln/detail/CVE-2025-29927
四、漏洞 CVE-2025-29927 的评论

暂无评论


发表评论