Share
## https://sploitus.com/exploit?id=B7604C61-D026-583D-9B02-02F2DC5A2D61
# CVE-2025-31125 Exploit - Vite WASM Import Path Traversal ๐Ÿ›ก๏ธ

This script is a **proof-of-concept (PoC)** exploit for **CVE-2025-31125**, a vulnerability found in **Vite**. The exploit leverages a **WASM Import Path Traversal** issue to retrieve sensitive files from vulnerable servers running the Vite framework. It allows attackers to access files like `/etc/passwd`, `/etc/shadow`, `/etc/hosts`, and other sensitive files exposed by the server. โš ๏ธ

---

## ๐Ÿšจ **Disclaimer**

This tool is **for educational purposes only** and **should only be used on systems you own or have explicit permission to test**. **Unauthorized access to systems is illegal** and can result in legal consequences. **Use this tool responsibly**! โš–๏ธ

---

## โœจ Features

- Exploits **Vite WASM Import Path Traversal** vulnerability (CVE-2025-31125). ๐Ÿš€
- Extracts and decodes **embedded base64 WASM** content from vulnerable servers. ๐Ÿ“œ
- Supports multiple file paths, including `/etc/passwd`, `/etc/shadow`, and more! ๐Ÿ’ป
- Test multiple URLs from a **file** containing one URL per line. ๐Ÿ—‚๏ธ
- **SSL certificate verification** can be disabled for testing environments. ๐Ÿ”
- Custom path traversal for different file paths on vulnerable servers. ๐Ÿ› ๏ธ

---

## ๐Ÿ–ฅ๏ธ Requirements

- Python 3.6 or higher ๐Ÿ
- `requests` library ๐Ÿ“ฆ
- `urllib3` library ๐Ÿ”’
- `toilet` (optional, for banner) ๐ŸŽจ

### Install Python dependencies:

```bash
pip3 install -r requirements.txt
````

To install `toilet` (optional for banner) on your system:

* On **Ubuntu/Debian**: `sudo apt install toilet`
* On **MacOS**: `brew install toilet`

---

## ๐Ÿš€ Installation

1. Clone the repository to your local machine:

```bash
git clone https://github.com/0xgh057r3c0n/CVE-2025-31125.git
cd CVE-2025-31125
```

2. Install required Python dependencies:

```bash
pip3 install -r requirements.txt
```

---

## ๐Ÿ’ป Usage

To use the script, provide either a **single target URL** using `-u` or a **file with multiple target URLs** using `-f`.

### Available Arguments:

* `-u, --url`: Target a **single** URL. ๐ŸŒ
* `-f, --file`: Provide a file with a list of target URLs (one per line). ๐Ÿ“„
* `--path`: Specify the **path** to exploit (e.g., `/etc/passwd`, `/etc/shadow`). Default is `/etc/passwd`. ๐Ÿ› ๏ธ
* `--no-verify`: Disable **SSL verification** (useful for self-signed certificates). ๐Ÿ”’

### Examples:

#### Single Target with Default Path (`/etc/passwd`)

```bash
python3 exploit.py -u https://example.com --no-verify
```

#### Single Target with Custom Path (`/etc/shadow`)

```bash
python3 exploit.py -u https://example.com --no-verify --path /etc/shadow
```

#### Multiple Targets from File with Default Path (`/etc/passwd`)

```bash
python3 exploit.py -f targets.txt --no-verify
```

#### Multiple Targets from File with Custom Path (`/etc/hosts`)

```bash
python3 exploit.py -f targets.txt --no-verify --path /etc/hosts
```

---

## ๐Ÿ“ž Contact Info

๐Ÿ™‹โ€โ™‚๏ธ **Contact (For Collaboration, Research & Cybersecurity Discussions):**

* ๐Ÿ“ž **Phone**: +91 8876072154
* ๐Ÿ“ง **Email**: [gauravbhattacharjee54@gmail.com](mailto:gauravbhattacharjee54@gmail.com)
* ๐Ÿ”— **LinkedIn**: [Gaurav Bhattacharjee](https://www.linkedin.com/in/gaurav-bhattacharjee/)
* ๐Ÿ™ **GitHub**: [0xgh057r3c0n](https://github.com/0xgh057r3c0n)
* ๐ŸŒ **Portfolio**: [https://0xgh057r3c0n.github.io/portfolio/](https://0xgh057r3c0n.github.io/portfolio/)

---

## ๐Ÿ“ License

This project is licensed under the **MIT License**. ๐ŸŒŸ

---

## ๐Ÿ–ผ๏ธ Logo

![Logo](logo.png)

---

### โš ๏ธ **Important Note:**

* **Use this tool responsibly** only on authorized targets.
* **Unauthorized access to networks or systems is illegal.** ๐Ÿ”ด
* This tool is **for educational purposes only**.

---