Skip to content
XSS Disclosed report Beginner

DOM Based XSS In mercantile.wordpress.org

The apparel category page on mercantile.wordpress.org reflected a URL parameter into the page without proper sanitisation, allowing an attacker to inject HTML and JavaScript. An attacker could craft a link that executes arbitrary script in a victim's browser when opened.

pabster Follow

Originally disclosed on HackerOne

Medium 5.4 View original
  • Triaged in 2 days
  • Fixed in 24 days
  • Paid in 3 months
  • Disclosed after 24 days

Hello, There is a DOM XSS in mercantile.wordpress.org in the apparel subcat. For example: https://mercantile.wordpress.org/product-category/apparel/?subcat=<html payload>

Steps To Reproduce

  1. Go to https://mercantile.wordpress.org
  2. Click on apparel
  3. In the url bar add : /?subcat="><img src=x onerror=alert(document.domain)>

The domain will pop-up.

Or alternatively just click on the link to: https://mercantile.wordpress.org/product-category/apparel/?subcat=%22%3E%3Cimg%20src=x%20onerror=alert(document.domain)%3E

Hope this helps. Sincerely, Pablo

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

Impact

An attacker could run script in a victim's browser on the mercantile.wordpress.org domain.

What the attacker needed

Victim clicks a crafted link

How it was found

  1. Open the mercantile.wordpress.org homepage.
  2. Click on the apparel category.
  3. Add the subcat parameter with an HTML payload to the URL.
  4. Observe the script executing and showing the domain in 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 report has not been written yet. The Original tab links to the source.

A DOM-based cross-site scripting (XSS) flaw means the website takes part of the web address and puts it directly into the page without cleaning it first. Here, the 'subcat' value in the link was inserted as HTML, so a crafted link could run a small script in the visitor's browser. That script could then act as the user on that 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 pabster

View all

2 more disclosed reports, best first.

More from WordPress

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.