The vulnerability allows for remote code execution by exploiting the database restore functionality in Craft CMS's updater. The analysis of the provided patch (a19d46be78a9ca1ea474012a10e97bed0d787f57) clearly indicates that the actionRestoreDb method within the UpdaterController.php file is the entry point for this vulnerability. The patch completely removes the logic for restoring a database from this method and instead throws a NotSupportedException. This change, combined with the removal of related calls in actionMigrate and runMigrations, confirms that actionRestoreDb was the vulnerable function. An attacker, having met the prerequisites of a compromised security key and the ability to place a file in the backup directory, could have sent a malicious request to the /updater/restore-db endpoint, which is handled by this function, to trigger the vulnerability.