CVE-2025-3785 Overview
CVE-2025-3785 is a stack-based buffer overflow in the D-Link DWR-M961 router running firmware version 1.1.36. The flaw resides in the /boafrm/formStaticDHCP endpoint exposed by the device's Authorization Interface. An authenticated remote attacker can trigger the overflow by supplying an oversized Hostname argument to the vulnerable handler. Public disclosure of the exploit details increases the risk of opportunistic abuse against exposed devices. D-Link has released firmware version 1.1.49 to address the issue. The vulnerability is tracked under [CWE-119] (Improper Restriction of Operations within the Bounds of a Memory Buffer).
Critical Impact
Remote attackers with low-privileged access can corrupt stack memory on the DWR-M961, leading to denial of service or potential arbitrary code execution on the router.
Affected Products
- D-Link DWR-M961 hardware device
- D-Link DWR-M961 firmware version 1.1.36
- Configurations exposing the /boafrm/formStaticDHCP endpoint via the Authorization Interface
Discovery Timeline
- 2025-04-18 - CVE-2025-3785 published to the National Vulnerability Database (NVD)
- 2025-07-16 - Last updated in the NVD database
Technical Details for CVE-2025-3785
Vulnerability Analysis
The vulnerability exists in the boa web server component used by the DWR-M961 firmware. The handler bound to /boafrm/formStaticDHCP processes static DHCP reservation requests submitted through the device's administrative web interface. When the handler copies the user-supplied Hostname parameter into a fixed-size stack buffer, it does not enforce a length check on the input. Supplying an overly long Hostname value overwrites adjacent stack memory, including saved return addresses and frame pointers. The flaw is reachable over the network from any client that can authenticate to the management interface. Successful exploitation can crash the boa process, disrupt router availability, or be chained with additional primitives to achieve code execution on the MIPS-based device.
Root Cause
The root cause is missing bounds validation on the Hostname argument before it is copied into a stack-allocated buffer in the formStaticDHCP request handler. The handler relies on unsafe string-copy operations rather than length-bounded variants, mapping to [CWE-119]. Attacker-controlled data therefore writes past the buffer boundary into adjacent stack frames.
Attack Vector
Exploitation requires network reachability to the router's management interface and valid low-privileged credentials. The attacker submits a crafted POST request to /boafrm/formStaticDHCP with an oversized Hostname field. Because the management interface is sometimes exposed on the WAN side, attackers can reach the endpoint without first compromising the local network. Public references for technical details include the GitHub CVE documentation and the VulDB CVE analysis.
No verified proof-of-concept code is reproduced here. Review the GitHub CVE documentation for request structure and parameter details.
Detection Methods for CVE-2025-3785
Indicators of Compromise
- HTTP POST requests to /boafrm/formStaticDHCP containing abnormally long Hostname values, often hundreds or thousands of bytes
- Repeated crashes, reboots, or watchdog resets of the boa web server on DWR-M961 devices
- Unexpected outbound connections originating from the router shortly after suspicious management requests
- Unauthorized changes to static DHCP reservations or device configuration
Detection Strategies
- Inspect router and gateway access logs for requests to /boafrm/formStaticDHCP with Hostname parameter lengths exceeding the protocol-reasonable limit of 64 characters
- Deploy IDS/IPS signatures that flag HTTP form submissions to formStaticDHCP carrying oversized fields
- Correlate authentication events against the router admin interface with subsequent buffer-overflow indicators
Monitoring Recommendations
- Forward router syslog and HTTP access logs to a centralized SIEM for retention and behavioral analysis
- Alert on management-interface exposure to untrusted networks, including WAN-facing access to /boafrm/ paths
- Track firmware version inventory across deployed DWR-M961 units to flag any device still running 1.1.36
How to Mitigate CVE-2025-3785
Immediate Actions Required
- Upgrade DWR-M961 firmware from 1.1.36 to version 1.1.49 or later as released by D-Link
- Disable WAN-side access to the router's management interface and restrict administration to a trusted internal VLAN
- Rotate administrative credentials on the device after patching, since prior credential exposure cannot be ruled out
- Audit static DHCP reservations and other configuration entries for unauthorized changes
Patch Information
D-Link released firmware 1.1.49, which resolves the stack-based buffer overflow in the formStaticDHCP handler. Administrators should download the update from the D-Link official site and apply it to every affected DWR-M961 unit. Confirm the running version after the upgrade and reboot the device to ensure the new firmware is fully loaded.
Workarounds
- Restrict access to /boafrm/formStaticDHCP and other management URLs using firewall rules limiting source IPs to administrative hosts
- Place affected routers behind an upstream firewall that blocks unsolicited inbound HTTP/HTTPS traffic to the management port
- Enforce strong, unique credentials and account lockout policies on the management interface to slow credentialed exploitation attempts
# Example: restrict management-interface access at an upstream firewall (iptables)
iptables -A FORWARD -p tcp -d <router_ip> --dport 80 -s <admin_subnet> -j ACCEPT
iptables -A FORWARD -p tcp -d <router_ip> --dport 443 -s <admin_subnet> -j ACCEPT
iptables -A FORWARD -p tcp -d <router_ip> --dport 80 -j DROP
iptables -A FORWARD -p tcp -d <router_ip> --dport 443 -j DROP
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

