A BrowserStack access key is the secret half of the credentials used to run automated tests on BrowserStack’s cloud of browsers and devices. Together with your username, it authenticates Selenium, Appium, Playwright and Cypress runs as well as calls to the REST API. Whoever holds the pair can start sessions that count against your parallel-test plan, read the names, builds and logs of your past sessions, and use the account for anything the key allows. The key does not reach your servers, but test logs and URLs often contain staging addresses and test accounts. Reset the key first, then look at what it was used for.
Check your GitHub account for leaked secrets — free
- Provider
- BrowserStack
- Severity
- Medium
- Impact
- SaaS account access and billing
- Checked live by LeakWatch
- No
What a BrowserStack access key looks like
An access key is a short random string of 20 letters and digits. It is almost never used alone: it comes with a username, and the two are passed together.
BROWSERSTACK_USERNAME=your_user_XXXXXX
BROWSERSTACK_ACCESS_KEY=XXXX…XXXX (20 letters and digits, masked)
There is no fixed prefix, so the string alone says nothing: 20 alphanumeric characters is also the shape of many harmless identifiers. What identifies it is context. Look for BROWSERSTACK_ACCESS_KEY, browserstack.key, accessKey inside a browserstack.yml file, or the credentials in a URL such as https://USER:[email protected]/wd/hub. BrowserStack also issues keys to service accounts in organizations that use them, and those follow the same format, so a leaked key can belong to a person or to a shared automation identity.
How BrowserStack access keys get leaked
- Test configuration committed to the repository. A
browserstack.yml, awdio.conf.js, aplaywright.config.tsor a Selenium helper with the username and key typed in. - Environment files.
BROWSERSTACK_ACCESS_KEYin a.envor compose file that is not ignored. - Hub URLs with embedded credentials. The remote WebDriver URL, which contains the username and key before the
@, copied into code or a README. - Continuous integration. A pipeline definition or a debug step that prints the environment of the build, and open-source projects that paste the key into a public workflow instead of a secret.
- Issue reports and logs. A failing test pasted into an issue together with its capabilities object or its command line.
What to do in the first hour
- Reset the access key. Sign in to BrowserStack, open your account settings and use the reset option next to the key (see the link below). BrowserStack also documents a REST call that recycles the key. Do this before cleaning anything else.
- Update every legitimate user. Put the new key in your secret store and in the CI variables of every project that runs tests, then trigger one build to confirm it works. Local developer machines using the old value will fail until updated.
- Check the sessions. Review the list of recent builds and sessions in the dashboard for the period since the exposure. Look for runs you did not start, unusual hours, unknown build names, or heavy parallel use.
- Review the logs of those sessions. Test logs and videos can reveal what the attacker tested and which URLs they reached. Note any internal or staging hosts that appeared.
- Review the team. If your plan has several users or service accounts, check the member list for people you do not know, and rotate the keys of service accounts that shared the same file.
- Rotate related secrets. Test projects often hold credentials for staging environments, test users and other services. Rotate any that sat in the same file.
- Clean up the code and move the key to a secret store. See I accidentally pushed an API key to GitHub.
Not sure what else leaked from the same repository? Run a free scan.
Revoke it at BrowserStack
BrowserStack’s documentation describes resetting the access key from the settings of your BrowserStack account, after you sign in as the owner of that key, and also through a REST endpoint authenticated with the current username and key. Resetting issues a new key and the old one stops being the one to use, so every system holding it must be updated. For service accounts, the documentation describes rotating the key through the same mechanism with the service account’s credentials. 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, look for the section where the username and access key are shown, and follow the reset-access-key pages of the BrowserStack documentation.
How LeakWatch detects it
The rule is called BrowserStack Access Key. Because a bare 20-character string is far too common, the rule needs the word browserstack, in any letter case, followed within about 40 characters by exactly 20 letters or digits standing on their own, with word boundaries on both sides. A value of another length, or one that is not close to the word, is not reported. That limits false alerts but can miss a key pasted without the name nearby, for example in a hub URL where the name appears far away. The severity is medium. This type is not checked live: LeakWatch does not send any request to BrowserStack with the key 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
Is the access key enough, or do they need my username too?
Both are needed to authenticate, but the username is easy to find, since it often appears in build names, repository files and public configuration. Treat the key alone as a leaked credential.
Can someone read my test results with it?
Yes, the key authenticates API calls that list builds and sessions and fetch their logs. Check what your tests exposed, such as staging URLs and test accounts.
Will resetting the key break my pipelines?
Yes, until each pipeline has the new value. Prepare the new CI variable first, then reset, unless the key is being abused, in which case reset at once.