Skip to content
Databases & keys · Secret guide

Leaked VirusTotal API Key: what to do in the first hour

Medium severityDetected onlyLast verified · 5 min read

A VirusTotal API key identifies your account when a script or tool queries VirusTotal, the service that checks files, URLs and domains against many security engines. The key is tied to a lookup quota and to the account’s privileges, and it can also be used to submit files. A leaked key lets someone use your quota, and it can expose the names and hashes of files your team has looked up, which can reveal what you are investigating. Regenerate the key first, then check what the account was used for.

Check your GitHub account for leaked secrets — free

Provider
VirusTotal
Severity
Medium
Impact
SaaS account access and billing
Checked live by LeakWatch
No

What a VirusTotal API Key looks like

VirusTotal API keys are a 64-character string of lowercase hexadecimal digits, with no visible prefix. The rule in LeakWatch looks for that shape, and reports it only when the word virustotal, or a short name such as vt, appears just before it along with a separator such as an equals sign or a colon. A masked form of the layout:

VT_API_KEY: …XXXX   name and separator, value masked

The shape is the same as a SHA-256 hash, which is why the word before the value matters. A hash of a file looks identical to a key, so a 64-character hexadecimal string on its own is not a leak. A value named as a key, in a configuration or a script, is the one to treat as exposed. If you are not sure whether a value is a key or a hash, check the account, since the key will show as a credential in the profile section rather than as a file.

How VirusTotal API Keys get leaked

  • Automation scripts in repositories. A script that submits suspicious files or looks up hashes, with the key written into it so that it runs on any machine.
  • Security tooling configuration. A settings file for an analysis tool or a plug-in that stores the key in plain text, copied into a shared folder.
  • Environment files. A .env file committed by accident, or left in a template repository.
  • Logs. A debug line that prints the request when a lookup fails, including the key in the query string.
  • Shared threads. A key pasted into a chat or a support request when an API call returned an error.

What to do in the first hour

  1. Regenerate the key. Sign in to VirusTotal, open your account settings, and regenerate the API key. Regenerating replaces the old value, so the old one stops working for new requests.
  2. Update every tool that uses the key, and store the new value in a secret manager or the environment of the process that uses it.
  3. Check lookups and submissions. Review the activity on the account for the period since the exposure. Look for submissions of files your team did not send, and for lookups you do not recognize.
  4. Check the quota. Confirm how many requests remain on the plan. A spike in use is a clear sign of misuse.
  5. Review shared content. Files submitted to VirusTotal can become visible to other users in some plans. Check what the account submitted in the period, and think about whether any of it is sensitive.
  6. Check the rest of the file. Revoke other credentials stored with the key, such as other security service tokens in the same tooling.
  7. Clean the repository. Remove the value from current files, add the configuration to .gitignore, and rewrite history if the repository was public. See I accidentally pushed an API key to GitHub for the full order.

Not sure what else leaked from the same repository? Run a free scan.

Not sure what else leaked? Run a free scan.

Revoke it at VirusTotal

The VirusTotal API key is shown in the user menu of your account. Sources we reviewed place it in the profile menu at the top right, under an entry for the API key, and say that an eye icon reveals it. The same area offers a way to generate a new key. Once you generate a new key, the old one stops working for new requests, so deploy the new key to your tools first if you can do so quickly. We did not confirm these labels from VirusTotal’s own documentation, so check them on the screen. A key that a service or pipeline uses should be moved to a secret store, and it should not be shared across several tools.

How LeakWatch detects it

The rule is called “VirusTotal API Key”. It looks for the word virustotal, or the short name vt, followed by a few characters that can include letters, digits, spaces, dots, underscores or hyphens, then a colon or equals sign, an optional quote, and a value of exactly 64 lowercase hexadecimal characters. The name requirement is what separates a key from a file hash. The severity is medium, with the SaaS impact class, because the key spends quota and can expose lookup activity. This type is not checked live: LeakWatch does not send the value to VirusTotal, so a finding means a matching value sat next to the name, not that the key still works.

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

Is a VirusTotal key as sensitive as a password?

Not quite, but the activity it exposes can be sensitive. A key lets someone see what your team has checked and spend your quota. Replace it promptly and review the account.

The value looks like a file hash. Is it a leak?

Possibly not. A hash of a file has the same shape as a key, so the rule only reports it when a name such as virustotal or VT_API_KEY sits next to it. If the value is a hash used in a report, leave it. If it is set as a key, treat it as exposed.

How should my team share one key?

Avoid sharing one key between people. Give each tool or service its own key, store it in a secret manager, and rotate it when someone leaves.

Get alerted next time a secret leaks — create a free account

LeakWatch is not affiliated with VirusTotal.