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

A Reflected XSS vulnerability in this sdk #28

Closed
jgj212 opened this issue Feb 22, 2017 · 1 comment

Comments

Projects
None yet
1 participant
@jgj212
Copy link

commented Feb 22, 2017

Hello:
I found a Reflected XSS vulnerability in this sdk.

The vulnerability exists due to directly output user-supplied data in HTTP GET parameter, this happended in the file "heartland-php-master\examples\consumer-authentication\cruise.php". The infected source code is line 27, there is no protection on $_GET;
code1

if $_GET contains evil js code, line 27 will trigger untrusted code to be excuted on the browser side.

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://your-web-root/heartland-php-master/examples/consumer-authentication/cruise.php?cavv="><script>alert(1);</script><"

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

Discoverer: ADLab of Venustech

@jgj212

This comment has been minimized.

Copy link
Author

commented Apr 21, 2017

this issue is fixed from v2.9.1 by adding a line as follow

"$_GET = filter_input_array(INPUT_GET, FILTER_SANITIZE_STRING);"

@jgj212 jgj212 closed this May 31, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.