Skip to content
Access control Disclosed report Beginner

Team admin can change unauthorized team setting (require_at_for_mention)

A team admin could change the 'require_at_for_mention' setting, which is restricted to team owners, by sending a crafted API request. This allowed an admin to escalate privileges and modify a setting they should not control.

satishb3 Follow

Originally disclosed on HackerOne

Bounty$200 View original
  • Triaged in 10 hours
  • Fixed in 6 days
  • Paid in 56 days
  • Disclosed after 3 months

Team admin can escalate his privileges and change 'require_at_for_mention' team setting, which can be changed only by a team owner.

Steps to reproduce:

  1. Log in as team admin
  2. Send the below request using his token and notice that it changes 'require_at_for_mention' setting to true.

POST /api/team.prefs.set?t=1423143830 HTTP/1.1 Host: satishb3mailinator.slack.com User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:34.0) Gecko/20100101 Firefox/34.0 Content-Type: application/x-www-form-urlencoded; charset=UTF-8 Referer: https://satishb3mailinator.slack.com/admin/settings Content-Length: 130 Cookie: _ga=GA1.2.630936366.1423056192; a-3204538285=...

prefs=%7B%22require_at_for_mention%22%3Atrue%7D&token=xoxs-xxxxx&set_active=true&_attempts=1

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

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 4 min read.

What the report shows

The target is Slack's team preferences API, specifically the require_at_for_mention setting. That setting controls whether members must use an @-mention to notify someone, and according to the report it can normally be changed only by a team owner.

The researcher found that a team admin, a lower-privileged role, could still change it. The steps given are short:

  1. Log in as a team admin.
  2. Send the request below using the admin's token, and observe that the require_at_for_mention setting is changed to true.
HTTP
POST /api/team.prefs.set?t=1423143830 HTTP/1.1
Host: satishb3mailinator.slack.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:34.0) Gecko/20100101 Firefox/34.0
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer: https://satishb3mailinator.slack.com/admin/settings
Content-Length: 130
Cookie: _ga=GA1.2.630936366.1423056192; a-3204538285=...

prefs=%7B%22require_at_for_mention%22%3Atrue%7D&[redacted]&set_active=true&_attempts=1

The body carries a prefs parameter whose value is URL-encoded JSON, {"require_at_for_mention":true}, together with the admin's API token, set_active=true and _attempts=1. The request is sent to the team.prefs.set endpoint on the team's own subdomain, with the admin settings page as the referer.

The report records a bounty of 200.00 USD and was disclosed on 30 April 2015. It does not give a severity rating, a CVSS score or details of the fix.

Root cause

The behaviour is consistent with a missing authorisation check on the server side, though the report does not state a cause. The admin settings page is reachable by a team admin, and the API endpoint behind it, team.prefs.set, appears to accept the request based on the caller's token without verifying that the caller holds the role required for that particular preference.

Impact

A team admin can escalate their effective privileges and change a team-wide setting that only an owner should control. In this case the change is to require_at_for_mention, which alters notification behaviour for the whole team.

How this kind of bug works

Role-based access control usually has several layers: the UI hides controls a role should not use, the API checks who is calling, and the API checks whether that caller may perform the specific action. Bugs of this class appear when the third layer is missing or incomplete. The endpoint authenticates the session or token, so the request is not anonymous, but it never compares the caller's role against the role the action requires. Because the UI only hides the control, an attacker who reads the page source, watches the network tab or guesses the endpoint can send the request directly.

The same pattern appears wherever a single endpoint serves several roles or several settings with different sensitivity. If authorisation is decided once for the endpoint rather than per action or per field, a lower role can reach operations meant for a higher one. Defences are server-side role checks on every state-changing action, ideally enforced centrally so a new setting cannot be added without a matching rule.

How to test for it

  1. Map the roles available in the application and create an account for each, including the lowest privileged role that can still reach the administrative area.
  2. As the highest role, perform each privileged action while capturing the request: the endpoint, method, parameters and any role or setting identifiers.
  3. Replay each captured request with the lower role's session or token, changing only the credential.
  4. Compare the response and the resulting state. A positive result is a successful state change, confirmed by reloading the page or reading the setting back, not merely a 200 status.
  5. Try variations: remove or alter role parameters, change setting names in the body, and send requests the UI never offers to that role.

Common false positives are responses that return 200 with an error body, changes that are silently ignored, or actions the lower role is in fact permitted to perform. Always confirm the change persisted and that the lower role could not have made it through the normal interface.

How it is fixed

A server-side authorisation check that verifies the caller's role against the role required for the specific setting would address this class of bug. Authorisation should be enforced per action and per field, not once per endpoint, and it should live in shared middleware so new settings inherit it. Returning a clear forbidden response for disallowed roles, and adding tests that replay privileged requests with lower roles, prevents regressions.

Hunting notes

This bug class tends to hide in administrative settings pages, team and organisation management, billing and plan changes, and any endpoint that accepts a settings object or a list of preferences. Recon signals include endpoints named after settings or preferences, request bodies containing JSON blobs of key/value pairs, and UI controls that are hidden rather than disabled for lower roles. To make a report accepted, show the exact request, the role used, the before and after state, and a short note on why the action should be restricted to a higher role. A reproducible state change with a clear role boundary is far stronger than a status code alone.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 8 min read.

What happened, in plain words

Slack is a chat tool for teams. Each team has members, and some members have extra powers. A team owner is the person at the top: they can change every setting. A team admin is one step below: they can manage people and settings, but some things are reserved for the owner.

One of those reserved settings is called require_at_for_mention. It controls how people get notified in a channel. When it is on, you have to type an @-mention (for example @ana) to alert someone; a plain message does not notify them. According to the report, only a team owner is supposed to be able to change this setting.

The researcher found that a team admin could change it anyway. The server accepted the change when the request was sent directly with the admin's token. This is a privilege escalation: a user with lower rights manages to do something that should require higher rights.

The report gives two steps:

  1. Log in as a team admin.
  2. Send the request below using the admin's token, and notice that the require_at_for_mention setting is changed to true.
HTTP
POST /api/team.prefs.set?t=1423143830 HTTP/1.1
Host: satishb3mailinator.slack.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:34.0) Gecko/20100101 Firefox/34.0
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer: https://satishb3mailinator.slack.com/admin/settings
Content-Length: 130
Cookie: _ga=GA1.2.630936366.1423056192; a-3204538285=...

prefs=%7B%22require_at_for_mention%22%3Atrue%7D&[redacted]&set_active=true&_attempts=1

A request is the message your browser sends to a website's server when you click something or load a page. It has a first line saying what you want, a set of headers (extra information), and often a body with data. Let us go through this one line by line.

  • POST /api/team.prefs.set?t=1423143830 HTTP/1.1 is the request line. POST means "I am sending data to be saved". /api/team.prefs.set is the address of the function on the server that saves team preferences. ?t=1423143830 is a small extra value attached to the address. HTTP/1.1 is the version of the web protocol being used.
  • Host: satishb3mailinator.slack.com says which website the request is for. Here it is the team's own Slack address, so the server knows which team's settings are being changed.
  • User-Agent: ...Firefox/34.0 tells the server which browser sent the request. It is normal background information.
  • Content-Type: application/x-www-form-urlencoded; charset=UTF-8 says how the body is formatted: as a list of name=value pairs, the same format a web form uses.
  • Referer: https://satishb3mailinator.slack.com/admin/settings says which page the request came from, here the admin settings page. Servers sometimes look at this, but it is easy to fake, so it should never be the only protection.
  • Content-Length: 130 is the size of the body in bytes.
  • Cookie: _ga=...; a-3204538285=... carries cookies, small pieces of text the browser stores for a site and sends back with every request. They are how a site remembers who you are between page loads. The cookies are sent with the request; the report does not explain them.

The blank line separates the headers from the body. The body is:

Text
prefs=%7B%22require_at_for_mention%22%3Atrue%7D&[redacted]&set_active=true&_attempts=1

It has four parts joined by &:

  • prefs=%7B%22require_at_for_mention%22%3Atrue%7D is the actual setting change. The value looks unreadable because it is URL-encoded: characters that are not allowed in a URL are replaced by codes starting with %. Decoded, %7B is {, %22 is ", %3A is : and %7D is }, so the value is the JSON {"require_at_for_mention":true}. JSON is a simple text format for structured data, here a name and a value: the setting name, and true meaning "on".
  • `[redacted] is the admin's API token, a long secret string that proves who is making the request, much like a password that is sent with each call. The report shows it masked.
  • set_active=true and _attempts=1 are extra parameters the endpoint expects. The report does not explain what they do.

Why does each step matter? Logging in as a team admin first is what gives the researcher a valid token and session cookie for that role. Sending the request directly, instead of clicking in the interface, is the whole trick: the web page probably hides or disables this control for admins, but hiding a button does not stop anyone from sending the request by hand. The server then has to decide for itself whether the caller is allowed, and here it did not.

The report records a bounty of 200.00 USD and was disclosed on 30 April 2015.

In general, how this kind of bug works

Websites usually decide what you may do with role-based access control. Each user has a role (member, admin, owner), and each action requires a certain role. Good protection has layers: the interface hides controls you should not use, and the server checks who is calling and whether that caller may perform this specific action.

This bug appears when the last check is missing. The request carried a valid admin token, so it was not anonymous, yet the change reserved for the owner went through. The interface only hid the control; the endpoint behind it accepted the request anyway.

The same pattern shows up wherever one endpoint serves several roles or several settings of different sensitivity. If permission is decided once for the whole endpoint rather than for each action or each field, a lower role can reach operations meant for a higher one. The defence is a server-side role check on every action that changes something, ideally in one shared place so a new setting cannot be added without a matching rule.

To test for it, you would:

  1. List the roles in the application and create an account for each, including the lowest role that can still reach the admin area.
  2. As the highest role, perform each privileged action while capturing the request: address, method, parameters and any setting names.
  3. Replay each captured request with the lower role's session or token, changing only the credential.
  4. Compare the response and the resulting state. A real finding is a change that actually happened, confirmed by reloading the page or reading the setting back, not just a success status code.
  5. Try variations: remove or alter role parameters, change setting names in the body, and send requests the interface never offers to that role.

Common false positives are replies that say "OK" but contain an error, changes that are silently ignored, or actions the lower role is in fact allowed to do. Always confirm the change persisted and that the lower role could not have made it through the normal interface.

A server-side check comparing the caller's role with the role required for the specific setting would address this class of bug. A clear "forbidden" response for disallowed roles, plus tests that replay privileged requests with lower roles, keeps the bug from coming back.

This kind of bug tends to hide in admin settings pages, team and organisation management, billing and plan changes, and any endpoint that accepts a settings object or a list of preferences. Useful signals are endpoints named after settings or preferences, request bodies containing JSON key/value pairs, and controls that are hidden rather than disabled for lower roles. To get a report accepted, show the exact request, the role used, the state before and after, and a short note on why the action should be restricted to a higher role. A reproducible change with a clear role boundary is far stronger than a status code alone.

Glossary

  • Team owner: the highest role in a Slack team, able to change every setting.
  • Team admin: a role below owner that can manage people and some settings, but not everything.
  • Privilege escalation: a user with lower rights managing to perform an action reserved for higher rights.
  • Setting: a stored preference that changes how the product behaves for the whole team.
  • require_at_for_mention: the setting in this report; when on, members must use an @-mention to notify someone.
  • Request: the message a browser sends to a server asking for a page or an action.
  • Response: the message the server sends back.
  • Header: a line of extra information in a request or response, such as the host or content type.
  • Body: the part of a request that carries data, such as form fields.
  • POST: an HTTP method meaning "send data to be saved or processed".
  • Endpoint: a specific address on a server that performs one function, here /api/team.prefs.set.
  • API: a set of endpoints a program (or a person with a tool) can call directly, without using the normal web pages.
  • Cookie: a small piece of text a browser stores for a site and sends back with each request, often used to remember a login.
  • Session: the server's record of a logged-in user, usually linked to a cookie.
  • Token (API token): a secret string that proves who is making a request, similar to a password sent with each call.
  • URL encoding: replacing characters that are not allowed in a URL with % codes, for example %22 for a double quote.
  • JSON: a text format for structured data made of names and values.
  • Parameter: a named value sent with a request, such as token or prefs.
  • Referer: a header saying which page the request came from; easy to fake.
  • User-Agent: a header saying which browser and system sent the request.
  • Role-based access control: giving each user a role and deciding which actions each role may perform.
  • Authentication: proving who you are, for example with a token or a login.
  • Authorisation: deciding whether an identified user is allowed to do a particular action.
  • Server-side check: a check performed on the server, which the user cannot bypass by editing the page.
  • State change: a lasting change to stored data, such as a setting being switched on.
  • False positive: a result that looks like a bug but is not one.
  • Bounty: a payment a company makes to a researcher who reports a valid security bug.
  • CVSS: a standard scoring system for the severity of a vulnerability.

More by satishb3

View all

12 more disclosed reports, best first.

More from Slack

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.