Stored XSS Vulnerability
A stored cross-site scripting vulnerability existed in the workflow keyword feature of a Trac instance, where unescaped user input was used to generate a delete button. An attacker could inject a script that executes when a victim views the ticket, potentially stealing cookies.
- Paid in 7 days
- Disclosed after 3 days
Summary by the program
Ali found a stored XSS vulnerability in the JavaScript implementation of workflow keywords on our Trac instance. The issue was caused by using unescaped user input to generate a delete button. A fix has been implemented to use the safe jQuery method .attr() instead.
Important: As mentioned in our policy, do not pentest our Trac instances, it's very annoying to clean up after. Setup a local environment instead; the custom source code is available via Git (git clone git://meta.git.wordpress.org/), in the trac.wordpress.org subfolder. If you ignore this you'll forfeit any bounty.
Summary by the researcher
I love bug bounty. I love xss. https://twitter.com/alicanact60
The report
Hi there, I found a stored xss @ https://core.trac.wordpress.org/
Steps:
- Go to https://core.trac.wordpress.org/ and login. (open new private window and login with another account)
- Go to https://core.trac.wordpress.org/newticket and set a summary and description.
- Select a Workflow Keyword and click manual. Paste the payload: "><svg/onload=alert(document.domain)>
- Click enter button and click Create Ticket button. Now, you will see xss alert.
Copy the url and go to private window. Go to url and you will see xss alert.
PoC: https://youtu.be/Nyt1op_73vs
Impact
Stealing cookies
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 delete button was built by concatenating unescaped user input into HTML, instead of using a safe method to set attributes.
Impact
An attacker could steal cookies from users who view the malicious ticket.
What the attacker needed
A Trac account; victim views the ticket
How it was found
- Log in to the Trac instance and open a new private window with another account.
- Go to the new ticket page and set a summary and description.
- Select a workflow keyword, click manual, and paste a payload that breaks out of an attribute and injects an SVG with an onload handler.
- Click enter and create the ticket, which triggers the script.
- Copy the ticket URL and open it in a private window to see the script execute again.
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.
Stored cross-site scripting (XSS) happens when a website saves harmful code and later shows it to other users without cleaning it. Here, the workflow keyword field was not properly escaped, so a script could be saved and run in the browser of anyone who opened the ticket, letting the attacker steal session cookies.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.