Skip to content
XSS Disclosed report Beginner

[parcel.grab.com] DOM XSS at /assets/bower_components/lodash/perf/

The lodash performance test page read the build and other GET parameters and wrote them into the page with document.write without encoding. An attacker could craft a link that runs script in the victim's browser, giving DOM-based cross-site scripting.

thsa Follow

Originally disclosed on HackerOne

  • Triaged in under an hour
  • Fixed in 2 days
  • Paid in 4 days
  • Disclosed after 35 days

Summary: DOM Based XSS (or as it is called in some texts, “type-0 XSS”) is an XSS attack wherein the attack payload is executed as a result of modifying the DOM “environment” in the victim’s browser used by the original client side script, so that the client side code runs in an “unexpected” manner (Source)

Description: It is observed in https://parcel.grab.com/assets/bower_components/lodash/perf/ endpoint that the value given in build and other GET parameters are accessed by client side script and written on page using document.write without output encoding - resulting DOM XSS.

Vulnerable client side cod in page:

grab_parcel_DXSS_build_AND_other_pageSource.PNG
grab_parcel_DXSS_build_AND_other_pageSource.PNG From the original on HackerOne

which will track back to script source - in switch default value has been set to build which will be same as user injected in parameter. (Script link: https://parcel.grab.com/assets/bower_components/lodash/perf/asset/perf-ui.js)

grab_parcel_DXSS_build_AND_other_scriptSource.PNG
grab_parcel_DXSS_build_AND_other_scriptSource.PNG From the original on HackerOne

Browsers Verified In:

  • Mozilla Firefox (Latest)

Steps To Reproduce:

Open any of below links in Mozilla Firefox and observe the script execution.

Injected in build GET parameter:

https://parcel.grab.com/assets/bower_components/lodash/perf/?build=lodash%22%3E%3C/script%3E%3Ch1%3Evagg-a-bond%20is%20here%20:D%3C/h1%3E%3Cimg%20src=1%20onerror=alert(1)%3E&other=lodash

Injected in other GET parameter:

https://parcel.grab.com/assets/bower_components/lodash/perf/?build=lodash&other=lodash%22%3E%3C/script%3E%3Ch1%3Evagg-a-bond%20is%20here%20:D%3C/h1%3E%3Cimg%20src=1%20onerror=alert(1)%3E

Supporting Material/References:

Execution Screenshot:

grab_parcel_DXSS_build_AND_other.PNG
grab_parcel_DXSS_build_AND_other.PNG From the original on HackerOne

The original report as published on HackerOne, by thsa. 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 client-side script inserted user-controlled query parameter values into the page via document.write without output encoding.

Impact

An attacker could run script in a victim's browser by getting them to open a crafted link, though the report only verified this in Firefox.

What the attacker needed

Victim opens a crafted link; Firefox browser

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.

A web page can build itself in the browser using a script. This page took text from the address bar and pasted it straight into the page without cleaning it. Because of that, a crafted link could make the browser run code the attacker chose, which is called cross-site scripting.

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 thsa

View all

3 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.