The vulnerability is a classic symlink-following (or 'link following') issue, categorized as CWE-59. It allows a low-privileged user to escalate their privileges to root. The vulnerability exists in the process that synchronizes SSH public keys for FTP users, which is executed by a cron job with root privileges.
The core of the issue lies in the Froxlor\FileDir::makeCorrectFile function. This function was used to construct the path to the authorized_keys file but did not check if any component of the path was a symbolic link. An attacker with shell access to their home directory could replace their ~/.ssh/authorized_keys file with a symbolic link pointing to /root/.ssh/authorized_keys.
The Froxlor\Cron\System\SshKeys::generateFiles function, running as root, would then call makeCorrectFile to get the path for writing the user's submitted public key. Since makeCorrectFile didn't resolve the symlink, generateFiles would unknowingly append the attacker's public key to the root user's authorized_keys file.
The patch addresses this by modifying Froxlor\FileDir::makeCorrectFile to perform rigorous symlink checking. It now traverses the path and uses is_link() and readlink() to ensure that the final path is within the user's legitimate home directory, throwing an exception if a symlink points outside of it. The Froxlor\Cron\System\SshKeys::generateFiles function was also updated to supply the user's home directory to makeCorrectFile for this validation to occur.