Skip to content
XSS Disclosed report Intermediate

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.

ahacker1 Follow

Originally disclosed on HackerOne

High 7.5 View original
  • 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:

  1. The attacker creates a new post with the title containing the XSS payload.
  2. The victim (mods of the subreddit) then must remove your post.
  3. 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:

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

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

  1. The attacker publishes a post whose title carries the script.
  2. A subreddit moderator removes that post.
  3. The moderator opens the attacker's mod notes, where the script runs.
  4. 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.

More by ahacker1

View all

17 more disclosed reports, best first.

More from Reddit

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.