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

Fix GENI Portal XSS vulnerability issues reported #1824

Merged
merged 4 commits into from
Aug 27, 2020

Conversation

hussamnasir
Copy link
Contributor

fixes #1823

Since the invocation id and invocation user cannot be anything but an alphanumeric string , we will use that check as our fix . This will avoid the usage of any JS code as values since it would need special chars like "<>"
My fix here was just to urldecode and remove all instances of HTML chars that could be executed as JS
This one was tricky to fix. This PHP is used by other PHP scripts and the rspec validation is done 3 levels down after the file is uploaded. The bug is triggered during one of these handoffs from php file to file. The right way to fix this would have been to validate the file uploaded right here. I did try to do that using some of the subroutines defined in other scripts, but all of them seem to allow the malicious JS/HTML code to pass thru since they are valid XML/HTML , but just no rspec related stuff in it. SO my quick and dirty fix for this is to load the string into a XML DOM and loo for the "script" TAG and throw an error if one is seen. RSPEC should not have a SCRIPTS tag in it. Period !!!
Fix XSS Vul for $invocation_user
@hussamnasir hussamnasir merged commit 7be94e8 into GENI-NSF:master Aug 27, 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

Successfully merging this pull request may close these issues.

GENI Portal XSS vulnerability
1 participant