Skip to main content
CriticalSecretsOWASP A07:2021CWE-798

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

  1. 1Regenerate the API key at my.vultr.com → Account → API
  2. 2The old key is invalidated immediately when a new one is generated
  3. 3Store the new key in a secrets manager and never commit it to source

Code examples

Store Vultr key as environment variable

TypeScript
// 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.

See every secrets check

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.

Propose a checkHow a check is built

Scan your own site for vultr api key in source

VulnRadar runs this check and hundreds more against a URL in seconds. No agent to install, just paste a URL.

Or scan this site as a demoRead the docs

How to fix: Vultr API key in source | VulnRadar