Skip to content

Conversation

@yasuf
Copy link
Collaborator

@yasuf yasuf commented Oct 14, 2019

@yasuf yasuf changed the title XSS fix to throw errror when the URL contains a JS script Fix to prevent XSS, throw an error when the URL contains a JS script Oct 14, 2019
@snoopysecurity
Copy link

snoopysecurity commented Oct 15, 2019

Hey 👋 So the PR itself does amend the logic of isValidXss to throw an error and that makes sense. However, by looking at the logic of

var regex = RegExp('<script+.*>+.*<\/script>');
, It is very easy to bypass this validation by having a payload such as https://github.com/axios/axios?<svg/onload=alert(1)> or anything other than a script tag.

This isn't a huge problem since #2447 seems be not exploitable anyway. So this PR might be enough to stop Fortify reporting this as a vulnerability.

Hope this helps

@felipewmartins felipewmartins merged commit 29da6b2 into axios:master Oct 16, 2019
@etanxing
Copy link

Thanks guys, any plan for this release?

@felipewmartins
Copy link
Contributor

@yasuf This merge cause a error in the main build. Please are you can see? I need this to fix the #2479

@yasuf
Copy link
Collaborator Author

yasuf commented Oct 21, 2019

what's the error? where can I see it?

edit: nevermind, found your PR

@felipewmartins
Copy link
Contributor

@axios axios locked and limited conversation to collaborators May 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants