Skip to content
Code & CI · Secret guide

Leaked Artifactory Reference Token: what to do in the first hour

Critical severityDetected onlyLast verified · 4 min read

An Artifactory reference token is a short handle that stands for a full JFrog access token held by the platform. Anyone who has the handle can present it to the Artifactory server as a password or bearer value and act as the user or service it was issued for. Depending on that account, this means reading private packages and images, deploying new artifacts and, for administrators, changing repositories and users. Artifactory sits in front of build output, so the real danger is a poisoned supply chain: code your servers fetch and run later. Revoke the token first, then work out what it did.

Check your GitHub account for leaked secrets — free

Provider
Artifactory
Severity
Critical
Impact
Source code and build access
Checked live by LeakWatch
No

What an Artifactory Reference Token looks like

A reference token is 64 characters long, made of letters and digits only, and it always begins with the same five characters cmVmd:

cmVmdXXXXXXXX…   64 characters in a real value (masked)

That prefix is the start of a base64 text, which is why every token shares it. You will see it in .npmrc, pip.conf, settings.xml and gradle.properties files, in Docker login commands for the JFrog registry, in variables such as ARTIFACTORY_TOKEN, ARTIFACTORY_PASSWORD or JFROG_ACCESS_TOKEN, and in the Authorization header of REST calls. The older Artifactory API key starts with a different four-letter prefix and has its own guide, and the generic JFrog identity token has no fixed prefix and also has its own guide. If the leaked file holds more than one, handle each.

How Artifactory Reference Tokens get leaked

  • Package manager configuration. A configuration file for npm, pip, Maven, Gradle or NuGet committed with the token that reaches your private repository.
  • CI pipeline definitions. A token written into a workflow file, or printed by a debugging step that dumps the environment.
  • Container workflows. A login command or pull secret saved in a repository, a Helm values file or a Kubernetes manifest.
  • Build and deploy scripts. Scripts that call the REST API with the token inline to upload build output.
  • Shared snippets. A curl command pasted into a ticket, chat message or wiki page to show how to download a package.

What to do in the first hour

  1. Find out whose it is. Identify the user or service the token was issued for and which repositories and projects that account can reach. A token held by an administrator is the worst case.
  2. Revoke it. Sign in to your JFrog Platform (see the link below), open the administration area where access tokens are listed and revoke the exposed one. Do this before any cleanup.
  3. Issue a replacement with the narrowest scope and a short expiry, store it in a secret manager and update every pipeline that used the old value.
  4. Read the logs. Review the platform’s audit and access logs from the exposure onward: logins, downloads of private packages, deployments, deletions and permission changes. Look for unfamiliar addresses.
  5. Check what was created. List users, access tokens, repositories, permission targets and webhooks. Remove what you did not create.
  6. Verify artifacts. If the account could write, compare recent packages and images with your build records, and rebuild anything you cannot explain.
  7. Clean up the code and the build logs. See I accidentally pushed an API key to GitHub.

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 JFrog

Reference tokens are access tokens, and they are managed from the administration area of your JFrog Platform, on your own instance or cloud subdomain, after you sign in with a user allowed to manage tokens. Find the exposed token in the list and revoke it. Users can also revoke their own tokens from their profile. A person has not confirmed the exact menu wording for this guide, and it differs between JFrog versions, so if what you see differs, look for the section where tokens are listed, and follow the JFrog documentation for your version.

How LeakWatch detects it

The rule is called Artifactory Reference Token. It recognizes the literal characters cmVmd followed by exactly 59 letters and digits, with word boundaries on both sides, and it does not need a variable name next to it. The prefix is case sensitive, so a lowercased copy, a value of a different length, or one cut by a dash or an underscore is not reported. The severity is critical. This type is not checked live: LeakWatch does not send any request to Artifactory with the token it found.

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 reference token weaker than a full access token?

No. It is only a shorter handle for the same stored token, so it carries the same permissions. Revoking the underlying token ends both forms.

Can the token reach other JFrog services?

It can reach whatever its scope allows. A platform-wide token may cover several services, so check the scope shown for the token in the administration area.

Do I need to rebuild my packages?

Only if the token could write to a repository. In that case compare recent artifacts with your build records, and rebuild any version that you cannot account for.

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

LeakWatch is not affiliated with Artifactory.