Nextjs 授权绕过漏洞

漏洞信息

漏洞名称: Next.js 授权绕过漏洞

漏洞编号:

  • CVE: CVE-2025-29927

漏洞类型: 权限绕过

漏洞等级: 高危

漏洞描述: Next.js 是一个流行的React框架,广泛用于构建现代化的Web应用程序,支持服务端渲染和静态网站生成。它被许多企业和开发者用于构建高性能的网站和应用。本次发现的漏洞CVE-2025-29927涉及Next.js 15.0.0版本中的一个授权绕过问题。该漏洞的根源在于处理内部请求的x-middleware-subrequest头时存在缺陷,攻击者可以通过构造特定的请求头绕过授权中间件,从而未授权访问受保护的路由。例如,攻击者可以访问仅限登录用户访问的/dashboard路由,而无需任何认证。这种漏洞的存在可能导致敏感信息泄露或未授权的操作执行,对Web应用的安全性构成严重威胁。由于Next.js的广泛应用,该漏洞的影响范围可能非常广泛,建议使用受影响版本的用户尽快升级到修复版本。

产品厂商: Next.js

产品名称: Next.js

影响版本: 15.0.0

来源: https://github.com/b4sh0xf/PoC-CVE-2025-29927

类型: CVE-2025:github search

仓库文件

  • README.md

来源概述

PoC-CVE-2025-29927

what is the vuln?

  • this cve reports an flaw in the header x-middleware-subrequest, responsible to takes internal requests in next.js, who allow an attacker bypass the authorization middlewares in next.js 15.0.0 and acess protected routes, for example

real example

  • in a webapp, there is the /dashboard route, who only logged users can acess, but, if we make the request with the heade x-middleware-subrequest: middleware:middleware:middleware:middleware:middleware, we can access this route without authentication

    image

Nextjs 授权绕过漏洞
http://example.com/2025/07/29/github_115126179/
作者
lianccc
发布于
2025年7月29日
许可协议