Skip to content
Messaging · Secret guide

Leaked Webex Access Token: what to do in the first hour

Medium severityDetected onlyLast verified · 5 min read

A Webex access token lets whoever holds it call the Webex REST API as the identity it was issued to: a person, a bot or an integration. Depending on the token and its scopes, that can mean reading and posting messages in spaces, listing people, creating rooms and webhooks, or starting meetings. The main danger is quiet access to internal conversations, and a bot token also lets an attacker write messages that appear to come from a trusted bot. Revoke first, then investigate.

Check your GitHub account for leaked secrets — free

Provider
Webex
Severity
Medium
Impact
SaaS account access and billing
Checked live by LeakWatch
No

What a Webex access token looks like

A Webex access token is a long opaque string of letters, digits, dashes and underscores, with no fixed prefix. Tokens in the wild are typically around 64 to 65 characters long:

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX…   (about 64 or 65 characters, A-Z a-z 0-9 _ -)
Authorization: Bearer XXXXXXXX…

The format does not tell you what kind of token it is. Webex issues several kinds, and the lifetime and the risk differ:

  • Personal access token. Copied from the developer portal for testing. It is short-lived (Webex documents about 12 hours after sign-in) and acts as you.
  • Bot token. Created together with a bot. The bot identity is a user in the @webex.bot domain. Bot tokens are the ones most often left in code, because a bot runs unattended.
  • Integration access token. Issued through OAuth for a user who granted access. It comes with a refresh token, and the refresh token matters as much as the access token.

You will see them in variables such as WEBEX_ACCESS_TOKEN, WEBEX_BOT_TOKEN, WEBEX_TOKEN or in an Authorization: Bearer header sent to webexapis.com.

How Webex access tokens get leaked

  • Bot source code. A chatbot or alerting script written quickly, with the bot token pasted into the file that sends messages.
  • Committed environment files. WEBEX_BOT_TOKEN in a .env, a compose file or a deployment manifest.
  • Postman and curl snippets. A collection or a shell history exported with the bearer header still filled in.
  • Notebooks and demo repositories. A sample that copied a personal access token “just to try it”, then got pushed.
  • CI and chat-ops pipelines. A token printed by a debug step, or stored in a pipeline definition that is public.
  • Support tickets and screenshots. A developer portal page or a terminal captured with the token visible.

What to do in the first hour

  1. Identify the token type. Check whether it is a personal token, a bot token or an integration token, using the variable name and the code that uses it. This decides what you can revoke.
  2. Revoke or replace it. For a bot, generate a new token for the bot in the developer portal so the old one stops working. For an integration, revoke its tokens and rotate the client secret if that leaked as well. A personal token expires by itself, but treat it as exposed until it does. See the section below.
  3. Deploy the new token to the application or secret store, then send a test message.
  4. Check what the token could do. List the spaces the bot or user belongs to, and review the scopes of the integration. Anything readable in those spaces should be treated as seen.
  5. Look for what an attacker may have created. Check webhooks registered under the bot or integration, since a webhook keeps sending events to an outside URL even after you change other things. Look for rooms, memberships and messages you did not make.
  6. Use the administrative views. If you have a Webex organization, the Control Hub administration and audit views can show who created or changed apps and bots. Look for the place where activity and app management are listed.
  7. Clean up the code and search for other secrets next to the token. 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 Cisco Webex

Webex access tokens are managed from the Webex developer portal, after you sign in with the account that owns the bot or integration. Open the list of your apps, choose the bot or integration involved, and use the option that issues a new token or secret. A person has not confirmed the exact menu wording for this guide, and the portal can change, so look for the section where the app’s credentials are shown. Check the Webex developer documentation on bots and integrations to confirm whether the old value stops working at once, and do not assume it. After rotating, update every system that used the old value.

How LeakWatch detects it

Two rules cover this type. They are called Webex API Key and Webex API Key (2). Both need the word webex in any letter case, then up to 40 characters of anything, then a value made only of letters, digits, _ and - between word boundaries. The first rule requires exactly 65 characters, the second exactly 64. A value of another length, or a long string with no webex nearby, is not reported. Because the shape is generic, a token pasted without the word nearby can be missed, and a long identifier next to the word can be a false alert. The severity of both rules is medium. This type is not checked live: LeakWatch does not send any request to Webex with the token 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

Does a Webex token expire by itself?

Personal access tokens do, after about 12 hours. Bot tokens are meant for unattended use and should be treated as valid until you replace them, so do not wait for expiry.

Can an attacker read my private one-to-one messages?

Only what the identity behind the token can see. A bot sees the spaces it belongs to, while a user or integration token can reach whatever its scopes allow. Review the scopes and memberships.

Is a webhook secret the same thing?

No. A webhook secret signs events sent to your server, while an access token authenticates calls to Webex. If both appear in the same file, handle both.

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

LeakWatch is not affiliated with Webex.