Skip to content
XSS Write-up Beginner

Cross Site Scripting Xss In Hidden Parameter

A hidden URL parameter called 'failure' reflected user input into the page without proper sanitisation, allowing script execution. An attacker could craft a link that runs code in a victim's browser and steal their cookies.

Shantanu Kulkarni Follow

Published on infosecwriteups.com

My name isShantanu Kulkarni. I am working as Security Consultant and Lead penetration Tester at a Security Consultancy firm in India.

Shantanu Kulkarni, on infosecwriteups.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 'failure' parameter value into the HTML response without encoding it, and its input filtering only blocked the word 'alert' rather than the dangerous characters.

Impact

An attacker could execute script in a victim's browser and steal their cookies, though the report only demonstrates a pop-up and states the cookie-stealing impact as a claim.

What the attacker needed

Victim clicks a crafted link; the 'failure' parameter is reflected

How it was found

  1. Collect parameters with tools such as Arjun and ParamSpider and notice the 'failure' parameter.
  2. Observe that the parameter accepts only 1 or 0 and echoes other input in a red box at the bottom of the page.
  3. Try the parameter on registration, admin login and support login pages without success.
  4. Inspect the page source and craft payloads adapted from public XSS references.
  5. Notice that the word 'alert' is blocked but 'confirm' and 'prompt' are accepted, and obtain a pop-up.

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.

A website sometimes takes text from the address bar and puts it straight onto the page. If it does not clean that text first, an attacker can put code in the link so the page runs it. This is called cross-site scripting, and it lets the attacker act as the logged-in user, for example by reading their session cookie.

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 Shantanu Kulkarni

View all

1 more disclosed report, 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.