# RichText parser vulnerability in scheduled posts allows XSS

Scheduled-post RichText editor failed to server-side validate link schemes, letting an attacker inject a javascript: URL that executes XSS when an admin clicks it in the edit view.

- Payout: $5,000
- Severity: high
- Program: Reddit
- Found by: la_revoltage
- Disclosed: 2023-04-20
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/1930763
- Library page: https://bugbountylibrary.com/r/h1%3A1930763
- Tags: area:web domain:web impact:ato kind:bounty platform:hackerone sev:high tech:rest technique:param-pollution vuln:access-control vuln:xss

**Target:** Reddit scheduled posts RichText editor / post submission API
**Root cause:** Link validation on scheduled posts happens only client-side; the API accepts forged link schemes (javascript:) and the scheduled-post edit view renders them as clickable links without sanitization.
**Steps:**
1. Create a new scheduled post containing a link.
2. Intercept the submission request with Burp and replace the link with a `javascript:` scheme payload.
3. Navigate to scheduled posts and click Edit on the malicious post.
4. Click the rendered malicious link; the javascript executes in the admin's session.
**How found:** Researcher noticed link validation was client-side only and tested whether the scheduled-post API accepted a forged javascript: scheme; also probed whether the same bypass worked on live posts (it did not, since richtext is converted to markdown/html which strips invalid links).
**Exploitation:** Attacker submits a scheduled post with a forged javascript: link via intercepted request, then lures an admin to the scheduled-post edit page and gets them to click the link, executing JS in the admin context.
**Insight:** Scheduled/draft edit views often render stored content through a different pipeline than the published renderer; test whether server-side sanitization is skipped for draft/scheduled states even when the live-post path sanitizes correctly.

