Skip to content
Open redirect Disclosed report Beginner

Content Spoofing/Text Injection in https://support.cs.money and JS file not minified and uglyfied which makes it clearly readable

The report describes two issues: a content spoofing/text injection on support.cs.money where a crafted URL can display attacker-controlled text, and a publicly readable JavaScript file (worker.js) that is not minified and contains business logic and dangerous functions like eval. An attacker could use the spoofed page to trick users into visiting a phishing site, and the exposed code might aid future attacks.

rootishere Follow

Originally disclosed on HackerOne

  • Triaged in 42 hours
  • Fixed in 33 days
  • Paid in 5 days
  • Disclosed after 40 days

Issue 1:

Greetings,

Hello Team, I have found a Content Spoofing/Text Injection on this domain https://support.cs.money Using the below link the attacker can trick any genuine user to go to the attacker's phishing site.

The attacker could craft the URL by providing discounts which will tempt the user to visit the attacker URL mentioned, as the site displaying the message still belongs to https://support.cs.money

Steps To Reproduce

POC URL support cs money url

Issue 2 - worker.js file is user-readable

https://cs.money/js/worker.js?language=en&v=1331&csrf_token=[removed] The worker.js contains a lot of business logic which is deployed in production whiteout being minified or uglified. This might lead an attacker to craft attacks in future as it uses

  1. location.href`
  2. eval in the below code snipped
case 'method':
            try {
                postMessage({
                    cbid: data.cbid,
                    result: eval(`(${data.method})`)()
                });
            } catch (err) {
                console.warn(err);
            }
            break;

PoC Screenshots attached.

Let me know if you need more information.

Cheers!

Impact

Crafted phishing attacks on cs.money

Attachments

Phising_attack.png
Phising_attack.png From the original on HackerOne
plain_text_workerjs_file.png
plain_text_workerjs_file.png

The original report as published on HackerOne, by rootishere. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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

The target is CS Money, a marketplace for in-game items, and the report covers two separate issues found on its infrastructure. The first is a content spoofing / text injection flaw on https://support.cs.money, the support subdomain. The second is that a production JavaScript file, worker.js, is served to any user without being minified or uglified, exposing business logic and a call to eval.

The feature that matters for the first issue is the support site's handling of the request path. When a user follows a crafted URL, the site renders a message that appears to belong to support.cs.money, even though the path contains attacker-chosen text. That is the classic content spoofing pattern: the origin in the address bar is genuine, but the page content is not.

Setup

No accounts, roles, tools or versions are described in the report. The researcher worked against the public site and the public JavaScript asset. The only precondition for the first issue is that a victim follows a crafted link; for the second, that anyone can request the JavaScript file.

Finding it

The researcher noticed that the support domain reflects text taken from the URL path into the page. Because the reflected text is rendered on a page served from support.cs.money, an attacker can make the page say things the site never intended, such as a discount offer, and point the user towards an attacker-controlled domain.

Separately, while looking at the site's JavaScript, the researcher found that https://cs.money/js/worker.js is served in readable form. The file contains business logic deployed in production without minification or uglification, and it uses location.href and eval. The researcher considered this a risk because readable logic and an eval sink make it easier for an attacker to craft future attacks.

Exploitation

Step 1: craft a URL with injected text in the path

The researcher supplied the following proof-of-concept URL:

Text
https://support.cs.money//.cs.money(!has-moved-to-[www.support.cs.money.in]).Please-visit__[www.cs.money.in]___present__resource

The path segment after the double slash carries the attacker's message: a claim that the site has moved, a domain name to visit, and a word suggesting a present or discount. When a victim opens the link, the page is still served from support.cs.money, so the message appears to come from the genuine site. The attacker's goal is to tempt the user into visiting the domain named in the injected text, which the researcher describes as a phishing site.

Phising_attack.png
Phising_attack.png From the original on HackerOne

The screenshot shows the resulting page with the injected text rendered on the support domain.

Step 2: request the unminified worker file

The second issue is reached with a simple GET to the JavaScript asset:

Text
https://cs.money/js/worker.js?language=en&v=1331&csrf_token=[removed]

The URL carries a language value, a version value and a CSRF token. The response is the worker script in readable form. The researcher highlighted the following snippet, which handles a method message and evaluates the method string supplied in the message data:

JavaScript
case 'method':
            try {
                postMessage({
                    cbid: data.cbid,
                    result: eval(`(${data.method})`)()
                });
            } catch (err) {
                console.warn(err);
            }
            break;

The report lists location.href alongside eval as a concern in the file.

plain_text_workerjs_file.png
plain_text_workerjs_file.png From the original on HackerOne

The screenshot shows the plain-text worker.js file as served.

Root cause

For the first issue, the support application takes text from the URL path and renders it into the page without preventing the visitor from mistaking it for site-authored content. The origin stays genuine, so the browser's address bar offers no warning; the deception lives entirely in the page body. The report does not describe any server-side validation or encoding that would have stopped the reflection.

For the second issue, the build and deployment process ships worker.js to production without minification or uglification. Minification is not a security control in itself, but it raises the effort needed to read logic and spot sinks. Here the logic is plainly readable and includes an eval of message-supplied data, which the researcher flagged as a future attack surface.

Impact

The researcher's stated impact is crafted phishing attacks on cs.money. An attacker can send a link to support.cs.money whose path contains a tempting message, such as a discount or a notice that the site has moved, and direct the victim to an attacker-controlled domain. The victim sees the message on the genuine support domain, which lends it credibility. The attack requires the victim to follow the crafted link and then act on the instruction in the injected text.

The second issue is presented as a risk rather than a demonstrated exploit: readable business logic and an eval sink might let an attacker craft attacks in future. The report does not show a working exploit through worker.js.

Fix

Variants to test

  1. Reflected path text on other subdomains. Try paths containing a domain name and a call to action on support, help and status hosts. A positive result is a page on the genuine origin that displays the attacker's text as if the site wrote it.
  2. Other reflection points in the same application. Test query parameters and path segments that appear in error pages or notices. A positive result is attacker text rendered in a context a user would trust.
  3. Unminified production assets. Request JavaScript bundles and workers directly and inspect the response. A positive result is readable source containing sinks such as eval, location.href or message handlers.
  4. Message-driven eval sinks. Where a worker evaluates message data, check whether the page or another origin can post a message to it. A positive result is code execution from a message the attacker can influence.

Hunting notes

Content spoofing tends to hide in error pages, redirect notices and any view that echoes part of the URL. During recon, look for subdomains that render path or query text back to the user, and check whether the reflected text can name a domain or make an offer. The signal is a page whose body content is clearly derived from the request while the origin remains the target's own.

Unminified assets are easy to spot: fetch the JavaScript files referenced by the site and look at the formatting. Readable source with eval, location.href or postMessage handlers is worth a closer look.

The researcher supplied a URL and attached screenshots. The second issue was supported by the exact URL, the relevant snippet and a screenshot of the plain-text file, but no exploit was demonstrated.

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 is a marketplace where people buy and sell items from games. Someone looked at two parts of its website and found two separate problems.

The first problem is on the support site, https://support.cs.money. That site takes some of the text out of the web address (the URL) you type in and shows it on the page. Because the page still lives on the real support.cs.money address, a visitor has no easy way to tell that the words on the page were put there by whoever made the link, not by CS Money. An attacker can use this to make a page that looks official say something like "we have moved, visit this other site" or "here is a discount", and send people to a fake site. This kind of trick is called content spoofing or text injection.

The second problem is a file called worker.js that the main site hands out to anyone who asks for it. It is written in JavaScript, the language browsers use to run interactive parts of a page. Normally companies squash production JavaScript into a dense, hard-to-read form (called minifying and uglifying) so it loads faster and is harder to study. This file was left in its original, easy-to-read form, and it contains real business logic plus a command called eval, which runs whatever text it is given as code. The researcher saw this as a risk for future attacks rather than something exploited on the spot.

Context

The target is CS Money, a marketplace for in-game items, and the report covers two separate issues found on its infrastructure. The first is a content spoofing / text injection flaw on https://support.cs.money, the support subdomain. The second is that a production JavaScript file, worker.js, is served to any user without being minified or uglified, exposing business logic and a call to eval.

A subdomain is a section of a website that sits under the main name, like a department inside a company: support.cs.money is the support department of cs.money. A JavaScript file is a text file of instructions that a browser downloads and runs; worker.js is one such file, and the name suggests it runs in a background worker, a separate thread that does work without freezing the page.

The feature that matters for the first issue is the support site's handling of the request path. When a user follows a crafted URL, the site renders a message that appears to belong to support.cs.money, even though the path contains attacker-chosen text. That is the classic content spoofing pattern: the origin in the address bar is genuine, but the page content is not.

The request path is the part of a URL after the domain name, for example the /support in https://example.com/support. The origin is the combination of protocol, domain and port that tells the browser which site it is talking to, and it is what the address bar shows. Content spoofing means making a real site display words the site's owners never wrote, so that visitors trust them.

Setup

No accounts, roles, tools or versions are described in the report. The researcher worked against the public site and the public JavaScript asset. The only precondition for the first issue is that a victim follows a crafted link; for the second, that anyone can request the JavaScript file.

In other words, you do not need to log in or install anything special to repeat what was done. You need a browser, the ability to paste a link, and the ability to open a file's address to see what comes back.

Finding it

The researcher noticed that the support domain reflects text taken from the URL path into the page. Because the reflected text is rendered on a page served from support.cs.money, an attacker can make the page say things the site never intended, such as a discount offer, and point the user towards an attacker-controlled domain.

"Reflects" means the site takes something you sent and echoes it back on the page. Think of a shop that prints your name on a receipt: whatever you typed at the till appears on the paper. If the shop prints whatever you type without checking it, you could type a fake announcement and it would look like the shop wrote it.

Separately, while looking at the site's JavaScript, the researcher found that https://cs.money/js/worker.js is served in readable form. The file contains business logic deployed in production without minification or uglification, and it uses location.href and eval. The researcher considered this a risk because readable logic and an eval sink make it easier for an attacker to craft future attacks.

Business logic means the rules the site follows, such as how prices are calculated or how a request is routed. A sink is a place in code where data ends up being used in a sensitive way, like a drain where everything poured in flows out. location.href is the browser property that holds the current page address and can be used to send the browser somewhere else. eval takes a piece of text and runs it as code.

Exploitation

Step 1: craft a URL with injected text in the path

The researcher supplied the following proof-of-concept URL:

Text
https://support.cs.money//.cs.money(!has-moved-to-[www.support.cs.money.in]).Please-visit__[www.cs.money.in]___present__resource

Line by line, in plain words:

  • https://support.cs.money is the real support site, so the address bar will show the genuine domain.
  • The double slash // starts the path in an unusual way; the site apparently takes what follows and puts it on the page.
  • .cs.money(!has-moved-to-[www.support.cs.money.in]) is text designed to read like a notice that the site has moved to another address.
  • .Please-visit__[www.cs.money.in]___present__resource adds a call to visit a domain and a word suggesting a present or discount, to tempt the reader.

The path segment after the double slash carries the attacker's message: a claim that the site has moved, a domain name to visit, and a word suggesting a present or discount. When a victim opens the link, the page is still served from support.cs.money, so the message appears to come from the genuine site. The attacker's goal is to tempt the user into visiting the domain named in the injected text, which the researcher describes as a phishing site.

Phishing is when an attacker pretends to be someone you trust to get you to hand over details or visit a harmful site. The trick here is that the link starts with the real domain, so a cautious user who glances at the beginning of the address sees nothing wrong.

Phising_attack.png
Phising_attack.png From the original on HackerOne

The screenshot shows the resulting page with the injected text rendered on the support domain.

Step 2: request the unminified worker file

The second issue is reached with a simple GET to the JavaScript asset:

Text
https://cs.money/js/worker.js?language=en&v=1331&csrf_token=[removed]

Line by line, in plain words:

  • https://cs.money/js/worker.js is the address of the JavaScript file itself.
  • The ? marks the start of the query string, extra information sent along with the request.
  • language=en tells the server the page language is English.
  • v=1331 is a parameter in the URL.
  • csrf_token=[removed] is a parameter in the URL.

A GET is the ordinary kind of web request a browser makes when you open a page or a file: you ask for something and the server sends it back. You can make one by pasting the address into the browser's address bar.

The response is the worker script in readable form. The researcher highlighted the following snippet, which handles a method message and evaluates the method string supplied in the message data:

JavaScript
case 'method':
            try {
                postMessage({
                    cbid: data.cbid,
                    result: eval(`(${data.method})`)()
                });
            } catch (err) {
                console.warn(err);
            }
            break;

Line by line, in plain words:

  • case 'method': means this block runs when the incoming message is labelled method.

  • try { starts a guarded section: if anything inside fails, the failure is caught instead of crashing everything.

  • postMessage({ sends a message back to whoever is listening, and the message is an object (a bundle of named values).

  • cbid: data.cbid, copies a value called cbid from the incoming message into the reply, so the other side can match the answer to its request.

  • result: eval((${data.method}))() takes the text in data.method, wraps it in brackets, runs it as code with eval, and then calls the result as a function. Whatever string arrives is treated as code.

  • }); closes the message object and the send call.

  • } catch (err) { catches any error thrown above.

  • console.warn(err); prints the error to the browser's developer console as a warning.

  • } closes the catch block.

  • break; leaves the case block so no other case runs.

    The report lists location.href alongside eval as a concern in the file.

plain_text_workerjs_file.png
plain_text_workerjs_file.png From the original on HackerOne

The screenshot shows the plain-text worker.js file as served.

Root cause

For the first issue, the support application takes text from the URL path and renders it into the page without preventing the visitor from mistaking it for site-authored content. The origin stays genuine, so the browser's address bar offers no warning; the deception lives entirely in the page body. The report does not describe any server-side validation or encoding that would have stopped the reflection.

Validation means checking input against rules before using it; encoding means converting special characters so they are displayed as text rather than treated as instructions. Neither is described here, which is why the text appears as written.

For the second issue, the build and deployment process ships worker.js to production without minification or uglification. Minification is not a security control in itself, but it raises the effort needed to read logic and spot sinks. Here the logic is plainly readable and includes an eval of message-supplied data, which the researcher flagged as a future attack surface.

An attack surface is the total set of places where an attacker could try to get in or influence behaviour. Readable code with an eval that runs message data is one such place.

Impact

The researcher's stated impact is crafted phishing attacks on cs.money. An attacker can send a link to support.cs.money whose path contains a tempting message, such as a discount or a notice that the site has moved, and direct the victim to an attacker-controlled domain. The victim sees the message on the genuine support domain, which lends it credibility. The attack requires the victim to follow the crafted link and then act on the instruction in the injected text.

The second issue is presented as a risk rather than a demonstrated exploit: readable business logic and an eval sink might let an attacker craft attacks in future. The report does not show a working exploit through worker.js.

Fix

Variants to test

  1. Reflected path text on other subdomains. Try paths containing a domain name and a call to action on support, help and status hosts. A positive result is a page on the genuine origin that displays the attacker's text as if the site wrote it.
  2. Other reflection points in the same application. Test query parameters and path segments that appear in error pages or notices. A positive result is attacker text rendered in a context a user would trust.
  3. Unminified production assets. Request JavaScript bundles and workers directly and inspect the response. A positive result is readable source containing sinks such as eval, location.href or message handlers.
  4. Message-driven eval sinks. Where a worker evaluates message data, check whether the page or another origin can post a message to it. A positive result is code execution from a message the attacker can influence.

Hunting notes

Content spoofing tends to hide in error pages, redirect notices and any view that echoes part of the URL. During recon, look for subdomains that render path or query text back to the user, and check whether the reflected text can name a domain or make an offer. The signal is a page whose body content is clearly derived from the request while the origin remains the target's own.

Recon, short for reconnaissance, is the early stage of looking around a target to see what it exposes. Unminified assets are easy to spot: fetch the JavaScript files referenced by the site and look at the formatting. Readable source with eval, location.href or postMessage handlers is worth a closer look.

The researcher supplied a URL and attached screenshots. The second issue was supported by the exact URL, the relevant snippet and a screenshot of the plain-text file, but no exploit was demonstrated.

Glossary

  • Subdomain: a section of a website under the main name, such as support.cs.money under cs.money.
  • URL: the full web address you type or click, including the domain and the path.
  • Request path: the part of a URL after the domain, such as /support.
  • Origin: the protocol, domain and port that identify which site a browser is talking to.
  • Content spoofing / text injection: making a real site display text the site's owners did not write, so visitors trust it.
  • Phishing: pretending to be a trusted party to trick someone into visiting a harmful site or giving away details.
  • JavaScript: the language browsers run to make pages interactive.
  • Worker: a background script that runs separately from the page so it does not freeze it.
  • Minification / uglification: squashing source code into a dense, hard-to-read form to reduce size and make it harder to study.
  • Business logic: the rules a site follows, such as how it calculates or routes things.
  • Sink: a place in code where data is used in a sensitive way, such as being executed.
  • eval: a JavaScript function that runs a piece of text as code.
  • location.href: the browser property holding the current page address, which can be used to navigate elsewhere.
  • GET: the ordinary web request a browser makes to fetch a page or file.
  • Query string: the extra information after the ? in a URL.
  • CSRF token: a random value a site gives a browser so the server can check a request really came from that browser.
  • Validation: checking input against rules before using it.
  • Encoding: converting special characters so they display as text rather than being treated as instructions.
  • Attack surface: all the places where an attacker could try to get in or influence behaviour.
  • Recon: the early stage of looking around a target to see what it exposes.
  • Severity: a rating of how serious a finding is, here low.

More from CS Money

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Open redirect

The lesson behind this report.

A trusted site forwards users to any address an attacker picks; rarely paid alone, often the missing link in a chain.