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

GamePanelX-V3 – Cross-Site Scripting (XSS) #161

Closed
bestshow opened this issue Mar 2, 2017 · 8 comments
Closed

GamePanelX-V3 – Cross-Site Scripting (XSS) #161

bestshow opened this issue Mar 2, 2017 · 8 comments
Assignees

Comments

@bestshow
Copy link

bestshow commented Mar 2, 2017

Product: GamePanelX-V3
Download: https://github.com/devryan/GamePanelX-V3
Vunlerable Version: 3.0.12 and probably prior
Tested Version: 3.0.12
Author: ADLab of Venustech

Advisory Details:
A Cross-Site Scripting (XSS) was discovered in“GamePanelX-V3 3.0.12”, which can be exploited to execute arbitrary code.
The vulnerability exists due to insufficient filtration of user-supplied data in the “a” HTTP GET parameter passed to the “GamePanelX-V3-master/ajax/ajax.php” URL. An attacker could execute arbitrary HTML and script code in a browser in the context of the vulnerable website.
The exploitation example below uses the "alert()" JavaScript function to see a pop-up messagebox:
Poc:
http://localhost/.../GamePanelX-V3-master/ajax/ajax.php?a=%22%3E%3Cscript%3Ealert(1);%3C/script%3E%3C%22

@bestshow
Copy link
Author

Excuse me, is there anyone dealing with this issue?

@devryan
Copy link
Owner

devryan commented Mar 15, 2017

Looking at this.

@devryan devryan self-assigned this Mar 15, 2017
@devryan
Copy link
Owner

devryan commented Mar 15, 2017

@bestshow did you actually see an alert window pop up?

I get the standard "ERROR: Invalid ajax action ""><""!" which occurs if the ?a parameter is not in the supported list of actions.

It bails out here in ajax.php (https://github.com/devryan/GamePanelX-V3/blob/master/ajax/ajax.php#L29):

if(!in_array($this_request, $allowed_reqs)) die('ERROR: Invalid ajax action "' . $this_request . '"!');

@bestshow
Copy link
Author

I tested this issue on firefox latest version in win7.
image

@devryan
Copy link
Owner

devryan commented Mar 15, 2017

I have updated this and setup a pull request: #164

Can you test from here and confirm the bug is gone?

@bestshow
Copy link
Author

You have fixed it,the vulnerbility is gone now.

@devryan
Copy link
Owner

devryan commented Mar 16, 2017

Merged the fix into master branch, closed the branch: 2f78f27

Thanks for reporting, @bestshow !

@devryan devryan closed this as completed Mar 16, 2017
@bestshow
Copy link
Author

@devryan Thanks for replying, you`re welcome.

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

2 participants