Skip to content
XSS Write-up Beginner

Ignored Vulnerability? The story of XSS discovery on Rozee.pk

The search query field on Rozee.pk reflected user input without proper sanitisation, allowing an attacker to inject a script via a double-encoded payload. An attacker could execute arbitrary JavaScript in a victim's browser.

medium.com

Published on medium.com

It all started with a simple goal: to learn and practice. Recently, I get involved learning Cross-Site Scripting(XSS) vulnerability and wanted to test my skills on live platforms.

Muhammad Haziqul Khair, 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 input sanitisation only decoded and checked the input once, so a double-encoded payload bypassed the filter.

Impact

An attacker could execute arbitrary JavaScript in a victim's browser, potentially stealing data or performing actions on their behalf.

What the attacker needed

Victim clicks a crafted link

The fix

The vulnerability was fixed after disclosure, as the text states it was addressed.

How it was found

  1. Find that the search query is reflected in the HTML body.
  2. Create a payload using an image tag with an event handler.
  3. Double-encode the payload to avoid sanitisation.
  4. Submit the payload in the search query and observe the script execute.

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.

Cross-Site Scripting (XSS) is when a website shows user input without cleaning it, so an attacker can sneak in code that runs in other people's browsers. Here, the search box let a script through because the site only checked for simple attacks, not ones hidden by encoding the input twice.

What is XSS?

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

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.