漏洞信息
# next.js 中的缓存中毒问题
## 漏洞概述
Next.js 是一个用于构建全栈 Web 应用程序的 React 框架。攻击者可以通过发送精心构造的 HTTP 请求,毒化非动态服务器端渲染路由(仅影响 pages 路由器)的缓存。这可能导致缓存一个本应不被缓存的路由,并发送 `Cache-Control: s-maxage=1, stale-while-revalidate` 头,某些上游 CDN 也可能缓存该内容。
## 影响版本
- Next.js 13.5.1 - 14.2.9
## 细节
1. **版本区间**:Next.js 13.5.1 至 14.2.9
2. **路由类型**:仅影响 pages 路由器
3. **页面类型**:仅影响非动态服务器端渲染路由 (例如 `pages/dashboard.tsx`,但不包括 `pages/blog/[slug].tsx`)
## 影响
该漏洞造成非动态服务器端渲染路由的缓存中毒,并可能导致其被 CDN 缓存。建议所有受影响版本用户升级到 Next.js v13.5.7 或 v14.2.10 及以上版本。目前没有官方或推荐的工作绕过方法,建议用户升级到安全版本。
提示
尽管我们采用了先进的大模型技术,但其输出仍可能包含不准确或过时的信息。
神龙会尽力确保数据准确,但也请结合实际情况进行甄别与判断。
神龙祝您一切顺利!
漏洞标题
Cache Poisoning in next.js
漏洞描述信息
Next.js is a React framework for building full-stack web applications. By sending a crafted HTTP request, it is possible to poison the cache of a non-dynamic server-side rendered route in the pages router (this does not affect the app router). When this crafted request is sent it could coerce Next.js to cache a route that is meant to not be cached and send a `Cache-Control: s-maxage=1, stale-while-revalidate` header which some upstream CDNs may cache as well. To be potentially affected all of the following must apply: 1. Next.js between 13.5.1 and 14.2.9, 2. Using pages router, & 3. Using non-dynamic server-side rendered routes e.g. `pages/dashboard.tsx` not `pages/blog/[slug].tsx`. This vulnerability was resolved in Next.js v13.5.7, v14.2.10, and later. We recommend upgrading regardless of whether you can reproduce the issue or not. There are no official or recommended workarounds for this issue, we recommend that users patch to a safe version.
CVSS信息
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
漏洞类别
通过用户控制密钥绕过授权机制
漏洞标题
Next.js 安全漏洞
漏洞描述信息
Next.js是Vercel开源的一个 React 框架。 Next.js 13.5.1版本至14.2.10之前版本存在安全漏洞。攻击者利用该漏洞通过发送特制HTTP请求,毒害页面路由器中非动态服务器端呈现路由的缓存。
CVSS信息
N/A
漏洞类别
其他