Language: PHP
Label: vulnerable
CWE: CWE-79 \u2014 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.

Code:
    protected static function getPathThisScriptNonCli()
    {
        $isCgi = Environment::isRunningOnCgiServer();
        if ($isCgi && Environment::usesCgiFixPathInfo()) {
            return $_SERVER['SCRIPT_FILENAME'];
        }
        $cgiPath = $_SERVER['ORIG_PATH_TRANSLATED'] ?? $_SERVER['PATH_TRANSLATED'] ?? '';
        if ($cgiPath && $isCgi) {
            return $cgiPath;
        }
        return $_SERVER['ORIG_SCRIPT_FILENAME'] ?? $_SERVER['SCRIPT_FILENAME'];
    }