Manipulate Uneditable Messages in Support
The support section allowed editing messages only for a limited time, but the server did not enforce this limit. An attacker could edit any old message by supplying its original creation date in the edit request.
Originally disclosed on HackerOne
- Disclosed after 26 days
Summary:
Hello,
The support section has a validation on all the posted messages where it doesn't allow you to edit your messages after some minutes from posting them. I was able to bypass this protection and edit successfully the previous messages that can't be edited.
After further investigation, I found that whenever you create/send a message, there is a date value made of numbers generated in the response which indicates the timestamp or the date that the message was created. And when you edit that message, the same value is used as a date parameter in the edit request.
The bug is that the date parameter is still active for the unedited messages, so when you perform an editable request having the old unedited message's date value as a date parameter, the request will be successful and the new edit text will be successfully applied.
Steps To Reproduce:
- So first you need to identify the message initial date, send a message in the support section, intercept its request and see the response containing the target date.
█████████
Host: support.cs.money
{"user_steamid":"id-number","text":"test","settings":{"skin_exterior":0,"eco":0,"unavailable":1,"hints_in_trade":1,"lock_skin":0,"popup_skin":1,"reserved_skin":1,"save_filter":0,"virtual_trade":0,"skins_ticker":1,"beautiful_pics":1,"skins_float":0,"rarity":0,"collection":0,"conveyor":1,"block_red_points":0,"sourcePay":"scrill"},"bot_mode":"trade","user_mode":"trade"}
██████
'2. Say that you no longer are able to edit the above message created by you. So now create another message. Click edit, send the message and intercept its request.
'3. Add the date value from the step 1 response in the date value, and add the new message content in the new_message value.
███████
Host: support.cs.money
{"date":"date-value","new_message":"Hackerone edited message changed successfully === bug"}
'4. Forward the request and see the response code id 200 OK, Reload the page and see that the message is edited successfully.
Supporting Material/References:
Please see the video below where I explained the bug step-by-step.
█████
Impact
Users are able to edit their old messages that are not supposed to be editable anymore. This can lead to serious issues because they are being edited on the server too. Also this is a bypass for the application validation and violation of its protection. I think this can lead to serious problems if malicious users edit the messages to bad or harmful content.
Best Regards.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the server trusted a client-supplied date parameter to decide whether a message was still editable, instead of checking the actual time elapsed since creation.
Impact
Users could edit their old messages that were not supposed to be editable, potentially changing them to harmful content.
What the attacker needed
A user account on the support platform; ability to intercept HTTP requests
The fix
The server should not accept a client-supplied date parameter to decide editability; it should enforce the time limit itself.
How it was found
- Send a support message and intercept the response to find the message's creation date value.
- Wait until the message can no longer be edited normally, then create a new message and intercept its edit request.
- Replace the date parameter in the edit request with the old message's date value and set the new content.
- Forward the request, see a 200 OK response, and reload the page to confirm the old message was edited.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
The report shows the server accepted an old message's creation date in the edit request, allowing edits after the normal time limit.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.