The vulnerability is a classic Zip Slip issue within the plugin upload functionality of FacturaScripts. The root cause lies in the FacturaScripts\Core\Plugins::testZipFile function, which is responsible for validating uploaded plugin archives. The validation is incomplete; while it checks for a single root directory within the ZIP file, it fails to sanitize or check for path traversal sequences (../) in the filenames of the archive's contents. An attacker can create a ZIP file containing a malicious payload (e.g., a PHP shell) with a crafted filename like ValidPluginName/../../shell.php. The testZipFile function will incorrectly approve this archive. The FacturaScripts\Core\Plugins::add function then calls this flawed validation function. Upon receiving a 'valid' response, it proceeds to extract the archive using ZipArchive::extractTo. The path traversal sequence in the filename is processed by the file system, causing the malicious file to be written outside of the intended Plugins directory, leading to arbitrary file write and potential remote code execution.