The vulnerability stems from a lack of proper input validation and sanitization within the code.php3 script. Specifically, the script fails to adequately restrict the files that can be accessed via the query string parameters. This allows an attacker to specify the path to any file within the Phorum installation directory. The script then attempts to read and display the contents of the specified file without verifying its legitimacy or intended purpose. This lack of access control allows for the unauthorized disclosure of sensitive information, such as database credentials, configuration settings, and potentially even source code, which can be leveraged for further attacks.