Skip to content
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

Closed
lightsey opened this issue Jul 19, 2017 · 4 comments
Closed

CVE-2017-0378 reflected XSS #21

lightsey opened this issue Jul 19, 2017 · 4 comments

Comments

@lightsey
Copy link

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

@lota
Copy link
Owner

lota commented Jul 20, 2017

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?

TIA
Lota

@lightsey
Copy link
Author

lightsey commented Jul 20, 2017 via email

lota added a commit that referenced this issue Jul 20, 2017
@c3retc3
Copy link
Contributor

c3retc3 commented Jul 21, 2017

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:

$tag .= "<input type=\"text\" class=\"form-control\" size=\"25\" name=\"login_username\" value=\"".$login_username."\" maxlength=\"100\" placeholder=\""._("Enter domain or e-mail")."\" />"."\n";

It looks like variable login_username comes right from POST request body being not filtered.

Would you take a look at this, please?

@lota
Copy link
Owner

lota commented Jan 2, 2020

thanks for report, but Phamm is no longer supported,
we evaluate pull request only

@lota lota closed this as completed Jan 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants