CVE-2019-9859 Command injection in n/a

High 8.8 Published Updated

Authenticated attackers can achieve remote root access via command injection in VestaCP due to improper use of escapeshellarg.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2019-9859?

CVE-2019-9859 is a high-severity command injection vulnerability in n/a, published on 10 Mar 2020. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

Vesta Control Panel (VestaCP) 0.9.7 through 0.9.8-23 is vulnerable to an authenticated command execution that can result in remote root access on the server. The platform works with PHP as the frontend language and uses shell scripts to execute system actions. PHP executes shell script through the dangerous command exec. This function can be dangerous if arguments passed to it are not filtered. Every user input in VestaCP that is used as an argument is filtered with the escapeshellarg function. This function comes from the PHP library directly and its description is as follows: "escapeshellarg() adds single quotes around a string and quotes/escapes any existing single quotes allowing you to pass a string directly to a shell function and having it be treated as a single safe argument." It means that if you give Username, it will have 'Username' as a replacement. This works well and protects users from exploiting this potentially dangerous exec function. Unfortunately, VestaCP uses this escapeshellarg function incorrectly in several places.

Weakness: CWE-78

Which versions are affected by CVE-2019-9859?

It affects 1 product.

Products include Vestacp Vesta Control Panel.

How do I fix CVE-2019-9859?

No fix has been published for CVE-2019-9859 yet. Limit exposure of the affected software until one is available.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is CVE-2019-9859 being exploited?

There is no known exploitation of CVE-2019-9859 in the wild and no public exploit code.

Sources

Also known as GHSA-4fq8-68gc-cjqm.

Is CVE-2019-9859 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free