Skip to content

Create CODE_OF_CONDUCT.md #31

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions bad-boy.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Intentionally Vulnerable XSS Example</title>
</head>
<body>
<h1>Intentionally Vulnerable XSS Page</h1>

<p>
This page takes a query parameter <code>input</code> and displays it without any sanitization:
</p>

<!--
WARNING: This is intentionally vulnerable.
The content of 'input' is injected directly into HTML without sanitization.
-->
<div id="output">
<script>
// Get 'input' parameter from the query string
const params = new URLSearchParams(window.location.search);
const userInput = params.get('input') || 'No input provided';

// Inject into the page without sanitization (XSS risk):
document.write("User input: " + userInput);
</script>
</div>

<p>
Try loading this page with a query string, for example:
<br>
<code>?input=&lt;script&gt;alert('XSS')&lt;/script&gt;</code>
</p>

<p>
This should trigger an alert if the page allows script execution from user-provided data.
</p>
</body>
</html>