Skip to content
Messaging · Secret guide

Leaked Slack Configuration Token: what to do in the first hour

High severityDetected onlyLast verified · 5 min read

A Slack configuration token is used to create and update Slack apps through their manifests, using the app management API, instead of clicking through the console. It acts as the person who generated it, for their apps in a given workspace. A leaked configuration token therefore does not read messages directly; the danger is that someone can change your apps: scopes, event subscriptions, redirect URLs, or create new apps that the workspace could later be asked to install. The token comes in two parts, a short-lived access token and a refresh token, and the refresh token is the more dangerous one because it keeps producing new access tokens. Rotate or revoke first, then check your apps.

Check your GitHub account for leaked secrets — free

Provider
Slack
Severity
High
Impact
SaaS account access and billing
Checked live by LeakWatch
No

What a Slack Configuration Token looks like

A configuration token starts with xoxe, which sets it apart from the bot (xoxb-) and user (xoxp-) tokens. There are two forms:

xoxe.xoxp-1-XXXX…   access token (masked, 160+ characters after the first digit)
xoxe-1-XXXX…        refresh token (masked, about 146 characters after the first digit)

The access token starts with xoxe.xoxp- (or xoxe.xoxb-), a digit and then a long run of capital letters and digits. The refresh token starts with xoxe-, a digit and then a run of capital letters and digits. These tokens are generated on the app configuration page of the Slack API site for a workspace. The access token expires after a short time, so a leaked access token is useful for a limited window, while a leaked refresh token can be exchanged for new pairs until it is rotated or revoked. They usually appear together, in variables with names containing CONFIG_TOKEN or REFRESH_TOKEN, or in scripts that call the manifest methods.

How Slack Configuration Tokens get leaked

  • Manifest automation scripts. A script that keeps app manifests in version control and pushes them to Slack, with both tokens written in the script or in a nearby .env.
  • CI pipelines. A deployment job that updates the app manifest on each release, with the token stored in the workflow file instead of a secret.
  • Local tooling output. Command output or a cache file from tooling that stores the token pair, committed by accident with the rest of the working directory.
  • Shared notes and tickets. The tokens copied from the console into a wiki page or an issue to hand over a task.
  • Public repositories of templates. A starter project for Slack apps where a real pair replaced the placeholder values.

What to do in the first hour

  1. Rotate or revoke the token. The refresh token is what matters. Use the configuration token section of the Slack API console to generate a fresh pair, or use the documented rotation method of the app management API, which invalidates the previous refresh token. Check the Slack documentation to see whether a separate revoke call exists for your case.
  2. Store the new pair in your secret manager, not in the repository, and update the automation that uses it.
  3. Audit your apps. For every app that the token could reach, review the scopes, event subscription URLs, interactivity URL, slash commands, OAuth redirect URLs and the list of collaborators. Compare them with your own manifest in version control, which is a reliable reference.
  4. Look for apps you did not create. Check the list of apps owned by the person who generated the token.
  5. Review workspace logs. A workspace owner can look at the access and audit logs for your plan, for app installs and changes around the time of the exposure.
  6. Rotate the secrets of any app that was modified, such as its client secret and signing secret. See also Slack API token.
  7. Clean up the code and the history. See I accidentally pushed an API key to GitHub.

Not sure what else leaked from the same repository? Run a free scan.

Not sure what else leaked? Run a free scan.

Revoke it at Slack

Configuration tokens are generated and managed on the app configuration area of the Slack API console, signed in as the person who owns the tokens. Look for the section where configuration tokens are listed for each workspace, and generate a new pair or revoke the existing one there. Rotation through the API is described in the Slack documentation at https://docs.slack.dev/. A person has not confirmed the exact menu wording for this guide, and the interface can change, so if the page differs from this description, follow the Slack documentation.

How LeakWatch detects it

There are two rules. The one called Slack Config Access Token matches xoxe.xoxb- or xoxe.xoxp- (the separator after xoxe may be a dot or another single character), a digit, a dash and then 163 to 166 capital letters or digits, in any letter case. The one called Slack Config Refresh Token matches xoxe-, a digit, a dash and exactly 146 letters or digits. Strings with the right prefix but a shorter body are not reported, and bot or user tokens belong to other rules. Neither rule needs a variable name nearby. The severity of both is high. This type is not checked live: LeakWatch does not send any request to Slack with the tokens it found.

LeakWatch detects this format but does not check it live: it can tell you the key is exposed, not whether it still works. Assume it does until you have revoked it.

FAQ

Which one is worse to leak, the access token or the refresh token?

The refresh token. The access token expires quickly, but the refresh token can generate new pairs until it is rotated or revoked. Rotate both in any case.

Can a configuration token read my channels?

Not directly. It manages app definitions. But by changing scopes or redirect URLs of an app, an attacker can prepare a path to data, so review the apps.

Is a configuration token the same as a bot token?

No. A bot token (xoxb-) calls the Web API as a bot user. A configuration token (xoxe) manages apps themselves. They are generated in different places.

Get alerted next time a secret leaks — create a free account

LeakWatch is not affiliated with Slack.