// For flags

CVE-2019-9859

 

Severity Score

8.8
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

1
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

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.

Vesta Control Panel (VestaCP) versiones 0.9.7 hasta 0.9.8-23 es vulnerable a una ejecución de comando autenticada que puede resultar en un acceso remoto a la root en el servidor. La plataforma funciona con PHP como lenguaje frontend y usa scripts de shell para ejecutar acciones del sistema. PHP ejecuta script de shell por medio del peligroso comando exec. Esta función puede ser peligrosa si los argumentos pasados no son filtrados. Cada entrada de usuario en VestaCP que se utiliza como argumento es filtrada con la función escapeshellarg. Esta función proviene directamente de la biblioteca PHP y su descripción es la siguiente: "escapeshellarg() agrega comillas simples alrededor de una cadena y cita/escapa a las comillas simples existentes permitiendo pasar una cadena directamente a una función de shell y hacer que se trate como un único argumento seguro". Quiere decir, que si le da nombre de usuario, tendrá "Username" como reemplazo. Esto opera bien y protege a usuarios de explotar esta función exec peligrosa potencialmente. Desafortunadamente, VestaCP utiliza esta función escapeshellarg incorrectamente en varios lugares.

*Credits: N/A
CVSS Scores
Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
Attack Vector
Network
Attack Complexity
Low
Authentication
Single
Confidentiality
Complete
Integrity
Complete
Availability
Complete
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2019-03-18 CVE Reserved
  • 2020-03-10 CVE Published
  • 2023-10-06 EPSS Updated
  • 2024-08-04 CVE Updated
  • 2024-08-04 First Exploit
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
CWE
  • CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
CAPEC
References (1)
URL Tag Source
URL Date SRC
https://ssd-disclosure.com/?p=3926 2024-08-04
URL Date SRC
URL Date SRC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Vestacp
Search vendor "Vestacp"
Vesta Control Panel
Search vendor "Vestacp" for product "Vesta Control Panel"
>= 0.9.7-0 <= 0.9.8-23
Search vendor "Vestacp" for product "Vesta Control Panel" and version " >= 0.9.7-0 <= 0.9.8-23"
-
Affected