How to fix: Vultr API key in source
Vultr API keys grant instance, DNS, and billing control on the Vultr account.
Why it matters
An exposed Vultr API key gives full API control over your Vultr account: an attacker can create GPU/bare-metal instances for cryptomining at your expense, modify DNS zones, access snapshots, and manage billing settings.
Vultr API keys grant instance, DNS, and billing control on the Vultr account.
How to fix it
- 1Regenerate the API key at my.vultr.com → Account → API
- 2The old key is invalidated immediately when a new one is generated
- 3Store the new key in a secrets manager and never commit it to source
Code examples
Store Vultr key as environment variable
// Never hard-code the key: read from environment
const response = await fetch('https://api.vultr.com/v2/instances', {
headers: {
Authorization: `Bearer ${process.env.VULTR_API_KEY}`,
'Content-Type': 'application/json',
},
});References
Detected automatically by VulnRadar. The check id is secret-vultr-api-key, stable across every scan so you can filter or diff on it.
More secrets checks
Questions
- How severe is Vultr API 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-vultr-api-key, which stays the same between runs so you can filter, diff, or gate CI on it.
- Which standards does Vultr API 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.