Skip to content
XSS Disclosed report Intermediate

RichText parser vulnerability in scheduled posts allows XSS

The server-side RichText parser for scheduled posts did not validate hyperlinks, so a crafted request could store a link using the javascript scheme. An attacker could then get a victim, such as an admin, to click that link on the scheduled-post edit page and run script in their browser.

la_revoltage Follow

Originally disclosed on HackerOne

Bounty$5,000 High 7.5 View original
  • Triaged in 15 days
  • Fixed in 17 days
  • Paid in 15 days
  • Disclosed after 17 days

Summary by the researcher

Reddit's MarkDown parser wasn't filtering hyperlinks on server-side in scheduled post feature, which lets attacker to modify a request with normal hyperlink embeding a malicious link using javascript scheme

The report

Summary:

RichText parser is not filtering links when editing scheduled posts

Steps To Reproduce:

  1. Create a new scheduled post with a link:
    image.png
    image.png From the original on HackerOne
  2. Intercept the request with Burp Suite/Other proxies and replace the link with javascript scheme payload: {
    image.png
    image.png From the original on HackerOne
  3. Navigate to scheduled posts and click Edit:
    image.png
    image.png From the original on HackerOne
  4. Observe the malicious link, if you click on it, the javascript will execute:
    image.png
    image.png From the original on HackerOne

Root cause and possible ways leverage

When submitting a scheduled post, API doesn't validate links, it happens only on the client side and the links can be forged with interception of requests. Though, it seems it is impossible to get the XSS in live post, when submitting the malicious post, reddit turns richtext to markdown and then to html, which automatically removes invalid links. Another possible way to bring it in real post, is to use Link type and also forge the link, but when submitting it will just give an error

Impact

Attacker can trick admins to visit the scheduled editing page and click on malicious link, which results in XSS

The original report as published on HackerOne, by la_revoltage. 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 server trusted client-side link validation and stored the submitted RichText without re-checking the link scheme.

Impact

An attacker could trick an admin into visiting the scheduled-post editing page and clicking the malicious link, resulting in XSS; the text notes the same trick did not work on live posts because the conversion to markdown and HTML removed invalid links.

What the attacker needed

Ability to create a scheduled post; victim clicks the malicious link; request interception tool

How it was found

  1. Create a new scheduled post containing a link.
  2. Intercept the request with a proxy and replace the link with a javascript-scheme payload.
  3. Open the scheduled posts list and click Edit.
  4. Click the malicious link and observe the script executing.

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 scheduled post is a post you prepare in advance and publish later. The website checked links only in the browser, not on the server, so someone could send a request directly with a link that starts with 'javascript:' instead of 'https:'. Clicking such a link runs code in the page, which is called cross-site scripting (XSS).

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 la_revoltage

View all

2 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.