-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CVE-2017-0378 reflected XSS #21
Comments
Hi lightsey, I tested (isset($_SERVER['HTTPS']) ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; instead $_SERVER['PHP_SELF'] and vulnerability seems disappears certainly there are other better way to sanitize Phamm's code, anyway, solution above could be sufficient? TIA |
On Thu, 2017-07-20 at 08:53 +0000, Lota Bi wrote:
Hi lightsey,
thanks for report. I reproduced the problem.
I tested (isset($_SERVER['HTTPS']) ? "https" : "http") .
"://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; instead
$_SERVER['PHP_SELF']
and vulnerability seems disappears
certainly there are other better way to sanitize Phamm's code,
anyway, solution above could be sufficient?
The more common fix is just to switch $_SERVER['PHP_SELF'] to
htmlspecialchars($_SERVER["PHP_SELF"], ENT_QUOTES, "utf-8")
|
Hi lota! It seems like phamm/views/helpers.php keeps another vulnerable parts of code that could lead to reflected XSS. For example, in line #120:
It looks like variable login_username comes right from POST request body being not filtered. Would you take a look at this, please? |
thanks for report, but Phamm is no longer supported, |
While looking through codesearch.debian.net I noticed that phamm's views/helpers.php uses $_SERVER['PHP_SELF'] in a way that is vulnerable to reflected XSS attacks.
To reproduce the problem, load a URL like this in Firefox:
http://127.0.0.1/phamm/main.php/%22%3E%3Cscript%3Ealert%28123%29%3C/script%3E
The Debian Security team assigned this issue CVE-2017-0378
The text was updated successfully, but these errors were encountered: