Skip to content
XSS Write-up Beginner

Hidden in the Source: Discovering Reflected XSS via Manual Code Review

A hidden internal search path reflected a parameter into the page without sanitisation, allowing HTML injection and then reflected cross-site scripting. An attacker could run JavaScript in a victim's browser, for example to read cookies.

xelcezeri Follow

Published on medium.com

In bug bounty hunting, when automated scanners fail and the scope is narrow, your best weapon is your own eyes. Today, I’ll share how I discovered a Reflected XSS vulnerability on a protected login page by simply digging into the application’s source code.

samet, 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 internal search endpoint echoed a request parameter into the HTML response without encoding or sanitising it.

Impact

An attacker could execute arbitrary JavaScript in a victim's browser, potentially stealing cookies, though the text does not show a full account takeover.

What the attacker needed

Victim clicks a crafted link; access to the internal search path

How it was found

  1. Find the internal search path in the page source.
  2. Send a request with special characters in the parameter and see them reflected.
  3. Confirm HTML injection is possible.
  4. Try script and image error payloads to confirm JavaScript execution.

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 login page had a hidden search address that put whatever you typed straight into the page. Because special characters were not cleaned, a crafted link could make the page run the attacker's JavaScript in the visitor's browser. This is called reflected cross-site scripting, or XSS.

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 xelcezeri

View all

5 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.