Skip to content
XSS Disclosed report Intermediate

Dom based xss affecting all pages from https://www.grab.com/.

A DOM-based cross-site scripting vulnerability existed on all pages of the grab.com domain because a sanitisation function could be bypassed with a crafted payload. An attacker could execute arbitrary JavaScript in a victim's browser by tricking them into visiting a specially crafted URL.

netfuzzer Follow

Originally disclosed on HackerOne

Medium 6.1 View original
  • Disclosed after 40 days

Hello,

there's a dom based xss vulnerability affecting all pages under the domain https://www.grab.com/. This vulnerability wasn't properly patched so I managed to bypass the regular expressioned that was added into the function.

Vulnerable code:

var stripHtml = (function () {
		  var div = document.createElement('div');
		  return function (html) {
		    div.innerHTML = html.replace(/<\/?\w+[^>]*\/?>/g, "");
		    return (div.innerText || div.textContent); // textContent is for firefox
		  };
		})();

PoC: https://www.grab.com/sg/partnerships/?xss=%3C%3Ca/%3A%3C%22a%22%3Eimg%20src%3D%23%20onerror%3Dconfirm%28%27XSSED%27%29%3E

visit url above to reproduce.

A screenshot is attached to this report.

cheers, Mario.

Attachments

screenshot.png
screenshot.png From the original on HackerOne

The original report as published on HackerOne, by netfuzzer. 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

Likely the regular expression used to strip HTML tags was insufficient and could be bypassed, allowing malicious markup to reach the DOM and execute script.

Impact

An attacker could execute JavaScript in a victim's browser when they visit a crafted link.

What the attacker needed

Victim clicks a crafted link

How it was found

  1. Craft a URL containing a malicious payload in the xss parameter.
  2. Visit the crafted URL in a browser.
  3. Observe the JavaScript execution (e.g., an alert or confirm dialog).

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.

Cross-site scripting (XSS) is a flaw where a website lets an attacker run their own JavaScript in other people's browsers. Here, the site tried to clean up user input but did it incorrectly, so a specially crafted link could still run code. If a victim clicks that link, the attacker's script runs as if it came from the real site.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More by netfuzzer

View all

47 more disclosed reports, best first.

More from Grab

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.