QNAP QTS NASFTPD USER Stack-based Buffer Overflow Remote Code Execution Vulnerability

2017-12-20T00:00:00
ID ZDI-17-1002
Type zdi
Reporter Peter Andersson (@nervoir)
Modified 2017-06-22T00:00:00

Description

This vulnerability allows remote attackers to execute arbitrary code on vulnerable installations of QNAP QTS NASFTPD. Authentication is not required to exploit this vulnerability. The specific flaw exists within the NASFTPD service, which listens on TCP port 21 by default. When parsing the USER command, the process does not properly validate the length of user-supplied data prior to copying it to a fixed-length stack-based buffer. An attacker can leverage this vulnerability to execute code under the context of root.