The vulnerability is an authenticated remote code execution (RCE) caused by an unrestricted file upload in the theme installation feature. The analysis of the security patch (commit b969465e71eacd9eb57014ad1fce1fc34fa7bca0) reveals the exact functions involved in the insecure process.
The exploitation chain starts in the upload() method within Modules\Theme\Controllers\Theme. This function accepts a ZIP file, performs a weak path traversal check, and extracts its contents to a temporary directory. It fails to inspect the file types within the archive before extraction.
Next, the install_theme_from_tmp() helper function is called. Its role is to move the extracted files to the final theme directory under the public webroot. This function, in turn, uses the smart_move() helper function.
The core of the vulnerability is in the smart_move() function, which, before the patch, would move any file from the source to the destination without restriction. This allowed a PHP file, placed in the uploaded ZIP archive, to be moved into a publicly accessible directory (public/templates/<theme_name>/), making it executable via a simple GET request.
The patch applies a defense-in-depth strategy:
upload() now pre-scans the ZIP archive for forbidden file extensions (like .php) before extraction.
install_theme_from_tmp() is updated to pass an allowlist of safe file extensions to smart_move().
smart_move() is modified to accept and enforce this allowlist, preventing dangerous files from being moved.
All three functions are critical to the vulnerability. upload() is the entry point, and install_theme_from_tmp() and smart_move() are the functions that perform the insecure file handling that leads to RCE.