The vulnerability stems from procedural code in 'resources/server/router.php' that processes user-controlled input (REQUEST_URI) to construct file paths. The code used urldecode(parse_url($_SERVER['REQUEST_URI'])) to derive $path and concatenated it with DOCUMENT_ROOT to form $filename. This allowed path traversal via '../' sequences. The check 'if (!file_exists($filename) || is_dir($filename))' was insufficient because it didn't validate whether the resolved path was within DOCUMENT_ROOT. While built-in functions like urldecode, parse_url, file_exists, and is_dir are involved, the vulnerability arises from their insecure usage in the code flow rather than specific user-defined functions. The patch introduced realpath validation to address this, confirming the path stays within the intended directory.