Hunt Cards: Client-Side Bugs
Bug Bounty ยท Stage 3 โ Hunting ยท Level: L1 โ L5 ยท Reading time: ~15 min
Client-side bugs run in the victim's browser against the trusted site. Impact ranges from annoying to full account takeover, depending on what the injected code can reach.
Theory: XSS ยท CSRF, Clickjacking & UI Redress ยท CORS, SSRF & Request Forgery
Use a benign marker such as alert(document.domain) or a DNS/HTTP callback to your own listener. Do not deploy payloads that act on real users, exfiltrate real data, or persist destructively. For stored XSS on shared pages, confine it to your own account/object where possible and tell the triager where it is.
Card 1 โ Cross-Site Scripting (XSS)โ
Where it hidesโ
- Reflected: any input echoed into the response โ search, error messages, query parameters rendered on the page.
- Stored: profile fields (name, bio, company), comments, messages, filenames, support tickets, team/org names, anything other users will view โ including admins viewing user content.
- DOM: client-side code writing
location.hash/search/referrer/postMessagedata into a sink likeinnerHTML(see the sink list in JavaScript Analysis).
First testsโ
- Inject a unique marker (
os1337) and find where it lands in the response or DOM. - Identify the context: HTML body, attribute, JavaScript string, URL, or inside an existing tag.
- Try the minimal break-out for that context:
- HTML body:
<u>os1337</u>renders? then a script-capable payload. - Attribute: close it โ
" autofocus onfocus=.... - JS string:
';...//. - URL sink:
javascript:scheme on links/redirects.
- HTML body:
- For DOM XSS, use Burp's DOM Invader to trace source-to-sink automatically.
- If filtered, test the filter: case, encoding, double encoding, alternative tags/events, SVG, broken tags that browsers fix.
Escalateโ
- Reflected to account takeover by scripting an action as the victim (change email, read a token) โ show the real impact, not just a popup.
- Stored XSS that fires in an admin panel when staff view user content is often high/critical.
- Steal a non-
HttpOnlysession token, or perform a state-changing request with the victim's session.
Prove itโ
A clear PoC: the exact injection point, a payload that proves script execution (alert(document.domain)), and ideally a short description or video of the account-impacting action it enables. Note the context and why standard encoding was absent.
Why it gets rejectedโ
- Self-XSS (only the victim can trigger it on themselves) โ usually out of scope unless chained.
- Fires only in an outdated/unsupported browser.
- Requires an unrealistic victim action, or lands behind a strong CSP that blocks execution.
- A popup with no demonstrated impact on a low-value page.
Card 2 โ Cross-Site Request Forgery (CSRF)โ
Where it hidesโ
State-changing requests that rely only on cookies: change email/password, update settings, add a payment method, transfer, delete, invite.
First testsโ
- Capture a state-changing request. Is there a CSRF token? Is it actually validated (remove it, change it, use another user's token)?
- Check
SameSiteon the session cookie โLax/Strictblocks most cross-site CSRF for top-level and cross-site requests. - Does the endpoint accept
GETas well asPOST? Does it accept a simple content type (form-encoded) that avoids a CORS preflight? - Build a minimal auto-submitting HTML PoC and test it from another origin while logged in.
Escalateโ
CSRF on email change or add-payment can lead to ATO or financial loss. CSRF to change account recovery settings is a strong chain.
Why it gets rejectedโ
SameSite=Lax by default on modern browsers neutralises many classic CSRFs; low-value action with no real impact; token actually validated.
Card 3 โ CORS Misconfigurationโ
Where it hidesโ
APIs that return sensitive data and set Access-Control-Allow-Origin dynamically.
First testsโ
- Send
Origin: https://evil.exampleand inspect the response. Is it reflected inAccess-Control-Allow-Origintogether withAccess-Control-Allow-Credentials: true? - Try
Origin: https://sub.target.com.evil.example,Origin: null, and a trusted-looking subdomain to test weak regex matching.
Escalateโ
Reflected origin + credentials on an endpoint returning user data lets an attacker page read that data cross-origin โ demonstrate reading your victim account's data from an attacker origin.
Why it gets rejectedโ
Wildcard ACAO without credentials on a public, non-sensitive endpoint; origins restricted to assets you don't control.
Card 4 โ Open Redirectโ
Where it hidesโ
?redirect=, ?next=, ?url=, ?return=, ?continue=, ?dest=, login/logout flows, OAuth redirect_uri.
First testsโ
- Set the parameter to
https://evil.exampleand follow the response. Does it redirect off-site? - Bypass weak validators:
//evil.example,https:evil.example,https://target.com.evil.example,https://target.com@evil.example, backslashes, whitespace, double-encoding.
Escalateโ
Open redirect is often low alone, but is a powerful chain ingredient: stealing OAuth code/tokens, bypassing SSRF allowlists, and making phishing links look legitimate. Report it chained where you can.
Why it gets rejectedโ
Low severity by itself; the redirect only works to same-site paths; target requires user interaction that programs consider unrealistic.
Card 5 โ Clickjackingโ
Where it hidesโ
Sensitive state-changing pages that can be framed.
First testsโ
Check for X-Frame-Options / CSP frame-ancestors. If absent, build a framing PoC over a sensitive action (e.g. "delete account," "change email," "authorize app").
Why it gets rejectedโ
Non-sensitive pages; SameSite cookies preventing the framed action from carrying the session; most programs want a sensitive action to accept it.
Card 6 โ postMessage Vulnerabilitiesโ
Where it hidesโ
Pages with window.addEventListener("message", ...) handlers โ common in widgets, SSO popups, payment iframes, chat.
First testsโ
- Find message handlers in JavaScript. Does the handler check
event.originagainst an allowlist? - If not, send crafted messages from an attacker page and see whether the data reaches a sink (DOM XSS) or a privileged action.
Why it gets rejectedโ
Origin is validated; the handler does nothing security-relevant with the data.
Card 7 โ Prototype Pollution (Client-Side)โ
Where it hidesโ
Client-side merge/extend/clone logic processing attacker-controlled JSON or query strings; libraries known for this historically.
First testsโ
- Inject
__proto__[test]=polluted(or JSON{"__proto__":{"test":"polluted"}}) through parameters the app parses, then checkObject.prototype.testin the console. - Look for a gadget โ code that later reads a polluted property โ to turn pollution into DOM XSS or logic change.
Escalateโ
Prototype pollution alone is often informative; pollution + a gadget leading to XSS or auth bypass is a real finding.
Why it gets rejectedโ
No exploitable gadget; pollution has no observable security effect.
Context Cheat Sheet (XSS)โ
HTML body -> inject element/event handler
HTML attribute -> break out of the quote, add an event handler
JS string -> close the string/statement
URL/href -> javascript: scheme
<script> JSON -> break out of the JSON/script context
Framework binding -> look for the raw-HTML escape hatch (dangerouslySetInnerHTML, v-html, [innerHTML])
Key Takeawaysโ
- Identify the injection context first; the payload follows from it.
- Push XSS past "popup" to a real account-impacting action for good severity.
- CSRF/CORS/clickjacking need a sensitive action and real impact to be paid.
- Open redirect and prototype pollution shine as chain ingredients โ report them chained.