#VU3080 Heap-based buffer overflow in QNAP QTS


Published: 2017-01-02 | Updated: 2020-07-06

Vulnerability identifier: #VU3080

Vulnerability risk: High

CVSSv3.1: 9 [CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H/E:P/RL:O/RC:C]

CVE-ID: N/A

CWE-ID: CWE-119

Exploitation vector: Network

Exploit availability: No

Vulnerable software:
QNAP QTS
Server applications / File servers (FTP/HTTP)

Vendor: QNAP Systems, Inc.

Description

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

The vulnerability exists due to a boundary error within QNAP web management interface when processing overly long string passed via "p" HTTP GET parameter to /cgi-bin/cgi.cgi binary. A remote attacker can send a specially crafted HTTP GET request, containing name of valid user account and overly long password, cause heap-based buffer overflow and execute arbitrary code on vulnerable system.

Successful exploitation of the vulnerability results in compromise of vulnerable system.

Exploitation example:

echo -en "GET /cgi-bin/cgi.cgi?u=admin&p=`for((i=0;i<263;i++));do echo -en "A";done` HTTP/1.0\nHost: QNAP\n\n" | ncat --ssl 192.168.5.7 443

Mitigation
Install update from vendor's website.

Vulnerable software versions

QNAP QTS: 4.1.4, 4.2.2


External links
http://www.securityfocus.com/archive/1/539978


Q & A

Can this vulnerability be exploited remotely?

Yes. This vulnerability can be exploited by a remote non-authenticated attacker via the Internet.

Is there known malware, which exploits this vulnerability?

No. We are not aware of malware exploiting this vulnerability. However, proof of concept for this vulnerability is available.


Latest bulletins with this vulnerability