Skip to content
XSS Write-up Beginner

How I get my first 3 bugs (Not duplicate :))

A login and registration page reflected user input without encoding in a parameter, allowing cross-site scripting. An attacker could execute script in a victim's browser, but the report notes it is self-XSS unless chained with CSRF.

mohamed.yasser442200 Follow

Published on medium.com

This is my first write-up in bug hunting , I would expalin step by step how I get 3 valid bugs.

Spider4, 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 the 'pg' parameter into the HTML response without proper output encoding, and the form lacked CSRF protection.

Impact

An attacker could execute arbitrary JavaScript in a victim's browser if the self-XSS is chained with CSRF, but the report does not demonstrate a full attack beyond the self-XSS.

What the attacker needed

Victim visits a malicious page; attacker can craft a CSRF form

The fix

The application should encode output for the 'pg' parameter and add CSRF tokens to forms.

How it was found

  1. Intercept the login request and notice hidden parameters and no CSRF token.
  2. Test reflection and find that the pg parameter is reflected without encoding.
  3. Inject a basic XSS payload and see the alert fire.
  4. Chain with CSRF by creating a form that auto-submits the payload.
  5. Test the registration page and find a similar issue in the ettevote parameter.
  6. Use Google dorks to find more login pages and test the same pg parameter.

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.

The website took text from a form field and put it directly into the page without cleaning it. This let the author insert a small script that ran in the browser. On its own, only the person who typed the script sees it, so it is called self-XSS; to affect others, it must be combined with a trick that makes a victim submit the form.

What is XSS?

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

More by mohamed.yasser442200

View all

3 more disclosed reports, best first.

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.