Skip to content
XSS Write-up Intermediate

(CRITICAL) Blind Storage XSS — My first Bug Bounty 💰

A blind stored cross-site scripting vulnerability existed in the support chat file upload feature, where an attacker could inject a double quote into the filename to break out of an HTML attribute and execute JavaScript in the support agent's browser. The attacker could then steal the support agent's cookies and potentially escalate to compromise all users.

Benjamin Walter Follow

Published on gatolouco.medium.com

Bounty$1,000 View original

Imagine, a hacker with full access to the support account and able to spread the XSS for every user on the platform.

Benjamin Walter, on gatolouco.medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 5 min read.

Context

CS Money (cs.money) is a platform for trading skins, and it runs a support chat where users can send messages and images to support staff. The researcher's target was the support side of that chat: the client the supporter uses to read incoming messages. The bug he found is a blind stored cross-site scripting issue in the handling of uploaded image file names, triggered in the supporter's browser rather than in his own.

The write-up opens with the impact question directly: what happens if an attacker has full access to the support account and can spread the XSS to every user on the platform?

From the original on gatolouco.medium.com

Setup

The researcher was testing on cs.money as a normal user of the support chat. He captured the upload request and replayed it in Burp Repeater, and used a server of his own to receive stolen cookies. The only precondition was the ability to send an image to the supporter, which any user of the chat can do. No special account, role or version is mentioned in the report.

Finding it

He sent an image to the supporter, captured the resulting request and sent it to Burp Repeater. Looking at the request, he noticed that he could break out of the HTML by injecting a double quote into the file name.

That is the classic sign of a file name being concatenated into an HTML attribute without encoding. Once the quote breaks the attribute, the rest of the file name is interpreted as markup, so the next question is whether script can be introduced as well. The researcher's answer was that escalating the HTML injection to XSS was easy.

Because the payload executes in the supporter's client, he had no direct way to see it fire. He confirmed it by asking the supporter, who told him the XSS was being triggered on the support client. That is what makes this a blind XSS: the attacker never sees the execution context, only its effects.

Exploitation

Step 1: break the attribute with the file name

Send an image through the support chat with a double quote in the file name. The captured upload request, replayed in Repeater, let him break the HTML by injecting a double quote into the file name.

Step 2: turn the injection into script execution

With the attribute broken, the file name can carry an XSS payload instead of plain text. The report does not reproduce the exact payload used at this stage; it only states that escalating the HTML injection to XSS was easy.

Step 3: confirm the trigger

Since the payload runs in the supporter's browser, the researcher asked the supporter whether it fired, and the supporter confirmed it did.

Step 4: prove real impact by stealing the supporter's cookies

To show a concrete impact rather than an alert, he crafted a payload that sends the supporter's cookies to his own server.

He notes that he worked under limitations: no dots and no spaces were allowed in the payload. That constraint shapes the payload, since a normal exfiltration URL contains dots and typical JavaScript contains spaces. The report does not show the payload itself, so the exact technique used to work around those restrictions is not documented here.

Root cause

The mistake is that the uploaded file name is placed into HTML in the support client without encoding, so a double quote in the name terminates the surrounding attribute and the rest of the name is parsed as markup. Because the value is stored and rendered later in a different user's session, this is stored XSS, and because the rendering happens in the supporter's client, it is blind from the attacker's point of view. The report does not describe any output encoding, Content Security Policy or other defence that was present and failed; the only detail given is that the quote was enough to break the HTML.

Impact

The direct impact is execution of attacker-controlled script in the supporter's session, which the cookie-stealing payload demonstrates: the attacker obtains the supporter's cookies. From there the researcher describes the escalation he considered most dangerous. Instead of an alert(123), an attacker could craft a payload that, running as the supporter, sends another payload to every single user. When a user reads the message, the XSS triggers, allowing the attacker to steal private information, make unauthorised requests, and buy or sell skins. The researcher frames this as a hypothetical escalation from a compromised support account.

Result

CS Money awarded a $1000 bounty, described in the report as the critical bounty for support.cs.money. The team tried to close the report as critical, but because the maximum severity on subdomains is high, they closed it as high while awarding it as critical. The report is public on HackerOne as report 1010466, and it reached the top of the Hacktivity feed a few hours after he opened disclosure.

Fix

The fix implied by the root cause is to encode the file name as an HTML attribute value (or reject characters such as double quotes in file names) wherever the support client renders it, so that user-controlled names can never break out of the attribute. A restrictive Content Security Policy would add defence in depth against script execution even if an injection slips through.

Variants to test

  1. Other upload fields: avatars, attachments, documents and import features that echo the original file name back into a page. A positive result is a quote in the name changing the rendered markup in the page that displays it.
  2. Other characters in the same field: single quotes, angle brackets and backticks, in case the value lands in a different quoting context. A positive result is any of them breaking out of the attribute or tag.
  3. Stored contexts you cannot see: admin panels, moderation queues and support inboxes are the natural home of blind XSS. A positive result is an out-of-band callback from the reviewer's browser.
  4. Restricted payload environments: when dots and spaces are filtered, test whether the application still allows a callback through available encodings or alternative syntax. A positive result is a request reaching your listener despite the filter.
  5. Escalation from supporter to users: if a compromised support session can send messages to users, check whether a payload delivered that way executes in the recipient's client. A positive result is execution in a second, unrelated user's session.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 11 min read.

What happened, in plain words

CS Money (cs.money) is a website where people trade in-game cosmetic items, commonly called skins. The site has a support chat: a place where a normal user can send messages and pictures to a member of the support team. The support team reads those messages in their own browser, using a special support interface.

A security researcher found that if you send a picture through that chat and give the picture a file name containing a double quote character ("), the support interface builds its web page incorrectly. The file name is dropped into the page's HTML without being cleaned up first, so the quote can break the page's structure and let the file name act like page code instead of plain text. From there he could make the support person's browser run JavaScript that he chose. That kind of attack is called cross-site scripting, or XSS. Because the malicious file name is saved on the server and only runs later, inside someone else's browser, it is called stored XSS, and because the attacker never sees it happen, it is called blind XSS.

He proved it by writing a payload that sent the support person's cookies to a server he controlled. Cookies are small pieces of data a website stores in your browser to remember who you are, so stealing them can mean stealing a logged-in session. CS Money paid him a $1000 bounty, which is a reward a company gives someone who reports a security problem responsibly.

The impact question

The write-up starts by asking what the worst case looks like. If an attacker had full access to the support account and could spread the XSS to every user on the platform, what could they do?

From the original on gatolouco.medium.com

That framing matters for a beginner: a bug is judged by what an attacker could actually achieve with it, not by how clever the trick is. Here the answer is that a compromised support account could reach every user of the site.

Setting up

The researcher tested on cs.money as an ordinary user of the support chat. He captured the upload request and replayed it in Burp Repeater, and used a server of his own to receive stolen cookies.

A proxy is easiest to picture as a post office clerk who opens every letter you send, lets you rewrite it, and then sends it on. A request is simply the message your browser sends to a website when you click something or load a page. The only precondition for the attack was being able to send an image to the supporter, which any user of the chat can do. No special account, role or software version is mentioned.

Finding it

He sent an image to the supporter, captured the request that the browser made when uploading it, and replayed that request in Burp Repeater. Repeater is the part of Burp that lets you send the same request again and again, changing one detail each time, and read the response.

Looking at the request, he noticed he could break out of the HTML by putting a double quote into the file name.

HTML is the language web pages are written in. Elements on a page often have attributes, which are extra settings written inside the opening tag, usually with their value in quotes, for example src="picture.png". If a program pastes your file name into such a place without escaping it, and your file name contains a quote, the quote ends the value early. Everything after it is then read as more page structure rather than as part of the name. That is the classic sign of a file name being glued into an HTML attribute without encoding. Encoding means converting special characters into harmless stand-ins so they cannot change the page's structure.

Once the quote breaks the attribute, the rest of the file name is treated as markup. The next question is whether actual script can be introduced the same way. The researcher's answer was that escalating the HTML injection to XSS was easy.

An HTML injection means you can add page structure. XSS goes further: it means you can add script, and script runs with the powers of the page it sits in, including access to that user's cookies and the ability to act as them.

Because the payload runs in the supporter's browser, not his own, he had no direct way to watch it fire. He confirmed it by asking the supporter, who told him the XSS was being triggered on the support client. That is exactly what makes this a blind XSS: the attacker never sees the place where the code runs, only its effects.

Exploitation, step by step

Step 1: break the attribute with the file name

Send an image through the support chat with a double quote in the file name. The captured upload request, replayed in Repeater, let him break the HTML by injecting a double quote into the file name. The quote closes the attribute it sits in, and the rest of the name becomes markup. The reason for this step is to prove the injection point exists before trying anything more ambitious.

Step 2: turn the injection into script execution

With the attribute broken, the file name can carry an XSS payload instead of plain text. The report does not reproduce the exact payload used at this stage; it only says that escalating the HTML injection to XSS was easy. A payload here just means the piece of text you put into the file name to make the browser do something.

Step 3: confirm the trigger

Since the payload runs in the supporter's browser, the researcher asked the supporter whether it fired, and the supporter confirmed it did. This step exists because a blind bug gives you no screen of your own to watch; you need a second pair of eyes, or a callback to your own server, to know it worked.

Step 4: prove real impact by stealing the supporter's cookies

To show a concrete impact rather than a harmless alert, he crafted a payload that sends the supporter's cookies to his own server.

alert is a browser function that pops up a small message box. It is the traditional way to prove script execution, but it damages nothing, so researchers often go one step further to show what an attacker could really take. A cookie is a small piece of data the site stores in the browser, and a session cookie is what tells the site that you are already logged in. If someone else gets your session cookie, they can often act as you without knowing your password.

He notes that he worked under limitations: no dots and no spaces were allowed in the payload. That constraint shapes the payload, because a normal web address contains dots (as in example.com) and ordinary JavaScript contains spaces. The report does not show the payload itself, so the exact technique used to work around those restrictions is not documented here.

Why the bug exists

The mistake is that the uploaded file name is placed into the HTML of the support client without encoding. A double quote in the name ends the surrounding attribute, and the rest of the name is read as markup. Because the value is saved and shown later, in a different person's session, this is stored XSS. Because the showing happens in the supporter's client, it is blind from the attacker's point of view. The report does not describe any output encoding, Content Security Policy or other defence that was present and failed; the only detail given is that the quote was enough to break the HTML. A Content Security Policy is a set of rules a site can send to the browser saying which scripts are allowed to run, and it is a common extra layer of protection.

Impact

The direct impact is that attacker-controlled script runs in the supporter's session, which the cookie-stealing payload demonstrates: the attacker obtains the supporter's cookies. From there the researcher describes the escalation he considered most dangerous. Instead of an alert(123), an attacker could craft a payload that, running as the supporter, sends another payload to every single user. When a user reads the message, the XSS triggers, allowing the attacker to steal private information, make unauthorised requests, and buy or sell skins. The researcher frames this as a hypothetical escalation from a compromised support account.

Result

CS Money awarded a $1000 bounty, described in the report as the critical bounty for support.cs.money. The team tried to close the report as critical, but because the maximum severity on subdomains is high, they closed it as high while awarding it as critical. Severity labels like critical and high are the company's way of ranking how bad a bug is. The report is public on HackerOne as report 1010466, and it reached the top of the Hacktivity feed a few hours after he opened disclosure. HackerOne is a platform where researchers report bugs to companies, and Hacktivity is its public feed of disclosed reports.

Fix

The fix implied by the root cause is to encode the file name as an HTML attribute value, or reject characters such as double quotes in file names, wherever the support client renders it, so that user-controlled names can never break out of the attribute. A restrictive Content Security Policy would add defence in depth against script execution even if an injection slips through.

Variants to test

  1. Other upload fields: avatars, attachments, documents and import features that echo the original file name back into a page. A positive result is a quote in the name changing the rendered markup in the page that displays it.
  2. Other characters in the same field: single quotes, angle brackets and backticks, in case the value lands in a different quoting context. A positive result is any of them breaking out of the attribute or tag.
  3. Stored contexts you cannot see: admin panels, moderation queues and support inboxes are the natural home of blind XSS. A positive result is an out-of-band callback from the reviewer's browser. Out-of-band means the signal arrives somewhere other than the page you are looking at, typically your own server.
  4. Restricted payload environments: when dots and spaces are filtered, test whether the application still allows a callback through available encodings or alternative syntax. A positive result is a request reaching your listener despite the filter.
  5. Escalation from supporter to users: if a compromised support session can send messages to users, check whether a payload delivered that way executes in the recipient's client. A positive result is execution in a second, unrelated user's session.

Glossary

  • API: a defined way for one piece of software to talk to another, like a service counter where you ask for something in a fixed format and get a fixed answer back.
  • Attribute: an extra setting inside an HTML tag, usually written as a name and a quoted value, such as src="picture.png".
  • Blind XSS: cross-site scripting where the attacker cannot see the page where the code runs, so the effect has to be confirmed indirectly.
  • Bounty: a reward a company pays someone who reports a security problem responsibly.
  • Burp Repeater: the part of the Burp Suite proxy that lets you resend a captured request with changes and read the response.
  • Burp Suite: a tool that sits between your browser and a website so you can read and edit the requests and responses.
  • Callback: a request sent from the victim's browser to a server the attacker controls, used as proof that code ran.
  • Content Security Policy: rules a site sends to the browser saying which scripts may run, used as an extra layer of defence.
  • Cookie: a small piece of data a website stores in your browser, often used to remember that you are logged in.
  • Critical / high: severity labels a company uses to rank how serious a bug is.
  • Cross-site scripting (XSS): a bug where an attacker gets their own code to run inside another person's browser session on a website.
  • Double quote: the " character, used to wrap attribute values in HTML.
  • Encoding: converting special characters into harmless stand-ins so they cannot change the structure of a page.
  • Exfiltration: secretly sending stolen data out to a server the attacker controls.
  • HackerOne: a platform where security researchers report bugs to companies and reports can be disclosed publicly.
  • Hacktivity: HackerOne's public feed of disclosed reports.
  • HTML: the language web pages are written in, made of tags and attributes.
  • HTML injection: a bug where an attacker can add their own page structure to a page.
  • JavaScript: the programming language browsers run, which gives a page its interactive behaviour.
  • Out-of-band: a signal that arrives somewhere other than the page you are viewing, typically your own server.
  • Payload: the piece of text or code an attacker puts into a vulnerable spot to make something happen.
  • Proxy: a tool or service that sits between your browser and a website and passes messages through, letting you inspect and change them.
  • Request: the message your browser sends to a website when you load a page or submit something.
  • Response: the message a website sends back to your browser.
  • Session: the period during which a website remembers you as logged in, usually tracked by a cookie.
  • Severity: a ranking of how bad a security bug is.
  • Skin: a cosmetic item in a game that players trade.
  • Stored XSS: cross-site scripting where the malicious input is saved on the server and runs later, for whoever views it.
  • Subdomain: a part of a website's address in front of the main name, such as support in support.example.com.
  • Support chat: the feature on cs.money where users send messages and images to support staff.
  • Support client: the interface support staff use to read incoming messages.
  • Unauthorised requests: actions taken on a site without the account owner's permission, made by someone using their session.

More by Benjamin Walter

View all

1 more disclosed report, best first.

More from CS Money

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.