Skip to content
XSS Disclosed report Beginner

Reflected XSS in pubg.com

The pubg.com website reflected the value of a GET parameter into the page without sanitising it, so an attacker could craft a link that runs JavaScript in a victim's browser. With user interaction, the attacker could execute arbitrary script in the victim's session.

Fábio Freitas Follow

Originally disclosed on HackerOne

  • Triaged in under an hour
  • Fixed in 4 days
  • Disclosed after 4 days

Summary by the program

The researcher found an XSS vulnerability caused by query parameters not being properly sanitized before being displayed on the page.

The report

Summary:

PUBG's main website https://www.pubg.com has an endpoint that is vulnerable to an injection vulnerability - namely a reflected injection of JavaScript, also known as Reflected Cross Site Scripting (XSS). As per OWASP's definition: "Cross-Site Scripting (XSS) attacks are a type of injection, in which malicious scripts are injected into otherwise benign and trusted websites. " This happens because one of the GET parameters "p" does not properly sanitize/escape user input, allowing an injection to occur.

Steps To Reproduce:

To reproduce this, an attacker has to:

  • Prepare a Javascript payload that it wants the victim to execute. In this case, for Proof of Concept purposes, our Javascript code will prompt an alert showing the users' cookies.
JavaScript
alert(document.cookie);
  • Inject this Javascript code properly into the vulnerable parameter, creating thus a crafted future GET request that will inject the payload.
GETREQUEST
GET /?p=iqz78'%3e%3cimg%20src%3da%20onerror%3dalert(document.cookie)%3d1%3echplq HTTP/1.1
Host: www.pubg.com
Accept-Encoding: gzip, deflate
Accept: */*
Accept-Language: en
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)
Connection: close
Referer: https://www.pubg.com/es/feed/
Cookie: _icl_current_language=en; _icl_visitor_lang_js=en-us; wpml_browser_redirect_test=0; __cfduid=de74423d435717d651b1c9e2c63f4acc21575460678

Request PoC

request_poc2.png
request_poc2.png From the original on HackerOne
  • As this injection happens in a GET parameter, the attacker simply needs to send the crafted Link that produces this GET request to the victim and have the victim click it.

Injection Demonstration

PoC_xss.png
PoC_xss.png From the original on HackerOne

Supporting Material/References:

  • Video Demonstration
Screencast_2019-12-05_100034.mp4 From the original on HackerOne

Impact

With user interaction, an attacker could execute arbitrary Javascript code in a victim's browser. This would allow an attacker to unwillingly make a victim:

  • Perform any action in the identified endpoint
  • View any information that the user is able to view
  • Modify any information that the user is able to modify (not sure if applicable in this case)
  • Interact with other application users as if it were him - impersonation (not sure if applicable in this case)

The original report as published on HackerOne, by 0xfabiof. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The application reflected the GET parameter 'p' into the HTML response without escaping or sanitising it.

Impact

With user interaction, an attacker could execute arbitrary JavaScript code in a victim's browser, potentially performing actions, viewing information, or modifying data as the victim.

What the attacker needed

Victim clicks a crafted link

How it was found

  1. Prepare a JavaScript payload that the victim should execute.
  2. Inject the JavaScript into the vulnerable GET parameter to create a crafted request.
  3. Send the crafted link to the victim and have them click it.

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 report has not been written yet. The Original tab links to the source.

When a website takes something from the address bar and puts it straight into the page without cleaning it, an attacker can put code in the link instead of normal text. If a victim clicks that link, the code runs in the victim's browser as if the website itself had written it. This is called reflected cross-site scripting because the malicious input is bounced straight back to the user.

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 PUBG

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.