Attacker can generate cancelled transctions in a user's transaction history using only Steam ID
The /create-payment endpoint only requires a Steam ID to create a payment, and the attacker can cancel the resulting Cardpay transaction, causing a cancelled transaction to appear in the victim's history. This can be repeated to confuse the user and potentially get their account banned.
- Triaged in 12 days
- Fixed in 26 days
- Paid in 15 days
- Disclosed after 3 months
Summary:
The API endpoint /create-payment requires only the steam ID of the account to create the payment. When this endpoint is called using the cardpay flow, it returns a transaction ID on the Cardpay system. The attacker can access this transaction, and immediately cancel it (or pay it ;) ), which leads to a visible cancelled transaction in the cs.money user's transaction history.
Although there is no impact to the user, they will certainly be confused.
Steps To Reproduce:
Invoke the API call /create-payment as below:
POST https://cs.money/create-payment HTTP/1.1
Host: cs.money
Content-Type: application/json;charset=UTF-8
Cookie: steamid=████████;
{"merchant":"cardpay","amount":10}
You will get a response with a Cardpay order ID and URL:
HTTP/1.1 200 OK
...
{"merchant":"cardpay","orderId":2034944,"success":true,"url":"https://cardpay.com/MI/payment.html?uuid=DaG438Bda6GC13h5db1bGD01"}
You can then cancel the payment by hitting the Cardpay cancel URL:
https://cardpay.com/MI/cancel.html?uuid=DaG438Bda6GC13h5db1bGD01
This will result in a cancelled transaction showing in the user's transaction history of the amount specified by the attacker. The attacker could repeat this numerous times until the account is banned by cs.money (this occurred on one of my test accounts).
Impact
Confusion for the user due to the ability to create many cancelled transactions, potentially leading to the account being banned.
Context
CS Money is a marketplace for in-game items, and the report concerns the payment flow on cs.money. The feature in question is the endpoint that starts a payment: /create-payment. Normally a logged-in user chooses a payment method and an amount, and the site creates an order with the chosen payment provider and hands back a URL where the payment can be completed.
One of the supported providers is Cardpay. When the cardpay merchant is selected, the endpoint returns an order ID on the Cardpay system together with a payment URL. The report shows that this endpoint can be driven with nothing more than the victim's Steam ID, and that the resulting Cardpay order can be cancelled by anyone who knows its identifier.
Setup
The report does not describe the researcher's setup or tooling. The request carries the Steam ID in a cookie named steamid, so the endpoint identifies the account from that cookie rather than from an authenticated session token.
Finding it
The researcher noticed that /create-payment requires only the Steam ID of the account to create a payment. The report says the endpoint requires only the Steam ID of the account to create a payment. Because the cardpay flow returns a transaction ID on the Cardpay system, and Cardpay exposes a cancel URL keyed by the same identifier, the researcher realised that whoever creates the order can also cancel it. That combination is what makes the bug: order creation is authorised by the Steam ID alone, and order cancellation is authorised by nothing more than the order identifier itself.
Exploitation
Step 1: create a payment for the victim's account
The researcher invokes /create-payment with the victim's Steam ID in the steamid cookie and a JSON body selecting the cardpay merchant and an amount:
POST https://cs.money/create-payment HTTP/1.1
Host: cs.money
Content-Type: application/json;charset=UTF-8
Cookie: steamid=████████;
{"merchant":"cardpay","amount":10}
The Cookie header carries the target account's Steam ID, which is the only thing tying the request to a user. The body selects the payment provider (cardpay) and the amount (10). The server accepts the request and creates an order on the victim's behalf.
Step 2: read the order ID and payment URL from the response
The server responds with a Cardpay order ID and a payment URL:
HTTP/1.1 200 OK
...
{"merchant":"cardpay","orderId":2034944,"success":true,"url":"https://cardpay.com/MI/payment.html?uuid=DaG438Bda6GC13h5db1bGD01"}
The response contains a Cardpay order ID and a payment URL. Both are returned to the caller, so the attacker now holds everything needed to act on the order.
Step 3: cancel the order
With the uuid from the payment URL, the researcher hits the Cardpay cancel URL:
https://cardpay.com/MI/cancel.html?uuid=DaG438Bda6GC13h5db1bGD01
The researcher then cancelled the payment by hitting the Cardpay cancel URL. The result is a cancelled transaction, for the amount the attacker chose, appearing in the victim's transaction history on cs.money.
Step 4: repeat
The attacker can repeat the whole sequence numerous times, each time producing another cancelled transaction in the victim's history. The researcher notes the attacker could repeat this numerous times until the account is banned by cs.money, which occurred on one test account.
Root cause
The design flaw is that /create-payment treats the steamid cookie as sufficient proof of identity. The endpoint creates a payment order for whichever account the cookie names, without verifying that the caller controls that account. The endpoint creates a payment for whichever account the Steam ID names.
The second half of the problem sits with the payment provider's cancel flow. The cancel URL is keyed only by the order uuid, and that uuid is handed back to whoever created the order. Since the attacker creates the order, they receive the identifier and can cancel it.
Impact
The direct effect is confusion for the user: cancelled transactions appear in their history for amounts the attacker specified. There is no financial loss to the user described in the report. An attacker can generate these transactions repeatedly, and the researcher notes this could lead to the account being banned by cs.money. The report rates the issue as medium severity with a CVSS score of 6.1, and the program paid a bounty of 300 USD.
Fix
The report does not state what was changed.
Variants to test
- Other payment providers on the same endpoint. Send the same request with a different
merchantvalue and see whether the response still returns an order identifier and a URL that can be acted on by the caller. A positive result is an order created for the victim's account that the attacker can then cancel or otherwise manipulate. - Other endpoints that read the
steamidcookie. Look for any endpoint that takes an account identifier from a cookie or parameter and performs a state change. A positive result is a state change on an account the caller does not control. - Provider-side cancel and refund URLs. For any payment integration, take the order identifier returned at creation and try the provider's cancel, refund or status URLs with it. A positive result is a state change on an order the caller did not legitimately own.
- Order identifier predictability. Try nearby order identifiers against the provider's endpoints. A positive result is a valid response for an order the caller never created.
Hunting notes
This kind of bug tends to hide in payment and checkout endpoints that were built to be called from the front end with an account identifier already in a cookie. The signal during recon is an endpoint that accepts a JSON body naming a merchant and an amount, and that returns a provider URL containing an identifier. If the same identifier appears in a provider-side cancel or status URL, the creation and cancellation paths are worth testing together.
The researcher showed enough impact by demonstrating the full chain: creating the order with only the Steam ID, receiving the provider URL, cancelling it, and observing the cancelled transaction in the victim's history. The researcher notes that repeated attempts led to an account ban on a test account.
What happened, in plain words
CS Money is a website where people buy and sell items that exist inside video games. To buy something, you have to pay real money, and the site lets you choose how you want to pay. One of the payment companies it works with is called Cardpay, which handles card payments.
The researcher found that the part of the CS Money website that starts a payment (called /create-payment) will happily create a payment order for any account, as long as you tell it which account you mean. The only thing it asks for is the account's Steam ID, a public number that identifies a Steam gaming account. It does not check that you actually own that account.
Once the payment order exists, Cardpay gives back a link that can be used to cancel it. Anyone holding that link can cancel the order. So an attacker can create a payment order in someone else's name, cancel it straight away, and the victim sees a cancelled transaction in their history. The attacker can do this over and over. On one of the researcher's test accounts, this eventually got the account banned by CS Money.
No money is lost. The harm is confusion for the victim, plus the risk of a ban caused by transactions they never made.
Background you need first
A few ideas come up again and again in this report. Here they are from scratch.
API and endpoint. A website is not only pages you look at. Behind the scenes, the page in your browser talks to the company's servers by sending small messages and getting answers back. That conversation is called an API (Application Programming Interface). Each specific address that accepts one kind of message is called an endpoint. Think of a restaurant: the menu is the API, and each dish you can order is an endpoint. You say "one soup", the kitchen makes it and hands it back. You do not go into the kitchen yourself.
HTTP request and response. The message your browser sends is an HTTP request. The answer the server sends back is an HTTP response. A request has a method (like POST, meaning "here is some data, please do something with it"), a URL (the address), some headers (extra labels with information), and sometimes a body (the actual data). A response has a status code (like 200 OK, meaning "done") and usually a body with the result.
JSON. A simple text format for structured data, used in the body of these messages. It looks like {"name":"value"}. Curly braces hold a group of labelled values.
Cookie. A small piece of text that a website stores in your browser and that your browser sends back with every request to that site. It is how a site remembers who you are between page loads. Think of it as a wristband at an event: show it at the door and staff let you in without asking your name again. In this report, the cookie is named steamid and holds the account's Steam ID.
Steam ID. A number that identifies a Steam gaming account. It is not secret. Other players, trading sites and game services can see it, which is exactly why it is a poor substitute for proof of identity.
Authentication and authorisation. Authentication is proving who you are (logging in with a password). Authorisation is deciding what you are allowed to do once you are known. A hotel is a good comparison: authentication is showing your key card at the door; authorisation is the card only opening your own room, not every room on the floor.
Improper Authorization. The vulnerability class in this report. It means the system does not properly check whether the person making a request is allowed to do what they are asking. Here, the site lets anyone start a payment for any account, because it treats a public identifier as if it were proof of ownership.
Transaction history. The list of payments and orders shown on a user's account page. Users look at it to see what they have bought or paid for.
Bounty and severity. Companies sometimes pay researchers for finding and reporting bugs. The payment is called a bounty. Severity is a rough rating of how serious the bug is. This report was rated medium, with a CVSS score of 6.1. CVSS is a standard scoring system where higher numbers mean more serious issues. The program paid 300 USD.
Setting up
The report does not describe the researcher's setup.
- A way to send a custom HTTP request to
cs.money. Any HTTP client works, meaning any tool that lets you type a request by hand instead of clicking around a website. - A Steam ID for the account to target.
The request carries the Steam ID in a cookie named steamid.
How the researcher found it
The researcher noticed that /create-payment requires only the Steam ID of the account to create a payment. The report says the endpoint requires only the Steam ID of the account to create a payment.
Then came the second observation. When the cardpay flow is used, the response includes a transaction ID on the Cardpay system. Cardpay also has a cancel link that works with that same identifier. Put together: whoever creates the order also receives the identifier, and the identifier is all that is needed to cancel. That combination is the bug. Creating an order is authorised by the Steam ID alone, and cancelling it by the order identifier.
Exploitation, step by step
Step 1: create a payment for the victim's account
The researcher sends a request to /create-payment with the victim's Steam ID in the steamid cookie, and a JSON body that picks the cardpay payment provider and an amount:
POST https://cs.money/create-payment HTTP/1.1
Host: cs.money
Content-Type: application/json;charset=UTF-8
Cookie: steamid=████████;
{"merchant":"cardpay","amount":10}
Line by line:
POST https://cs.money/create-payment HTTP/1.1is the request line.POSTsays "I am sending data and asking you to act on it". The URL is the endpoint that starts a payment.HTTP/1.1is the version of the protocol being spoken.Host: cs.moneytells the server which website the request is for. One server can host many sites, so this label says which one.Content-Type: application/json;charset=UTF-8announces that the body is JSON text, encoded in UTF-8 (a standard way of representing characters).Cookie: steamid=████████;is the important line. It carries the target account's Steam ID. This is the only thing tying the request to a user. The value is redacted here because it identifies a real account.- The blank line separates the headers from the body.
{"merchant":"cardpay","amount":10}is the body.merchantselects the payment provider, herecardpay.amountis the sum to charge, here10.
The server accepts the request and creates an order on the victim's behalf.
Step 2: read the order ID and payment URL from the response
The server answers with a Cardpay order ID and a payment URL:
HTTP/1.1 200 OK
...
{"merchant":"cardpay","orderId":2034944,"success":true,"url":"https://cardpay.com/MI/payment.html?uuid=DaG438Bda6GC13h5db1bGD01"}
Line by line:
HTTP/1.1 200 OKis the status line.200means the request succeeded....stands for response headers the report does not show.- The body is JSON.
merchantrepeats the provider.orderIdis the Cardpay order number.successistrue, confirming the order was created.urlis the payment page on Cardpay's side. - Inside that URL,
uuid=DaG438Bda6GC13h5db1bGD01is a parameter that identifies this particular payment on Cardpay's system. A UUID here is just a long random-looking string used as an identifier.
Both the order ID and the URL are returned to whoever sent the request. That means the attacker now holds everything needed to act on the order. This step matters because the identifier in the URL is the key to the next step.
Step 3: cancel the order
Using the uuid from the payment URL, the researcher opens the Cardpay cancel address:
https://cardpay.com/MI/cancel.html?uuid=DaG438Bda6GC13h5db1bGD01
Line by line:
https://cardpay.com/MI/cancel.htmlis Cardpay's cancel page.?uuid=DaG438Bda6GC13h5db1bGD01passes the same identifier that appeared in the payment URL. The question mark starts the list of parameters, anduuidis the parameter name.
The cancel page takes the same uuid as the payment page and cancels the order. No further authorisation is described. The result is a cancelled transaction, for the amount the attacker chose, appearing in the victim's transaction history on cs.money. The result is a cancelled transaction in the victim's transaction history.
Step 4: repeat
The attacker can run the whole sequence many times, each time producing another cancelled transaction in the victim's history. The researcher notes that this continued until the account was banned by cs.money, which happened on one of the test accounts used during the work. The researcher notes the attacker could repeat this until the account is banned by cs.money.
Why it works
The design flaw is that /create-payment treats the steamid cookie as sufficient proof of identity. The endpoint creates a payment order for whichever account the cookie names, without checking that the caller controls that account. The endpoint creates a payment for whichever account the Steam ID names.
The second half of the problem sits with the payment provider's cancel flow. The cancel URL is keyed only by the order uuid, and that uuid is handed back to whoever created the order. Since the attacker creates the order, they receive the identifier and can cancel it.
Impact
The direct effect is confusion for the user: cancelled transactions appear in their history for amounts the attacker specified. There is no financial loss to the user described in the report. An attacker can generate these transactions repeatedly, and the researcher notes this could lead to the account being banned by cs.money. The report rates the issue as medium severity with a CVSS score of 6.1, and the program paid a bounty of 300 USD.
Fix
Variants to test
- Other payment providers on the same endpoint. Send the same request with a different
merchantvalue and see whether the response still returns an order identifier and a URL that can be acted on by the caller. A positive result is an order created for the victim's account that the attacker can then cancel or otherwise manipulate. - Other endpoints that read the
steamidcookie. Look for any endpoint that takes an account identifier from a cookie or parameter and performs a state change. A positive result is a state change on an account the caller does not control. - Provider-side cancel and refund URLs. For any payment integration, take the order identifier returned at creation and try the provider's cancel, refund or status URLs with it. A positive result is a state change on an order the caller did not legitimately own.
- Order identifier predictability. Try nearby order identifiers against the provider's endpoints. A positive result is a valid response for an order the caller never created.
Hunting notes
This kind of bug tends to hide in payment and checkout endpoints that were built to be called from the front end with an account identifier already in a cookie. The signal during recon is an endpoint that accepts a JSON body naming a merchant and an amount, and that returns a provider URL containing an identifier. If the same identifier appears in a provider-side cancel or status URL, the creation and cancellation paths are worth testing together.
The researcher showed enough impact by demonstrating the full chain: creating the order with only the Steam ID, receiving the provider URL, cancelling it, and observing the cancelled transaction in the victim's history. The researcher notes that repeated attempts led to an account ban on a test account.
Glossary
- API: the set of messages a website's servers accept and answer, so that pages and apps can ask for things to be done.
- Endpoint: one specific address in an API that accepts one kind of request.
- HTTP request: the message a browser or tool sends to a server, with a method, URL, headers and sometimes a body.
- HTTP response: the server's answer, with a status code and usually a body.
- Status code: a number in the response saying how it went, such as
200for success. - Header: an extra labelled line in a request or response carrying information such as the content type or a cookie.
- Body: the data part of a request or response, here JSON text.
- JSON: a plain text format for labelled data, written with curly braces and quotes.
- Cookie: a small piece of text stored by the browser and sent back to a site with each request, used to remember who you are.
- Steam ID: a public number identifying a Steam gaming account.
- Authentication: proving who you are, for example by logging in.
- Authorisation: deciding what a known user is allowed to do.
- Improper Authorization: a flaw where the system does not properly check whether the caller is allowed to perform the action.
- Payment provider: an outside company that handles payments, here Cardpay.
- Merchant: the label in the request that selects which payment provider to use.
- Order ID: the number a payment provider assigns to a payment order.
- UUID: a long random-looking string used as an identifier, here identifying a payment on Cardpay's side.
- CVSS: a standard scoring system for rating the severity of a security issue; higher numbers mean more serious.
- Bounty: a payment a company makes to a researcher who reports a valid bug.
- Severity: a rough rating of how serious a bug is, here medium.
- Recon: the early stage of looking around a target to find interesting endpoints and behaviour.
- Enumeration: trying a series of nearby values, such as consecutive numbers, to find ones that exist.