How to fix: Vonage / Nexmo API key + secret in source
Vonage (formerly Nexmo) API key/secret pairs grant SMS, voice, verify, and conversation API access.
Why it matters
An exposed Vonage API key/secret pair grants full access to SMS, voice, and 2FA verification APIs, allowing an attacker to send unlimited messages at your expense, intercept OTP verification codes sent to your users, and access all conversation history.
Vonage (formerly Nexmo) API key/secret pairs grant SMS, voice, verify, and conversation API access.
How to fix it
- 1Rotate via dashboard.nexmo.com → Settings → API settings
- 2Keep API key and secret server-side only
- 3Use JWT-based authentication for longer-lived integrations
Code examples
Vonage SDK: server-side only
import Vonage from '@vonage/server-sdk';
// Server-side only
const vonage = new Vonage({
apiKey: process.env.VONAGE_API_KEY!,
apiSecret: process.env.VONAGE_API_SECRET!,
});References
Detected automatically by VulnRadar. The check id is secret-vonage-nexmo-key, stable across every scan so you can filter or diff on it.
More secrets checks
Questions
- How severe is Vonage / Nexmo API key + secret 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-vonage-nexmo-key, which stays the same between runs so you can filter, diff, or gate CI on it.
- Which standards does Vonage / Nexmo API key + secret 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.