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

PLEASE FIX: Security vulnerability - code injection #464

Closed
vykluong opened this issue Apr 10, 2015 · 7 comments
Closed

PLEASE FIX: Security vulnerability - code injection #464

vykluong opened this issue Apr 10, 2015 · 7 comments

Comments

@vykluong
Copy link

There are security vulnerabilities, making the code susceptible to code injection and/or XSS, and it begins at: data = xml ? xhr.responseXML : xhr.responseText.

The data stored in variable 'data' is eventually passed to a function that either calls "replaceWith" or "html." Given that the response is something like: <script src="badScript.js"></script>, invoking "html" will execute the script in the browser. If invoking "html" then the response should be HTML encoded or data should be sanitized.

Thanks,
Vy

@kressly
Copy link

kressly commented Apr 10, 2015

Hi
Please since you found the security vulnerability , fix it and make a pull request so that me may all benefit from your knowledge

@vykluong
Copy link
Author

I have fixed this in my fork, but the change will require jquery 1.8+, so I'm not ready to make a pull request. Will need to update the code again with a function equivalent to jquery.parseHTML or strip <script /> tags

@kressly
Copy link

kressly commented Apr 17, 2015

Can you give us your fix here so that we may use Jquery 1.8 or higher with it ?
Thanks

@vykluong
Copy link
Author

Sure, I'd be happy to share my changes. Besides having the changes committed to my branch, are you suggesting another way for me to give you my fix?

https://github.com/vykluong/form.git

@vykluong
Copy link
Author

Going to close this issue; will request a pull request once I have changes that will work with earlier versions of jquery.

@huntr-helper
Copy link

Bug Bounty

We have opened up a bounty for this issue on our bug bounty platform. Want to solve this vulnerability and get rewarded 💰? Go to https://huntr.dev/

We will submit a pull request directly to your repository with the fix as soon as possible. Want to learn more? Go to https://github.com/418sec/huntr 📚

Automatically generated by @huntr-helper...

@huntr-helper
Copy link

‎‍🛠️ A fix has been provided for this issue. Please reference: 418sec#1

🔥 This fix has been provided through the https://huntr.dev/ bug bounty platform.

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

3 participants