QNAP NAS Malware Remover Command Injection Privilege Escalation Vulnerability
The Malware Remover application on QNAP NAS builds a system call from a user-supplied string, so a crafted TAR file placed in the file system can trigger command execution. An authenticated local attacker could use this to escalate privileges and run code as the admin user.
This vulnerability allows local attackers to escalate privileges on affected installations of QNAP NAS. Authentication is required to exploit this vulnerability.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the application passes a user-supplied string into a shell command without sanitising it, allowing command injection.
Impact
An authenticated local attacker could escalate privileges and execute arbitrary code in the context of the admin user.
What the attacker needed
Local access to the NAS; valid authentication
The fix
QNAP issued an update to correct the vulnerability.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A system call is a request from a program to the operating system, and here part of that request is built from text the attacker controls. Because the program does not separate the attacker's text from the command properly, the attacker can slip in extra commands of their own. This lets someone who already has a login on the device run code with the admin user's powers.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.