A Sinch credential lets whoever holds it call Sinch’s communication APIs as your project: send SMS and other messages, place or control voice calls, and use any other product that the project has enabled. Those actions are billed to you per message or per minute, which makes a stolen Sinch credential attractive for SMS pumping, spam and phishing sent from your sender IDs. A leaked key can also reveal the traffic of the project, depending on what the product exposes. Revoke the key first, then investigate what was sent.
Check your GitHub account for leaked secrets — free
- Provider
- Sinch
- Severity
- High
- Impact
- SaaS account access and billing
- Checked live by LeakWatch
- No
What a Sinch API key looks like
Sinch uses several kinds of credentials, depending on the product, and the name “API key” covers more than one of them. The one Sinch documents for its unified APIs is the access key: a pair made of a Key ID and a Key Secret. According to Sinch’s documentation, the Key ID is an identifier that also serves as the OAuth client_id, and the Key Secret is the private half, shown only once when the key is created. The pair is exchanged at an OAuth 2.0 token endpoint for a short-lived bearer token. Some Sinch products also use their own application key and secret or a service plan token, which are separate credentials.
A masked example of a secret-like value as it appears in a config file:
SINCH_KEY_SECRET=XXXXXXXX…XXXX (masked, alphanumeric string)
Treat the Key Secret, and any service token, as the sensitive value. The Key ID alone cannot authenticate, but it usually sits right next to the secret in the same file. Typical names are SINCH_KEY_ID, SINCH_KEY_SECRET, SINCH_PROJECT_ID, SINCH_API_TOKEN and SINCH_SERVICE_PLAN_ID. The project ID is an identifier and is not secret by itself.
How Sinch API keys get leaked
- Environment files.
SINCH_*variables in a committed.env, a Docker compose file or a serverless configuration. - Sample code. Quickstarts and SDK examples take the key and secret as strings; people paste real values and push the file.
- Client-side code. A mobile app or web frontend that sends SMS directly needs the secret inside the bundle, where every user can extract it. Sending must go through a server.
- Notification scripts. Alerting, two-factor and appointment-reminder scripts kept in a repository or shared in a gist.
- CI logs and screenshots. Debug output of a token request, or a dashboard capture showing the secret at creation time.
What to do in the first hour
- Create a replacement key first. Sinch’s documentation recommends creating a second access key in the same project before deleting the old one, so that your application keeps working. A project can hold a limited number of keys, so check the count.
- Deploy the new key to your application and secret store, and confirm that requests succeed with it.
- Delete the exposed key. Use the access keys page of the Sinch dashboard (see the link below). Deleting a key stops new tokens from being issued for it. Tokens already issued are short-lived and expire on their own, within roughly an hour according to Sinch, so keep watching after the deletion.
- Review usage. In the dashboard, check message and call logs and the usage and billing views for the period since the exposure. Look for traffic to destinations you do not serve, unusual volume, messages you did not send and unfamiliar sender IDs.
- Check what else could be changed. Look at the project for new numbers, new service plans or callback URLs that you did not configure, and at the list of users with access to the account.
- Set a spending limit or alert if the product offers one, so the next incident is capped.
- Clean up the code. Remove the secret from the files, and from the history if the repository is public. 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 Sinch
Access keys are managed in the Sinch dashboard, in the access keys section of the settings of the project, after you sign in with a user allowed to manage it: Sinch dashboard. Sinch documents the same operations, creating, listing and deleting keys, through its Access Keys API, which is useful if you have to remove several keys at once. 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 access keys are listed, and follow the Sinch developer documentation on access keys.
How LeakWatch detects it
The rule is called Sinch API Key. It requires the word sinch, in any letter case, and then, within about 40 characters, a string of exactly 32 letters or digits standing alone, with word boundaries on both sides. A 31-character or 33-character string is refused, and so is a 32-character string that is not near the word. This means the rule targets service tokens and secrets written next to a variable or comment that names Sinch, and it will not report the Key ID of an access key unless it happens to have that shape. A value written without the word nearby can be missed. The severity is high. This type is not checked live: LeakWatch does not send any request to Sinch with the value 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
Can the Key ID alone be abused?
No. The Key ID identifies the key and is also the client ID in the OAuth exchange, but it cannot get a token without the Key Secret. Still, rotate the pair together, since both usually leaked in the same file.
Will deleting the key stop attackers immediately?
It stops new tokens from being issued. A token issued before the deletion lasts until it expires, which Sinch documents as short. Check your logs for a while after deleting.
Do I need to tell my users?
If the logs show messages you did not send, or access to message content, yes, and you may have legal duties depending on the data. If the logs are clean, record the incident internally.