XSS via Mod Log Removed Posts
A post title containing an XSS payload was not sanitised when shown in a subreddit's mod notes, so the script ran in a moderator's browser. An attacker could run script in a moderator's session after the moderator removed the attacker's post and viewed the mod notes.
- Triaged in 17 hours
- Fixed in 23 hours
- Paid in 17 hours
- Disclosed after 46 hours
Summary:
I have discovered an XSS vulnerability regarding the mod notes feature. Specifically, the XSS payload executes when the victim removes a post in a subreddit and opens up the mod notes of the attacker.
Steps To Reproduce:
- The attacker creates a new post with the title containing the XSS payload.
- The victim (mods of the subreddit) then must remove your post.
- The payload executes when a victim (subreddit mod) opens up your mod notes. Sometimes, the mod notes are displayed when the victim hovers on your profile (this is true when a recent mod action has been taken on the user).
Supporting Material/References:
█████ █████
Impact
Impact Below:
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 post title was inserted into the mod notes page without output encoding or sanitisation, so markup in the title was treated as code.
Impact
Script could run in a subreddit moderator's browser; the report gives no further detail on what the payload did.
What the attacker needed
Attacker can create a post; a moderator removes the post; moderator opens the mod notes
How it was found
- The attacker publishes a post whose title carries the script.
- A subreddit moderator removes that post.
- The moderator opens the attacker's mod notes, where the script runs.
- The script may also run when the moderator hovers over the attacker's profile after a recent mod action.
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) means a site shows text from a user as if it were part of the page, so hidden code in that text runs in someone else's browser. Here a post title was shown in a moderator's notes without being made safe, so the code ran with the moderator's permissions.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.