Skip to content
RCE Advisory Advanced

(Pwn2Own) QNAP TS-464 Samba Command Argument Injection Vulnerability

The Samba service on QNAP TS-464 devices fails to validate the username during authentication, allowing command-line argument injection. A network-adjacent attacker can combine this with other flaws to execute arbitrary code as admin.

YingMuo Follow

Originally disclosed on Zero Day Initiative

Medium 6.3 View original

This vulnerability allows network-adjacent attackers to execute arbitrary code on affected installations of QNAP TS-464 devices. Authentication is not required to exploit this vulnerability.

YingMuo (@YingMuo), working with DEVCORE Internship Program., 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 username string is passed to a command-line invocation without proper validation or escaping, enabling argument injection.

Impact

A network-adjacent attacker could execute arbitrary code as admin, but only in conjunction with other vulnerabilities.

What the attacker needed

Network-adjacent access; another vulnerability to chain

The fix

QNAP has issued an update to correct this 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.

When a program builds a command line from user input without checking it, an attacker can sneak in extra options or commands. Here, the username field in Samba authentication is used unsafely, so someone on the same network could inject arguments. This alone may not run code, but combined with another bug it can lead to full admin access.

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 YingMuo

View all

1 more disclosed report, 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.