Skip to content
XSS Write-up Beginner

My First XSS: How Simple Automation Helped Me Find It

A parameter on a public bug bounty target reflected user input without sanitising angle brackets, allowing an attacker to inject a script tag that executed JavaScript in the victim's browser. The author confirmed the cross-site scripting (XSS) vulnerability by triggering an alert.

dexter0_0 Follow

Published on medium.com

Hello everyone! This is my first writeup, and I’m excited to share how I discovered my very first real-world vulnerability: a Cross-Site Scripting (XSS) bug.

AhmedAbdelaziz, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the application reflected user-supplied input into the HTML response without encoding angle brackets or other special characters, allowing injected markup to be interpreted as code.

What the attacker needed

A public bug bounty program in scope; a vulnerable parameter that reflects input

How it was found

  1. Select a public bug bounty program and save in-scope domains to a file.
  2. Use ParamSpider to extract parameters from the in-scope domains.
  3. Run kxss to identify parameters that reflect user input and do not sanitise special characters.
  4. Manually test the identified parameter with various payloads and observe how input is reflected in the page source.
  5. Confirm execution by injecting a payload that triggers a JavaScript alert.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Cross-site scripting (XSS) happens when a website takes text you type (like a search term or a profile name) and puts it directly into the page without cleaning it first. An attacker can type special characters that the browser treats as code, so when someone else views the page, the attacker's JavaScript runs in their browser. This can let the attacker steal session cookies, change what the page shows, or act as the victim.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.