Skip to content
RCE Advisory Advanced

(Pwn2Own) QNAP TS-464 qnap_exec Command Injection Privilege Escalation Vulnerability

The qnap_exec function on QNAP TS-464 devices fails to validate a user-supplied string before passing it to a system call, allowing command injection. An attacker who can bypass the existing authentication mechanism could escalate privileges to resources normally protected from the user.

Corentin " " BAYET Follow

Originally disclosed on Zero Day Initiative

High 7.5 View original

This vulnerability allows remote attackers to escalate privileges on affected installations of QNAP TS-464 devices. Although authentication is required to exploit this vulnerability, the existing authentication mechanism can be bypassed.

Corentin "@OnlyTheDuck" BAYET from REverse Tactics, on the Zero Day Initiative

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 qnap_exec function builds a system command from unvalidated user-supplied input, allowing injected commands to run.

Impact

An attacker could escalate privileges on affected devices, though authentication is required and the existing authentication mechanism can be bypassed.

What the attacker needed

Affected QNAP TS-464 device; authentication bypass

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 when a program asks the operating system to run something, and here part of that request comes from user input without being checked. Because the input is not cleaned, an attacker can slip in extra commands that the device then runs with higher privileges. The result is that someone who should be limited can reach protected parts of the system.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by Corentin " " BAYET

View all

4 more disclosed reports, best first.

More from Zero Day Initiative

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.