Access following URL, browser will run any scripts posted to server, for example: alert(1) to prompt a dialog. http://host/Piwigo-master/admin.php?page=cehny"><script>alert(1)</script>tcs7a
Evironment:
Win7
Xampp (php mysql apache)
Latest stable build(piwigo 2.9.0)
discovered by: ghi from Huawei WeiRan Labs
# **Steps to reproduce:**
1. Login to site as administrator;
2. Access following URL, browser will run any scripts posted to server, for example: alert(1) to prompt a dialog.
http://host/Piwigo-master/admin.php?page=cehny"><script>alert(1)</script>tcs7a

# Evironment:
- Win7
- Xampp (php mysql apache)
- Latest stable build(piwigo 2.9.0)
discovered by: ghi from Huawei WeiRan Labs
<!-- github-sync-id:226161894 -->
Do anyone confirm the issue??
I think xss vulnerabiltiy is harmful to administrator, attacker may steal information by enticing a administator to open a crafted web page.
Do anyone confirm the issue??
I think xss vulnerabiltiy is harmful to administrator, attacker may steal information by enticing a administator to open a crafted web page.
<!-- github-comment-id:305681677 -->
Hello
you don't have a correct version of Piwigo. This has been sanitized
https://github.com/Piwigo/Piwigo/blob/master/admin.php#L114
<!-- github-comment-id:306605133 -->
<a href="./admin.php?page=cehny"><script>alert(1)</script>tcs7a&change_theme=1" class="tiptip" title="Switch to clear or dark colors for administration">
hi, @flop25
But today, i download sourcecode from https://codeload.github.com/Piwigo/Piwigo/zip/master , and visit http://host/Piwigo-master/admin.php?page=cehny"><script>alert(1)</script>tcs7a, this issue still exist.
please confirm the issue, thank you.
reponse html (injected javascript code) as follow:
`<a href="./admin.php?page=cehny"><script>alert(1)</script>tcs7a&change_theme=1" class="tiptip" title="Switch to clear or dark colors for administration">`
<!-- github-comment-id:306672619 -->
i couldn't execute anything


but seeing https://github.com/Piwigo/Piwigo/blob/master/admin.php#L108 doesn't make me comfortable
need some backup here ^^ @plegall @modus75
<!-- github-comment-id:306675150 -->
hi, @flop25
I think you could not execute anything because page parameter has been sanitized by your browser, not Piwigo. I test the issue by Internet explorer 11.
result for IE, chrome, firefox, as follows:
IE(execute javascript code)
Firfox(not execute anything)
chrome(not execute anything)
hi, @flop25
I think you could not execute anything because page parameter has been sanitized by your browser, not Piwigo. I test the issue by Internet explorer 11.
# result for IE, chrome, firefox, as follows:
## IE(execute javascript code)

## Firfox(not execute anything)

## chrome(not execute anything)

<!-- github-comment-id:306703294 -->
CVE-2017-9452 has been assigned for this issue. Add it to commit message and ChangeLog file if/when you fix this issue. I do not think that CVE is needed if this was only in GitHub latest master package and not in any release (so maybe request it to be rejected). If needed I can also help verifying this issue.
CVE-2017-9452 has been assigned for this issue. Add it to commit message and ChangeLog file if/when you fix this issue. I do not think that CVE is needed if this was only in GitHub latest master package and not in any release (so maybe request it to be rejected). If needed I can also help verifying this issue.
<!-- github-comment-id:306707379 -->
@ghi5107 Thank you. During the night, I also thought about this since from the code it appears that nothing is sanitized
@ghi5107 Thank you. During the night, I also thought about this since from the code it appears that nothing is sanitized
<!-- github-comment-id:306754631 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Steps to reproduce:
http://host/Piwigo-master/admin.php?page=cehny"><script>alert(1)</script>tcs7a
Evironment:
Win7
Xampp (php mysql apache)
Latest stable build(piwigo 2.9.0)
discovered by: ghi from Huawei WeiRan Labs
Do anyone confirm the issue??
I think xss vulnerabiltiy is harmful to administrator, attacker may steal information by enticing a administator to open a crafted web page.
Hello
you don't have a correct version of Piwigo. This has been sanitized
https://github.com/Piwigo/Piwigo/blob/master/admin.php#L114
hi, @flop25
But today, i download sourcecode from https://codeload.github.com/Piwigo/Piwigo/zip/master , and visit http://host/Piwigo-master/admin.php?page=cehny"><script>alert(1)</script>tcs7a, this issue still exist.
please confirm the issue, thank you.
reponse html (injected javascript code) as follow:
<a href="./admin.php?page=cehny"><script>alert(1)</script>tcs7a&change_theme=1" class="tiptip" title="Switch to clear or dark colors for administration">i couldn't execute anything


but seeing https://github.com/Piwigo/Piwigo/blob/master/admin.php#L108 doesn't make me comfortable
need some backup here ^^ @plegall @modus75
hi, @flop25
I think you could not execute anything because page parameter has been sanitized by your browser, not Piwigo. I test the issue by Internet explorer 11.
result for IE, chrome, firefox, as follows:
IE(execute javascript code)
Firfox(not execute anything)
chrome(not execute anything)
CVE-2017-9452 has been assigned for this issue. Add it to commit message and ChangeLog file if/when you fix this issue. I do not think that CVE is needed if this was only in GitHub latest master package and not in any release (so maybe request it to be rejected). If needed I can also help verifying this issue.
@ghi5107 Thank you. During the night, I also thought about this since from the code it appears that nothing is sanitized