The vulnerability exists because the /api/setup/backup API endpoint lacks authentication. An unauthenticated attacker can send a POST request to this endpoint to trigger the creation of a configuration backup. The backup is saved to a web-accessible location, and the URL to the backup file is returned in the API response. The backup file contains sensitive information, including database credentials, which can lead to a full compromise of the application's data.
The primary vulnerable function is phpMyFAQ\Controller\Api\SetupController::backup, which is the unauthenticated controller action for the API endpoint. This function, in turn, calls phpMyFAQ\Setup\Update::createConfigBackup to generate the backup file. Both functions would appear in a runtime profile during exploitation.
The provided patch commit b0e99ee3695152115841cb546d8dce64ceb8c29a only removes the download link from the client-side user interface, which is an incomplete fix. The main vulnerability on the server-side remains. A proper fix would involve adding authentication and authorization checks within the backup function.