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
Vite-CVE-2025-30208-EXP单目标检测,支持自定义读取路径,深度检索
Readme
# CVE-2025-30208 检测工具

## 漏洞分析

CVE-2025-30208是 Vite 开发服务器中的任意文件读取漏洞。攻击者可通过构造特殊路径(如 `@fs` 前缀)读取服务器敏感文件(如 `/etc/passwd` 或 `C:\windows\win.ini`)。本工具支持单目标检测、系统信息探测及深度环境分析,并提供代理功能以适配复杂网络环境。

---

## 功能特性

- **单目标检测**:通过命令行参数指定单个目标 URL 进行漏洞验证。
- **系统信息探测**:支持基础系统探测(操作系统类型、工作目录)和企业级深度检测(用户权限、Web服务配置、云环境指纹)。
- **代理支持**:支持通过 HTTP/HTTPS 代理发送请求,便于调试或绕过网络限制。
- **跨平台兼容**:支持检测 Linux 和 Windows 系统的敏感文件。
- **风险评级**:深度检测模式下自动生成风险报告及安全建议。

---

## 使用方法

### 安装依赖

确保已安装 Python 3 和 `requests` 库。安装命令:
```bash
pip install requests
```

### 命令行参数

```bash
python CVE-2025-30208.py -h
```

#### 参数说明

| 参数           | 缩写 | 必选 | 描述                                                                 |
|----------------|------|------|----------------------------------------------------------------------|
| `--url`        | `-u` | 是   | 目标 URL(例如:`http://127.0.0.1:5173`)                          |
| `--file-path`  | `-r` | 否   | 指定要读取的文件路径(如:`/etc/shadow`),未指定时使用默认路径检测。|
| `--info`       | `-i` | 否   | 启用基础系统信息探测(操作系统、工作目录等)。                      |
| `--deep`       | `-d` | 否   | 启用企业级深度检测(用户权限、Web配置、云环境指纹等)。             |
| `--proxy`      | `-p` | 否   | 指定 HTTP/HTTPS 代理地址(例如:`http://127.0.0.1:8080`)。         |

![image](https://github.com/user-attachments/assets/8c63bdc4-8420-467c-adba-130c72051822)

#### 示例

1. **基础检测(默认读取 `/etc/passwd` 或 `C:/windows/win.ini`)**
   ```bash
   python CVE-2025-30208.py -u http://example.com
   ```

2. **指定文件路径读取**
   ```bash
   python CVE-2025-30208.py -u http://example.com -r /etc/shadow
   ```

3. **启用基础系统探测**
   ```bash
   python CVE-2025-30208.py -u http://example.com -i
   ```

4. **启用深度检测并设置代理**
   ```bash
   python CVE-2025-30208.py -u http://example.com -d -p http://127.0.0.1:8080
   ```

---

## 输出说明

- **漏洞验证结果**  
  若存在漏洞,工具会显示读取的文件内容(前500字符)并标记为高危。
  ![检测结果示例]![image](https://github.com/user-attachments/assets/da860483-1099-4540-803c-d277cad527f4)


- **基础系统探测**  
  输出操作系统类型、工作目录、容器环境等信息。

- **深度检测报告**  
  生成企业级风险评级(低危/中危/高危),并列出敏感配置、SSH公钥、环境变量等详细信息。

---

## 注意事项

1. **合法性声明**  
   使用前需获得目标系统的合法授权。未经授权的测试可能违反法律法规。

---

## 免责声明

本工具仅限用于合法授权的安全测试。使用者需自行承担风险,作者不对任何滥用行为负责。

--- 

> 注意:实际使用时需确保符合当地法律法规,禁止未授权测试。
File Snapshot

[4.0K] /data/pocs/743382947fdde31a0456d353b6ab203632625308 ├── [ 11K] CVE-2025-30208.py └── [3.4K] README.md 0 directories, 2 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 →