Skip to content
XSS Write-up Beginner

Reflected XSS in BGMI

A parameter on the BGMI news page reflected user input without proper encoding, allowing an attacker to inject a script that executes in a victim's browser. The author demonstrated this with a simple script payload, and the issue was later fixed.

patil97 Follow

Published on medium.com

After PUBG Mobile was banned, it is making a comeback with a new name, BGMI. I visited the game’s website, and while randomly exploring the site, I looked at BGMI’s history tab and found URLs with different parameters.

Patil97, 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 application failed to properly encode or sanitise user input from the 'p' parameter before reflecting it in the response.

What the attacker needed

Victim clicks a crafted link

The fix

The issue was fixed after a few days, though the exact fix is not described.

How it was found

  1. Visit the BGMI website and explore the history tab to find URLs with parameters.
  2. Identify the news endpoint with a 'p' parameter.
  3. Inject a script payload into the 'p' parameter to trigger an alert.

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.

Reflected cross-site scripting (XSS) happens when a website takes something you type or click (like a link parameter) and puts it directly into the page without cleaning it. An attacker can craft a link that, when opened, runs their own code in the victim's browser, potentially stealing data or performing actions as the victim.

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.