Router vulnerability note - DrayTek
DrayTek Vigor2960: a stack overflow in the dataflow page
What happened
The newest entry on this site, published the day before we wrote it up. A function behind the traffic
and dataflow pages — dataflowstatus in the ever-present mainfunction.cgi —
copies an option argument into a stack buffer without the right bound. The exploit is published, the
score is 9.1, and DrayTek's answer in the advisory thread is the practical one: 1.5.1.6 is not the current version of
the 2960 anyway, and 1.5.1.7 is where you should be.
mainfunction.cgi deserves its own mention because it is the endpoint behind most Vigor CVEs of the
last eight years — CVE-2020-8515 unauthenticated root RCE, CVE-2020-15415 in the configuration upload,
CVE-2021-43118 via a malformed query string, CVE-2024-12987 above. One CGI program carrying the management plane is a
design choice, and it means that on a Vigor, updating the firmware and restricting the web interface are the same
control.
Who is affected
DrayTek Vigor2960 up to and including 1.5.1.6, with the management interface reachable.
Check it yourself
Version and reachability, both from the page you already have open
UI: System Status > Firmware Information
# v1.5.1.6 -> update to 1.5.1.7
UI: Internet Access > LAN/Internet? no: Administration > Router Access > Web Server/HTTP
$ curl -sk -o /dev/null -w '%{http_code}\n' https://<wan-ip>/main.cgi
# from the tunnel, while we are inside:
$ curl -sk https://10.44.9.2/cgi-bin/mainfunction.cgi | head -2
Do this
- Update to 1.5.1.7 and take a configuration backup before, from System Maintenance > File Management.
- Restrict the web interface to the LAN or to a named host; the dataflow page is not something a stranger needs.
- Reboot after the update and confirm the firmware string, because Vigors have been known to keep the old page.
- If you run multiple sites with identical Vigors, update one and watch it for a day before doing the rest.
How we handle it
This one is in our queue for the monitored Vigor sites and we already have the release note linked. If your 2960 is on the retainer, the update happens in a window and the report says what changed — which is the whole argument for the €99.