A real XSS in OLX
A reflected cross-site scripting (XSS) vulnerability existed in the search[user_id] parameter on OLX's main page, allowing an attacker to inject a script that would execute in a victim's browser. The attacker could potentially steal cookies or perform actions on behalf of the user.
Published on medium.com
I saw a couple of other write-ups and blog posts about “XSS in OLX” but when I got to read them, they end up being either stored XSS or in some other website that belongs within the scope of OLX…
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 failed to properly sanitise or encode user input in the search[user_id] parameter before reflecting it back in the page.
Impact
An attacker could execute arbitrary JavaScript in a victim's browser, potentially leading to session hijacking or other malicious actions.
What the attacker needed
Victim clicks a crafted link
How it was found
- Navigate to Olx.pt and choose a random item.
- Open that item page and click 'outros anúncios' (other ads).
- You will be redirected to a URL containing the search[user_id] parameter.
- Modify the search[user_id] parameter to include a malicious script.
- The script executes in the browser, demonstrating the XSS.
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 a type of security flaw where an attacker can inject malicious code into a website. When another user visits the affected page, their browser runs the attacker's code, which can then steal their data or perform actions as them. This particular bug was in a search parameter, meaning the malicious code was part of the URL.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.