How I bypassed practos firewall and triggered an XSS vulnerability
The author found HTML injection on Practo's main domain, but a firewall blocked common XSS event handlers. By trying alternative handlers, they discovered that an oncopy handler bypassed the firewall and triggered XSS.
Published on medium.com
{{media:0}}
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
Impact
An attacker could execute arbitrary JavaScript in a victim's browser on the main domain, potentially stealing data or performing actions as the victim, though the report does not detail specific consequences.
What the attacker needed
Victim visits a crafted page or link; victim performs a copy action
The fix
The issue was fixed by the vendor within a few hours, likely by updating the firewall rules to block the oncopy handler or by properly sanitising the injection point.
How it was found
- Browse the main domain and find a spot where HTML can be injected.
- Try common XSS event handlers and observe that the firewall blocks them.
- Experiment with less common event handlers until oncopy is found to work.
- Inject an element with an oncopy handler that calls prompt with the document domain.
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 firewall is a security tool that inspects web traffic and blocks known malicious patterns. The author found a way to sneak a script past it by using an event handler (a piece of code that runs when a user does something, like copying text) that the firewall did not recognise as dangerous. This let them run their own JavaScript in the context of the website.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.