Buffer overflow in D-Link products - CVE-2016-5681

 

Buffer overflow in D-Link products - CVE-2016-5681

Published: August 12, 2016


Vulnerability identifier: #VU307
CSH Severity: High
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P/U:Amber
CVE-ID: CVE-2016-5681
CWE-ID: CWE-119
Exploitation vector: Remote access
Exploit availability: No public exploit available
Vendor: D-Link
Affected software:
DIR-850L
DIR-822
DIR-823
DIR-895L
DIR-890L
DIR-885L
DIR-880L
DIR-868L
DIR-817L(W)
DIR-818L(W)

Detailed vulnerability description

The vulnerability allows a remote attacker to execute arbitrary code on the target device.

The vulnerability exists due to a boundary error in cgibin binary, intended to handle session cookie. This binary is called from different parts of D-Link web interface, including the service, exposed through the WAN network interface on port 8181/TCP. A remote attacker can send a specially crafted "uid" cookie via the HTTP POST request to "/dws/api/Login" login page, cause buffer overflow and execute arbitrary code on the target system.

Successful exploitation of this vulnerability may allow an attacker to obtain full access to vulnerable device and use it to gain access to local network.


How to mitigate CVE-2016-5681

The vulnerability was fixed in the flowing firmware. Please, install the latest version of firmware:

  • DIR-850L Rev. B1 Official FW v2.07 (v2.07WWB05)
  • DIR-817 Rev. Ax Official FW End Aug. 2016
  • DIR-818L Rev. Bx Beta FW v2.05b03beta03  End Aug. 2016
  • DIR-822 Rev. A1 Official FW v3.01 (v3.01WWb02)
  • DIR-823 Rev. A1 Official FW v1.00 (v1.00WWb05)
  • DIR-895L Rev. A1 Official FW v1.11 (v1.11WWb04)
  • DIR-890L Rev  A1 Official FW v1.09 (v1.09b14)
  • DIR-885L Rev. A1 Official FW v1.11 (v1.11WWb07)
  • DIR-880L Rev. A1 Official FW v1.07 (v1.07WWb08)
  • DIR-868L Rev. B1 Official FW v2.03 (v2.03WWb01)
  • DIR-868L Rev. C1 Official FW v3.00 (v3.00WWb01)

Sources