Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2025-30208 PoC — Vite bypasses server.fs.deny when using `?raw??`

Source
Associated Vulnerability
Title:Vite bypasses server.fs.deny when using `?raw??` (CVE-2025-30208)
Description:Vite, a provider of frontend development tooling, has a vulnerability in versions prior to 6.2.3, 6.1.2, 6.0.12, 5.4.15, and 4.5.10. `@fs` denies access to files outside of Vite serving allow list. Adding `?raw??` or `?import&raw??` to the URL bypasses this limitation and returns the file content if it exists. This bypass exists because trailing separators such as `?` are removed in several places, but are not accounted for in query string regexes. The contents of arbitrary files can be returned to the browser. Only apps explicitly exposing the Vite dev server to the network (using `--host` or `server.host` config option) are affected. Versions 6.2.3, 6.1.2, 6.0.12, 5.4.15, and 4.5.10 fix the issue.
Description
CVE-2025-30208 检测工具。python script && nuclei template
Readme
# CVE-2025-30208 检测工具

# 漏洞分析

[Vite 任意文件读取漏洞分析复现(CVE-2025-30208)](https://www.xaitx.com/tech/2025-03-26.html)

## 简介

本工具用于检测目标系统是否存在 **CVE-2025-30208** 漏洞。该漏洞允许攻击者通过特定路径读取服务器上的敏感文件(如 `/etc/passwd` 或 `C:\windows\win.ini`)。工具支持单个 URL 检测和批量检测,并可选使用 HTTP/HTTPS 代理。

这里介一下payload ?raw??和?import?raw??的关系。第一个payload适用于读取不带后缀的文件,第二个随意了。

---

## 功能特性

- **单目标检测**:通过命令行参数指定单个目标 URL 进行漏洞检测。
- **批量检测**:支持从文件中读取多个目标 URL 进行批量检测。
- **代理支持**:支持通过 HTTP/HTTPS 代理发送请求,便于调试或绕过网络限制。
- **跨平台支持**:同时检测 Linux 和 Windows 系统上的敏感文件。

---

## Nuclei 

payload是CVE-2025-30208.yaml,可以直接使用nuclei进行检测。也可以使用yakit进行检测。

模板来源是nuclei-templates,地址:https://github.com/projectdiscovery/nuclei-templates/pull/11828/files

## 使用方法

### 安装依赖

在运行工具之前,请确保已安装 Python 3 和 `requests` 库。如果未安装 `requests`,可以通过以下命令安装:

```bash
pip install requests
```

### 命令行参数

```bash
python cve_2025_30208_checker.py [-u URL | -f FILE] [-p PROXY]
```

#### 参数说明

| 参数      | 缩写 | 描述                                                                 |
|-----------|------|----------------------------------------------------------------------|
| `--url`   | `-u` | 指定单个目标 URL 进行漏洞检测。                                     |
| `--file`  | `-f` | 指定包含多个目标 URL 的文件路径,每行一个 URL。                     |
| `--proxy` | `-p` | 可选参数,指定 HTTP/HTTPS 代理地址(例如:`http://127.0.0.1:8080`)。 |

#### 示例

1. **单目标检测**

   ```bash
   python cve_2025_30208_checker.py -u http://example.com
   ```

![img.png](img.png)

2. **批量检测**

   创建一个包含目标 URL 的文件(例如 `targets.txt`),每行一个 URL:

   ```
   http://example1.com
   http://example2.com
   http://example3.com
   ```

   然后运行以下命令:

   ```bash
   python cve_2025_30208_checker.py -f targets.txt
   ```

3. **使用代理**

   如果需要通过代理发送请求,可以添加 `-p` 参数:

   ```bash
   python cve_2025_30208_checker.py -u http://example.com -p http://127.0.0.1:8080
   ```

---

## 输出结果

- 如果目标存在漏洞,工具会输出目标 URL 和读取到的敏感文件内容。
- 如果目标不存在漏洞,工具不会输出任何信息。
- 批量检测时,工具会逐行读取文件中的 URL 并输出检测结果。


## 注意事项

1. **合法性声明**  
   请确保您拥有对目标系统的合法授权。未经授权的漏洞检测可能违反相关法律法规。

2. **SSL 验证**  
   工具默认禁用 SSL 验证(`verify=False`),以避免因证书问题导致请求失败。如果需要启用 SSL 验证,请修改代码中的 `verify=False` 为 `verify=True`。

3. **代理配置**  
   如果使用代理,请确保代理服务正常运行,并根据实际情况调整代理协议(如 `http` 或 `socks5`)。

4. **文件格式**  
   在批量检测时,确保输入文件中的 URL 格式正确,且每行仅包含一个 URL。

---

## 贡献与反馈

如果您发现任何问题或希望改进此工具,请提交 Issue 或 Pull Request。我们欢迎任何形式的贡献!

---

## 免责声明

本工具仅供安全研究和合法授权的渗透测试使用。作者不对任何非法使用行为负责。请遵守相关法律法规。

---

希望这个模板能够满足您的需求!如果有其他要求,请随时告知。
File Snapshot

[4.0K] /data/pocs/19e284b45e13885f32d040cf99a4ea3104f49009 ├── [2.0K] CVE-2025-30208.py ├── [1.8K] CVE-2025-30208.yaml ├── [ 57K] img.png └── [3.9K] README.md 1 directory, 4 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →