How to fix: MessageBird access key in source
MessageBird access keys grant SMS, voice, WhatsApp, and contact-list access on the business account.
Why it matters
An exposed MessageBird access key allows an attacker to send bulk SMS and WhatsApp messages billed to your account, access all contact lists and message history, and potentially intercept OTP codes sent to your users.
MessageBird access keys grant SMS, voice, WhatsApp, and contact-list access on the business account.
How to fix it
- 1Revoke the key at dashboard.messagebird.com → Developers → API access
- 2Create a new key with minimum required permissions
- 3Keep MessageBird API calls server-side only
Code examples
MessageBird: server-side only
import messagebird from 'messagebird';
// Server-side only: never in client components
const mb = messagebird(process.env.MESSAGEBIRD_API_KEY!);
function sendSms(to: string, body: string) {
return new Promise((resolve, reject) => {
mb.messages.create({ originator: 'YourApp', recipients: [to], body }, (err, response) => {
if (err) reject(err); else resolve(response);
});
});
}References
Detected automatically by VulnRadar. The check id is secret-messagebird-access-key, stable across every scan so you can filter or diff on it.
More secrets checks
Questions
- How severe is MessageBird access key in source?
- VulnRadar rates this critical severity in the secrets category. The severity is fixed per check, not scored per site, so the same finding is the same severity on every scan.
- Does VulnRadar check for this automatically?
- Yes. It runs as part of every scan under the check id secret-messagebird-access-key, which stays the same between runs so you can filter, diff, or gate CI on it.
- Which standards does MessageBird access key in source map to?
- It maps to CWE-798. In the OWASP Top 10 it falls under A07:2021.
Missing a check?
The detection set is open. If you know a misconfiguration this does not catch, propose it: the issue template asks for the threat model, how to detect it, the false-positive risk, and a test fixture, which is the same thing a maintainer would have to work out anyway.