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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2025-31161 PoC — CrushFTP 安全漏洞

Source
Associated Vulnerability
Title:CrushFTP 安全漏洞 (CVE-2025-31161)
Description:CrushFTP 10 before 10.8.4 and 11 before 11.3.1 allows authentication bypass and takeover of the crushadmin account (unless a DMZ proxy instance is used), as exploited in the wild in March and April 2025, aka "Unauthenticated HTTP(S) port access." A race condition exists in the AWS4-HMAC (compatible with S3) authorization method of the HTTP component of the FTP server. The server first verifies the existence of the user by performing a call to login_user_pass() with no password requirement. This will authenticate the session through the HMAC verification process and up until the server checks for user verification once more. The vulnerability can be further stabilized, eliminating the need for successfully triggering a race condition, by sending a mangled AWS4-HMAC header. By providing only the username and a following slash (/), the server will successfully find a username, which triggers the successful anypass authentication process, but the server will fail to find the expected SignedHeaders entry, resulting in an index-out-of-bounds error that stops the code from reaching the session cleanup. Together, these issues make it trivial to authenticate as any known or guessable user (e.g., crushadmin), and can lead to a full compromise of the system by obtaining an administrative account.
Description
🛡️ CVE-2025-31161 - CrushFTP User Creation Authentication Bypass Exploit
Readme
# CVE-2025-31161 - CrushFTP User Creation Authentication Bypass Exploit

![CrushFTP Logo](https://www.crushftp.com/assets/img/logo/logo.png)

## 📌 Description

This Python exploit targets **CrushFTP** servers vulnerable to **CVE-2025-31161**. The vulnerability allows **unauthenticated user account creation** by sending a crafted XML payload to the WebInterface, potentially resulting in full server compromise.

---

## ⚠️ Disclaimer

> **This tool is intended for educational and authorized security testing only.**  
> Unauthorized use against systems you do not own or have explicit permission to test is **illegal** and unethical.

---

## 🧰 Requirements

- Python 3
- pip3
- Python modules:
  - `requests`
  - `colorama`

### ✅ Install Python3 and pip3

**Debian/Ubuntu:**

```bash
sudo apt update
sudo apt install python3 python3-pip -y
````

**CentOS/RHEL:**

```bash
sudo yum install python3 python3-pip -y
```

**macOS (with Homebrew):**

```bash
brew install python3
```

### ✅ Install Python dependencies

```bash
pip3 install requests colorama
```

---

## 🔧 Usage

```bash
python3 CVE-2025-31161.py --target_host <TARGET_IP> [--port <PORT>] [--target_user <ADMIN>] [--new_user <USERNAME>] [--password <PASSWORD>]
```

### 🔍 Example

```bash
python3 CVE-2025-31161.py --target_host 192.168.1.100 --new_user backdoor --password P@ssw0rd!
```

---

## 🧪 Command-Line Options

| Argument        | Description                           | Default Value               |
| --------------- | ------------------------------------- | --------------------------- |
| `--target_host` | **(Required)** IP or domain of target | —                           |
| `--port`        | Port of CrushFTP WebInterface         | `8080`                      |
| `--target_user` | Admin username (used in payload)      | `crushadmin`                |
| `--new_user`    | Username for new unauthorized account | `AuthBypassAccount`         |
| `--password`    | Password for the new user             | `CorrectHorseBatteryStaple` |

---

## 🖥️ Sample Output

```
[+] Preparing Payloads
  [-] Warming up the target...
  [-] Target is up and running
[+] Sending Account Create Request
  [!] User created successfully!

[+] Exploit Complete! You can now login with:
   [*] Username: AuthBypassAccount
   [*] Password: CorrectHorseBatteryStaple
```

---

## 👨‍💻 Author

**Gaurav Bhattacharjee** (`G4UR4V007`)

---

## 📄 License

This project is licensed under the [MIT License](https://github.com/0xgh057r3c0n/CVE-2025-31161/blob/main/LICENSE).
---
File Snapshot

[4.0K] /data/pocs/8f3c3fb2569ca696f04e0431e371aefd8592bed4 ├── [5.5K] CVE-2025-31161.py ├── [2.5K] CVE-2025-31161.yaml ├── [1.1K] LICENSE └── [2.5K] 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 →