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.
- 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
- Go to https://mercantile.wordpress.org
- Click on apparel
- 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
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
- Open the mercantile.wordpress.org homepage.
- Click on the apparel category.
- Add the subcat parameter with an HTML payload to the URL.
- 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.