
CVE-2026-8836 — lwIP SNMPv3 stack-based buffer overflow PoC (CVSS 9.8)
Proof of concept exploit for CVE-2026-8836, a critical stack-based buffer overflow in lwIP's SNMPv3 USM handler.
snmp_parse_inbound_frame() in src/apps/snmp/snmp_msg.csnmp_asn1_dec_raw()msg_authentication_parameters[12] (SNMP_V3_MAX_AUTH_PARAM_LENGTH = 12)LWIP_SNMP_V3 enabledhttps://www.hunt-benito.com/blog/lwip-snmpv3-stack-overflow-cve-2026-8836-critical-embedded-rce/
python exploit.py --target 192.168.1.100 --port 161 --overflow-size 256
python exploit.py --target 192.168.1.100 --overflow-size 4096 --payload-file shellcode.bin
python exploit.py --target 192.168.1.100 --count 10 --delay 0.5
The exploit constructs a valid SNMPv3 message with an oversized msgAuthenticationParameters OCTET STRING in the USM security parameters. The TLV length is set to a value larger than 12 bytes (the actual buffer size), which bypasses the internal bounds check because the vulnerable code passes tlv.value_len as both the read length and the buffer maximum length.
This tool is provided for authorized security research and educational purposes only. Unauthorized use against systems you do not own or have explicit permission to test is illegal. The authors assume no liability and are not responsible for any misuse or damage caused by this tool.