Skip to content
Messaging · Secret guide

Leaked Pusher app key: what to do in the first hour

Medium severityDetected onlyLast verified · 4 min read

A Pusher app key is the public identifier of a Pusher Channels app. Browsers and mobile apps need it to connect and subscribe to channels, so it is meant to appear in front-end code. Finding it in a web page is not, on its own, a breach. The part that must stay private is the app secret, which authorises your server to publish events and to join private and presence channels. Check whether the secret leaked alongside the key, then decide what to rotate.

Check your GitHub account for leaked secrets — free

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

What a Pusher app key looks like

A Pusher app key is a short string of 20 lowercase letters and digits, with no prefix. The rule finds it by the word pusher near the value. Because the same key is shipped to every visitor of an app that uses Pusher, it is one of the few secrets in this list that is expected to be visible in public code:

<20 characters of lowercase letters and digits>   Pusher app key (masked)

The matching secret looks different and is much more sensitive. It is a separate value that appears in server configuration, and that is the one to protect.

How Pusher app keys get leaked

  • Front-end bundles. The key appears in a web or mobile app by design, so it is visible to anyone who loads the app.
  • Server configuration committed by accident. A configuration file that contains the app secret next to the key, pushed to a repository.
  • Environment files. A .env file with the secret and the key, copied into a container image or a shared folder.
  • Logs. A server that logs its configuration at startup, including the secret.
  • Shared snippets. A tutorial or a support request with a complete configuration block pasted in.

What to do in the first hour

  1. Find out whether the secret leaked. The key alone is expected to be public. If only the key appears in front-end code, the risk is limited. If the app secret appears anywhere, treat it as an incident.
  2. If the secret leaked, rotate it. Open the account settings for the app in the Pusher dashboard, find the app keys section and regenerate the secret. Public descriptions say a regenerate action sits next to the key, so read the label before you act. Deploy the new secret to your server immediately.
  3. Review channel activity. Check the debug console and the usage statistics for events you did not publish, especially on private or presence channels.
  4. Check your application’s authorisation. Make sure your server only authorises users to join channels they should see.
  5. Check other secrets in the same configuration file, and rotate them if they sat alongside the leaked value.
  6. Clean the repository. Remove the secret from files and history, and check logs. See I accidentally pushed an API key to GitHub.

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

Not sure what else leaked? Run a free scan.

Revoke it at Pusher

Only the secret needs revoking in most cases. Open the account settings for the app in the Pusher dashboard, go to the app keys section and regenerate the secret if it leaked. Pusher does not treat the app key as a secret, so changing it usually means creating a new app and moving your clients to it. Public sources on this flow are partly third-party, so this guide has not confirmed the exact labels or whether an app key can be replaced. Check Pusher’s own documentation before you plan a migration.

How LeakWatch detects it

The rule is called “Pusher Channel Key”. It looks for the word pusher within about 40 characters of a 20-character run of lowercase letters and digits, with word boundaries around the value. The word is required, and the rule cannot tell whether the value is the public key or a secret, so the hit should be read with the context in mind. The severity is medium. This type is not checked live: LeakWatch does not connect to Pusher with the value it finds.

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

Is the app key a secret?

No, not by design. Clients need it to connect, so it appears in public code. Do not panic about it alone.

What is the dangerous value?

The app secret. With it, someone can publish events to your channels and join private and presence channels.

How do I keep the secret safe?

Keep it only on your server, in an environment variable or a secret manager, and never in code that runs in a browser or a mobile app.

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

LeakWatch is not affiliated with Pusher.