CVE-2016-5681: Stack-based Buffer Overflow in D-Link dws/api/Login Session Cookie Handling
- Vendor
- D-Link
CVE-2016-5681 is a stack-based buffer overflow in the dws/api/Login component of multiple D-Link router models. According to the provided content, affected devices include DIR-850L B1 2.07 before 2.07WWB05, DIR-817 Ax, DIR-818LW Bx before 2.05b03beta03, DIR-822 C1 3.01 before 3.01WWb02, DIR-823 A1 1.00 before 1.00WWb05, DIR-895L A1 1.11 before 1.11WWb04, DIR-890L A1 1.09 before 1.09b14, DIR-885L A1 1.11 before 1.11WWb07, DIR-880L A1 1.07 before 1.07WWb08, DIR-868L B1 2.03 before 2.03WWb01, and DIR-868L C1 3.00 before 3.00WWb01. The flaw is triggered via an overly long session cookie supplied to the login API, causing unsafe copying into a fixed-size stack buffer and enabling memory corruption.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Successful exploitation allows a remote attacker to execute arbitrary code on the vulnerable router. In practice, this can result in full device compromise, malware installation, persistent backdoor deployment, traffic interception or manipulation, use of the router as a proxy or reconnaissance node, and follow-on attacks against internal networks traversing the device.
Mitigation
If you can’t patch tonight, do this now.
Where immediate patching or replacement is not possible, reduce exposure by disabling remote administration, restricting access to the management interface to trusted internal networks only, filtering untrusted inbound access to the router management plane, and monitoring for signs of compromise. Given the age and end-of-life status of many affected devices, isolation or retirement is preferable. The provided context also indicates that replacement of unsupported routers is often the only reliable long-term mitigation.
Remediation
Patch, then assume compromise.
Upgrade affected D-Link devices to fixed firmware versions identified by the vendor. Based on the provided content, vulnerable versions are those prior to the listed patched builds, including for example DIR-850L B1 before 2.07WWB05, DIR-818LW Bx before 2.05b03beta03, DIR-822 C1 before 3.01WWb02, DIR-823 A1 before 1.00WWb05, DIR-895L A1 before 1.11WWb04, DIR-890L A1 before 1.09b14, DIR-885L A1 before 1.11WWb07, DIR-880L A1 before 1.07WWb08, DIR-868L B1 before 2.03WWb01, and DIR-868L C1 before 3.00WWb01. If the device is end-of-life and no supported firmware is available, replacement with a supported model is the most reliable remediation.
Exploits
No public exploits tracked yet. Mallory keeps watching.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
References
Frequently asked questions
- Is CVE-2016-5681 exploited in the wild?
- Yes. As of Oct 16, 2026, Mallory has reports of exploitation in the wild.
- Is there a public exploit for CVE-2016-5681?
- As of Oct 16, 2026, Mallory has found no public exploit for CVE-2016-5681.
- Is there a patch for CVE-2016-5681?
- Upgrade affected D-Link devices to fixed firmware versions identified by the vendor. Based on the provided content, vulnerable versions are those prior to the listed patched builds, including for example DIR-850L B1 before 2.07WWB05, DIR-818LW Bx before 2.05b03beta03, DIR-822 C1 before 3.01WWb02, DIR-823 A1 before 1.00WWb05, DIR-895L A1 before 1.11WWb04, DIR-890L A1 before 1.09b14, DIR-885L A1 before 1.11WWb07, DIR-880L A1 before 1.07WWb08, DIR-868L B1 before 2.03WWb01, and DIR-868L C1 before 3.00WWb01.
- What products are affected by CVE-2016-5681?
- D-Link Dir-817l(W) Firmware, D-Link Dir-818l(W) Firmware, D-Link Dir-822 Firmware, D-Link Dir-823 Firmware, D-Link Dir-850l Firmare, and 5 more.
- How severe is CVE-2016-5681?
- CVE-2016-5681 has a CVSS v3.1 score of 9.8 (Critical) and an EPSS score of 11.9% (96th percentile) as of Oct 16, 2026.
Recent activity
15 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.