Skip to content
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.

I have find a Reflected XSS vulnerability in this sdk #129

Closed
jgj212 opened this issue Feb 10, 2017 · 3 comments
Closed

I have find a Reflected XSS vulnerability in this sdk #129

jgj212 opened this issue Feb 10, 2017 · 3 comments
Labels

Comments

@jgj212
Copy link

jgj212 commented Feb 10, 2017

Hello:
I have find a Reflected XSS vulnerability in this sdk.

The vulnerability exists due to insufficient filtration of user-supplied data in “token” HTTP GET parameter that will be passed to “merchant-sdk-php\samples\AccountAuthentication\GetAuthDetails.html.php”. The infected source code is line 7, there is no protection on _GET[‘token’]; if _GET[‘token’] contains evil js code, line 21 will trigger untrusted code to be excuted on the browser side.

image

So if a attacker construct a special url as follow and send it to a victim, when the victim click the url, the code which is contained in the url will be executed on the victim's browser side to do some evil.
"http://localhost/php-pro/merchant-sdk-php-master/AccountAuthentication/GetAuthDetails.html.php?token=><script>alert(1);</script>"

The follow scrrenshot is the result to click the upper url ( win7 spq x64 + firefox 51.0.1 32bit ):
image

Discoverer: ADLab of Venustech

@randstraw
Copy link

Thank you for submitting the issue. Would you be interested in submitting a pull request to help resolve this? If not, it is ok I will review further.

@jgj212
Copy link
Author

jgj212 commented Feb 21, 2017

@pp-randy i am sorry, i am not skilled at bug fixing. You can encode the user input from the browser side, because it is not trusted .

@randstraw
Copy link

Adding internal tracking: BTDXCLTS-283

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants