一、 漏洞 CVE-2025-31486 基础信息
漏洞信息
                                        # Vite 允许通过 .svg 或相对路径绕过 server.fs.deny 配置

# 漏洞描述

## 概述
Vite 是一个用于 JavaScript 的前端工具框架。攻击者可以通过特定请求绕过 `server.fs.deny` 限制,返回任意文件内容到浏览器。

## 影响版本
- 4.5.12
- 5.4.17
- 6.0.14
- 6.1.4
- 6.2.5

这些版本已修复该漏洞。受影响的版本为 Vite 6.0+。

## 细节
通过在请求中添加 `?.svg` 和 `?.wasm?init` 或使用 `sec-fetch-dest: script` 请求头,可以绕过文件访问限制 (`server.fs.deny`)。此绕过仅在以下条件下成立:
1. 文件大小小于 `build.assetsInlineLimit`(默认为 4kB)。
2. 使用 Vite 6.0+ 版本。

## 影响
只有明确将 Vite 开发服务器暴露到网络中的应用(使用 `--host` 或 `server.host` 配置选项)才会受到此漏洞影响。
                                        
提示
尽管我们采用了先进的大模型技术,但其输出仍可能包含不准确或过时的信息。
神龙会尽力确保数据准确,但也请结合实际情况进行甄别与判断。
神龙祝您一切顺利!
漏洞标题
Vite allows server.fs.deny to be bypassed with .svg or relative paths
来源:美国国家漏洞数据库 NVD
漏洞描述信息
Vite is a frontend tooling framework for javascript. The contents of arbitrary files can be returned to the browser. By adding ?.svg with ?.wasm?init or with sec-fetch-dest: script header, the server.fs.deny restriction was able to bypass. This bypass is only possible if the file is smaller than build.assetsInlineLimit (default: 4kB) and when using Vite 6.0+. Only apps explicitly exposing the Vite dev server to the network (using --host or server.host config option) are affected. This vulnerability is fixed in 4.5.12, 5.4.17, 6.0.14, 6.1.4, and 6.2.5.
来源:美国国家漏洞数据库 NVD
CVSS信息
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N
来源:美国国家漏洞数据库 NVD
漏洞类别
信息暴露
来源:美国国家漏洞数据库 NVD
漏洞标题
Vite 安全漏洞
来源:中国国家信息安全漏洞库 CNNVD
漏洞描述信息
Vite是Vite开源的一种新型的前端构建工具。 Vite存在安全漏洞,该漏洞源于任意文件内容可返回浏览器,可能导致绕过限制。
来源:中国国家信息安全漏洞库 CNNVD
CVSS信息
N/A
来源:中国国家信息安全漏洞库 CNNVD
漏洞类别
其他
来源:中国国家信息安全漏洞库 CNNVD
二、漏洞 CVE-2025-31486 的公开POC
# POC 描述 源链接 神龙链接
1 Vite任意文件读取漏洞批量检测脚本CVE-2025-31486 https://github.com/iSee857/CVE-2025-31486-PoC POC详情
2 CVE-2025-31486 poc https://github.com/Ly4j/CVE-2025-31486 POC详情
3 None https://github.com/hackmelocal/CVE-2025-31486-Simulation POC详情
三、漏洞 CVE-2025-31486 的情报信息
  • 标题: `server.fs.deny` bypassed with `.svg` or relative paths · Advisory · vitejs/vite · GitHub -- 🔗来源链接

    标签: x_refsource_CONFIRM

    神龙速读
  • 标题: fix: fs check with svg and relative paths (#19782) · vitejs/vite@62d7e81 · GitHub -- 🔗来源链接

    标签: x_refsource_MISC

    神龙速读
  • 标题: vite/packages/vite/src/node/plugins/asset.ts at 037f801075ec35bb6e52145d659f71a23813c48f · vitejs/vite · GitHub -- 🔗来源链接

    标签: x_refsource_MISC

    神龙速读
  • https://nvd.nist.gov/vuln/detail/CVE-2025-31486
四、漏洞 CVE-2025-31486 的评论

暂无评论


发表评论