In the core update functionality of baserCMS, some parameters sent from the admin panel are passed to the exec() function without proper validation or escaping. This issue allows an authenticated CMS administrator to execute arbitrary OS commands on the server (Remote Code Execution, RCE).
This vulnerability is not a UI-level issue such as screen manipulation or lack of CSRF protection, but rather stems from a design that directly executes input values received on the server side as OS commands. Therefore, even if buttons are hidden in the UI, or even if CakePHP's CSRF/FormProtection (SecurityComponent) ensures that only legitimate POST requests are accepted, an attack is possible as long as a request containing a valid token is processed within an administrator session.
| Item | Details | | ---- | ------- | | CWE | CWE-78: Improper Neutralization of Special Elements used in an OS Command | | Impact | Remote Code Execution (RCE) | | Severity | Critical | | Attack Requirements | Administrator privileges required | | Reproducibility | Reproducible (confirmed multiple times) | | Test Environment | baserCMS 5.2.2 (Docker / development environment) |
PluginsController::get_core_update()PluginsService::getCoreUpdate()/baser/admin/baser-core/plugins/get_core_updatePluginsController::get_core_update()
↓ Retrieves php parameter from POST data
PluginsService::getCoreUpdate($targetVersion, $php, $force)
↓ Concatenates $php into command string without validation or escaping
exec($command)
PluginsController.php
$service->getCoreUpdate(
$request->getData('targetVersion') ?? '',
$request->getData('php') ?? 'php',
$request->getData('force'),
);
PluginsService.php
$command = $php ....
5.2.3Exploitability
AV:NAC:LPR:HUI:NScope
S:CImpact
C:HI:HA:H9.1/CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H