Skip to content
XSS Write-up Beginner

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.

Vipin Chaudhary Follow

Published on medium.com

{{media:0}}

Vipin Chaudhary, 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

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

  1. Browse the main domain and find a spot where HTML can be injected.
  2. Try common XSS event handlers and observe that the firewall blocks them.
  3. Experiment with less common event handlers until oncopy is found to work.
  4. 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.

More from Practo

View all

The newest disclosed reports for this program.

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.