D-Link DIR-823G HNAP1 Stack-Based Buffer Overflow (SetStaticRouteSettings)
First seen Sep 15, 2026 · Updated Sep 15, 2026 · CVSS 9.9
A critical stack-based buffer overflow exists in the D-Link DIR-823G router firmware (1.0.2B05_20181207), triggered via the strcpy function handling the PAddress, SubnetMask, and Gateway parameters in the SetStaticRouteSettings HNAP1 endpoint. The vulnerability is remotely exploitable without complex prerequisites and carries a near-maximum CVSS score of 9.9, likely enabling remote code execution or denial of service on the device.
Technical Analysis
The flaw resides in the HNAP1 SOAP-based management interface of the DIR-823G, specifically within the /HNAP1/SetStaticRouteSettings handler, where unsanitized input from the PAddress, SubnetMask, and Gateway parameters is copied into a fixed-size stack buffer using strcpy, allowing an attacker to overwrite stack memory and control execution flow. Because HNAP1 endpoints are often exposed on the LAN and in some misconfigured deployments on the WAN interface, remote unauthenticated or low-privilege attackers could send crafted HTTP requests to trigger the overflow and achieve arbitrary code execution or router crash/denial of service. This class of vulnerability is consistent with historical D-Link HNAP1 flaws that have been mass-exploited by IoT botnets (e.g., Mirai-derivative malware) for initial access and lateral movement. Organizations running AI agent infrastructure behind or reliant on such consumer/SMB-grade routers face indirect risk: compromise of the router could enable traffic interception, DNS hijacking, or man-in-the-middle attacks against agent-to-API or RAG pipeline traffic, potentially exposing credentials, API keys, or tool-call data transiting the network.
Affected Systems
D-Link DIR-823G router, firmware version 1.0.2B05_20181207, HNAP1 management interface component
Indicators of Compromise
- No specific IOCs published; monitor for anomalous HTTP POST requests to /HNAP1/SetStaticRouteSettings with oversized PAddress, SubnetMask, or Gateway parameter values
Remediation Steps
- 1
Apply Firmware Update
Check D-Link's support site for a patched firmware release for the DIR-823G addressing this HNAP1 vulnerability and apply it immediately.
- 2
Disable Remote/WAN Management
Ensure the HNAP1 interface and general router administration are not exposed to the WAN; restrict management access to trusted LAN devices only.
- 3
Network Segmentation
Segment IoT and network infrastructure devices from critical systems, including hosts running AI agents or RAG pipelines, to limit blast radius if the router is compromised.
- 4
Monitor and Filter HNAP1 Traffic
Deploy IDS/IPS signatures or firewall rules to detect and block malformed HNAP1 SetStaticRouteSettings requests.
- 5
Replace End-of-Life Hardware
If no patch is available and the device is end-of-life, plan replacement with actively supported network hardware.
CVE / Advisory IDs
Industries Most Exposed
Respond to this threat
Pro subscribers get a full AI-generated incident-response playbook for this threat — detection, containment, eradication, and recovery steps — plus an unlimited AI Threat Advisor for questions about your environment.