一、 漏洞 CVE-2025-58751 基础信息
漏洞信息
                                        # Vite 中间件可能泄露公共目录文件

## 概述

Vite 是一个用于 JavaScript 的前端开发框架。在特定版本之前存在一个安全问题,导致访问 `public` 目录中的文件时绕过 `server.fs` 的配置限制。

## 影响版本

受影响版本包括:

- Vite < 7.1.5
- Vite < 7.0.7
- Vite < 6.3.6
- Vite < 5.4.20

修复版本:

- Vite >= 7.1.5
- Vite >= 7.0.7
- Vite >= 6.3.6
- Vite >= 5.4.20

## 细节

当以下条件同时满足时,漏洞会被触发:

1. 应用使用了 `public` 目录功能(默认启用);
2. 在 `public` 目录中存在符号链接(symlink);
3. Vite 开发服务器被显式地暴露到网络上(通过使用 `--host` 命令行参数 或设置 `server.host` 配置项)。

在此情况下,攻击者可能通过构造特定请求绕过 `server.fs` 的安全限制,访问不应该被公开的文件。

## 影响

该漏洞可能导致敏感文件被非法访问,从而暴露不应对外公开的内部资源或配置信息。
                                        
提示
尽管我们采用了先进的大模型技术,但其输出仍可能包含不准确或过时的信息。
神龙会尽力确保数据准确,但也请结合实际情况进行甄别与判断。
神龙祝您一切顺利!
漏洞标题
Vite middleware may serve files starting with the same name with the public directory
来源:美国国家漏洞数据库 NVD
漏洞描述信息
Vite is a frontend tooling framework for JavaScript. Prior to versions 7.1.5, 7.0.7, 6.3.6, and 5.4.20, files starting with the same name with the public directory were served bypassing the `server.fs` settings. Only apps that explicitly expose the Vite dev server to the network (using --host or `server.host` config option), use the public directory feature (enabled by default), and have a symlink in the public directory are affected. Versions 7.1.5, 7.0.7, 6.3.6, and 5.4.20 fix the issue.
来源:美国国家漏洞数据库 NVD
CVSS信息
N/A
来源:美国国家漏洞数据库 NVD
漏洞类别
对路径名的限制不恰当(路径遍历)
来源:美国国家漏洞数据库 NVD
漏洞标题
Vite 访问控制错误漏洞
来源:中国国家信息安全漏洞库 CNNVD
漏洞描述信息
Vite是Vite开源的一种新型的前端构建工具。 Vite 7.1.5、7.0.7、6.3.6和5.4.20之前版本存在访问控制错误漏洞,该漏洞源于绕过server.fs设置的文件访问。
来源:中国国家信息安全漏洞库 CNNVD
CVSS信息
N/A
来源:中国国家信息安全漏洞库 CNNVD
漏洞类别
授权问题
来源:中国国家信息安全漏洞库 CNNVD
二、漏洞 CVE-2025-58751 的公开POC
# POC 描述 源链接 神龙链接
1 Vite is a frontend tooling framework for JavaScript. Prior to versions 7.1.5, 7.0.7, 6.3.6, and 5.4.20, files starting with the same name with the public directory were served bypassing the `server.fs` settings. Only apps that explicitly expose the Vite dev server to the network (using --host or `server.host` config option), use the public directory feature (enabled by default), and have a symlink in the public directory are affected. Versions 7.1.5, 7.0.7, 6.3.6, and 5.4.20 fix the issue. https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2025/CVE-2025-58751.yaml POC详情
三、漏洞 CVE-2025-58751 的情报信息
  • 标题: Files starting with the same name with the public directory were served · Advisory · vitejs/vite · GitHub -- 🔗来源链接

    标签: x_refsource_CONFIRM

    神龙速读
  • 标题: fix: do not serve file with dirname prefix · lukeed/sirv@f0113f3 · GitHub -- 🔗来源链接

    标签: x_refsource_MISC

    神龙速读
  • 标题: fix: upgrade sirv to 3.0.2 (#20735) · vitejs/vite@09f2b52 · GitHub -- 🔗来源链接

    标签: x_refsource_MISC

    神龙速读
  • 标题: fix: port sirv@3.0.2 changes to sirv@2.0.4 (#20737) · vitejs/vite@4f1c35b · GitHub -- 🔗来源链接

    标签: x_refsource_MISC

    神龙速读
  • 标题: fix: upgrade sirv to 3.0.2 (#20735) · vitejs/vite@63e2a5d · GitHub -- 🔗来源链接

    标签: x_refsource_MISC

    神龙速读
  • 标题: fix: upgrade sirv to 3.0.2 (#20735) · vitejs/vite@e11d240 · GitHub -- 🔗来源链接

    标签: x_refsource_MISC

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

暂无评论


发表评论