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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2025-54574 PoC — Squid 安全漏洞

Source
Associated Vulnerability
Title:Squid 安全漏洞 (CVE-2025-54574)
Description:Squid是Squid开源的一套代理服务器和Web缓存服务器软件。该软件提供缓存万维网、过滤流量、代理上网等功能。 Squid 6.3及之前版本存在安全漏洞,该漏洞源于处理URN时存在堆缓冲区溢出,可能导致远程代码执行。
Description
CVE-2025-54574
Readme
# 🛑 CVE-2025-54574 — Heap Buffer Overflow in Squid (≤ 6.3) 🛑

**Severity:** Critical (CVSS 9.3)
**Affected Software:** Squid Proxy (versions 6.3 and earlier)
**Vulnerability Type:** Heap-based buffer overflow
**Discovered in:** URN (Uniform Resource Name) processing
**Impact:** Possible **remote code execution** or **denial-of-service**, exploitable over the network with **no authentication required**

---

### 🔍 What’s the issue?

The flaw occurs during how Squid parses URN responses. Improper memory handling leads to heap overflows, meaning a malicious HTTP response could corrupt memory, potentially letting an attacker crash Squid or run arbitrary code.

---

### ✅ How to Fix It

* **Upgrade to Squid 6.4** or later. This version patches the vulnerability.
* **As a temporary mitigation**, you can **disable URN access** in your Squid configuration.

---

### 🧯 Risk Breakdown

| Metric              | Detail                      |
| ------------------- | --------------------------- |
| Attack Vector       | Remote (over network)       |
| Attack Complexity   | Low                         |
| Privileges Required | None                        |
| User Interaction    | None                        |
| Scope               | Changed (can affect system) |
| Confidentiality     | Not impacted                |
| Integrity           | Limited impact              |
| Availability        | High impact (DoS possible)  |

---

### 🕒 Timeline

* **Vulnerability announced:** August 1, 2025
* **Patch released in:** Squid 6.4 (released late July 2025)

---

### 🛡 What Should You Do?

1. **Check your current Squid version**. If you’re on 6.3 or earlier, upgrade immediately.
2. If you cannot upgrade right away, **disable URN handling** in Squid’s ACL or configuration.
3. Keep your operating system's package manager up to date — patched versions may already be available.
4. Review proxy logs for unusual behavior or exploitation attempts targeting URNs.

---

To use your `CVE-2025-54574.sh` script safely and effectively on a Linux system (like Kali), follow these steps:

---

## ✅ **How to Use the Script**

### 1. **Save the Script**

If you haven’t already saved it, create the script file:

```bash
nano CVE-2025-54574.sh
```

Paste your script into the editor, then save with `CTRL+O`, `Enter`, and exit with `CTRL+X`.

---

### 2. **Make It Executable**

Give the script permission to run:

```bash
chmod +x CVE-2025-54574.sh
```

---

### 3. **Run the Script as Root**

Because it modifies `/etc/squid/squid.conf` and restarts services, you must run it with `sudo` or as root:

```bash
sudo ./CVE-2025-54574.sh
```

### What it does:

* Checks if your installed **Squid version ≤ 6.3**
* If vulnerable:

  * Backs up your config file (`/etc/squid/squid.conf.bak`)
  * Adds rules to block URN access
  * Restarts Squid to apply changes

---

## 🧪 Optional: Test After Running

### Check if Squid is running correctly:

```bash
sudo systemctl status squid
```

### Look for syntax errors in the config (optional but good practice):

```bash
sudo squid -k parse
```

---

## 🔄 Optional: Revert Changes

If you want to **undo** the script's changes, restore the backup config:

```bash
sudo cp /etc/squid/squid.conf.bak /etc/squid/squid.conf
sudo systemctl restart squid
```

---

## 📝 Notes:

* Works only if your config is in `/etc/squid/squid.conf` (default path). If it’s somewhere else, update the script.
* Make sure `bc` is installed (used for version comparison). Install with:

```bash
sudo apt install bc
```

---


## ⚠️ Disclaimer !!!

+ This script and accompanying information are provided “as is” without any warranties or guarantees. Use this material at your own risk. The author(s) assume no responsibility for any damage, data loss, or service interruptions that may result from running or modifying this script.

+ It is strongly recommended to test all changes in a controlled environment before deploying to production. Always review configuration changes thoroughly and back up your data and settings prior to applying any fixes or mitigations.
File Snapshot

[4.0K] /data/pocs/29274d01662935821681a711c33525c2738e0c0a ├── [1.2K] CVE-2025-54574.sh └── [4.0K] 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. If the original source is unavailable, please email f.jinxu#gmail.com for a local snapshot (replace # with @).
    3. Shenlong has snapshotted the POC code for you. To support long-term maintenance, please consider donating. Thank you for your support.