Skip to content
XSS Write-up Intermediate

6 Farklı şirkette nasıl XSS buldum?

The author found reflected cross-site scripting (XSS) in the search features of several e-commerce sites. In each case a web application firewall (WAF) could be bypassed, for example by splitting a payload across duplicate query parameters or by inserting a pipe character, so that script ran in a victim's browser.

medium.com

Published on medium.com

Herkese merhaba bu yazımda 2 yıl önce nasıl 6 farklı şirkette XSS güvenlik zafiyeti bulduğumu ve bunları nasıl raporlamaya çalıştığımı anlatacağım.

Burak, 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 WAF and the page parsed duplicate or malformed query parameters differently, and the page rendered user input without proper output encoding, so the filter's checks did not apply to what the browser executed.

Impact

An attacker could run arbitrary JavaScript in a victim's browser, which could be used to steal data or act as the user, although the text does not demonstrate any specific harm beyond a pop-up.

What the attacker needed

Victim clicks a crafted link; search feature reflects input; WAF present but bypassable

The fix

The sites should have applied proper output encoding and input validation instead of relying only on a WAF; the author says the issues have since been fixed.

How it was found

  1. On the Hepsiburada search page, send two q parameters: the first contains a script tag and the second a harmless search term.
  2. Observe that the WAF checks the last q value while the page renders the first, so the script executes.
  3. On the LC Waikiki search page, split the payload across several q parameters so each part looks harmless to the WAF.
  4. Double-encode the payload so it survives two decoding steps and still executes.
  5. On the Defacto search page, insert a pipe character after the less-than sign to bypass the WAF, then use an anchor tag with a javascript: URL and a throw/onerror trick to avoid the blocked alert() function.
  6. On the Arçelik and Beko search pages, break out of a single-quoted string inside an inline script and use the print() function instead of alert(), encoding the payload to get it through.

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 puts text from a user back into its pages without making it safe, so an attacker can make the browser run their JavaScript. Here the sites tried to block bad input with a web application firewall (WAF), a filter that inspects requests, but the filter and the page disagreed about which part of the request to look at. That mismatch let the attacker slip a script past the filter.

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.