# Blind XSS on image upload

Stored XSS via unsanitized uploaded filename in support chat, firing for support agents and any user who later views the chat.

- Payout: $1,000
- Severity: critical
- Program: CS Money
- Found by: benjamin-mauss
- Disclosed: 2020-12-26
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/1010466
- Library page: https://bugbountylibrary.com/r/h1%3A1010466
- Tags: area:web domain:web impact:ato impact:mass-exploit kind:bounty platform:hackerone sev:critical tech:rest technique:recon vuln:xss

**Target:** support.cs.money file upload endpoint (/upload_file) and support chat UI
**Root cause:** The uploaded file's filename parameter is reflected into the support chat HTML without sanitization/encoding, allowing HTML/JS injection stored and rendered to viewers.
**Steps:**
1. Intercept a file upload to support chat with Burp.
2. Replace filename with `"><img src=1 onerror="...">` payload that exfiltrates `document.cookie` to attacker host.
3. Submit upload; open support chat view.
4. Payload executes in the chat rendering context for support agents and any user viewing the chat.
**How found:** Researcher noticed the upload request carried a filename parameter and tested injecting HTML/JS into it, observing execution when the chat rendered the file entry.
**Exploitation:** Attacker uploads a file with a malicious filename; the stored filename renders as HTML in the support chat, executing JS in the victim's session. Support agents trigger it on viewing; attacker can also send the XSS image via chat to reach other users. Cookie exfil to attacker-controlled endpoint via ASCII-encoded URL.
**Escalation:** Attacker (or compromised support account) can broadcast the XSS-laden image message to many users, turning a single stored payload into mass account compromise.
**Insight:** File-upload features often render the original filename in chat/attachment UIs; test the filename field (not just file content) for stored XSS, especially in support/ticketing tools where agents view untrusted uploads.

