Home / Blog / License delivery
License delivery

What should a developer do when a license key leaks on a public forum?

A key posted on a cracking forum or pasted into a public repository is not a catastrophe if you respond in the right order. Here is a calm playbook.

A developer in a small home office leaning back in a chair with hands behind his head, thinking, closed laptop and a cold cup of coffee on the desk, warm evening lamp light, bookshelf behind

First, figure out what actually leaked and how far it spread

Three very different things get called a leak. A single customer's paid key posted publicly. A batch of keys from a giveaway or a reseller. Or your key generation secret or signing key. The response scales with the scenario. For one key, the blast radius is one record. For a leaked signing key, every license is suspect and you are looking at a rotation. Before deciding which case you are in, open your validation logs and count how many distinct machines have activated the key, from what regions, and when the spike began. Related: Why Digital Products Need Licensing

Do not react from a screenshot. Look the key up in your own system before touching anything. Sometimes the 'leaked key' is a trial key, a demo key you handed out at a conference, or a key that was already revoked months ago. Occasionally it is a key that was never valid at all, posted by someone guessing. The logs tell you whether this is a revenue problem or noise, and the difference decides whether you spend ten minutes or a full day.

Keep reading: Why Digital Products Need Licensing, Generating License Keys That Work, Validating Keys Without Frustrating Users. See how KeyDispense helps you digital product license key issuing and validation api.

Revoke the key without punishing the paying customer

If the key belongs to a paying customer whose key was stolen or shared by accident, revoke the leaked key and issue a replacement to the legitimate owner in the same action. Send a plain message: we noticed your key being used elsewhere, here is a new one, your existing installs will ask for it once. Do not accuse. Most leaks are accidental, such as a key visible in a screenshot attached to a support ticket, or a config file committed to a public repository. Related: How do you activate a license when the customer's machine never touches the internet?

If the customer is the one distributing it, the terms you wrote earlier decide what you can do. Revocation with a notice is usually enough. Be cautious with automation here: if your system auto-revokes when activation counts spike, make sure a human reviews before a legitimate agency rolling out thirty laptops gets cut off on a Monday morning. Related: Which license lookup tools should support staff have before launch day?

Making the leaked key stop working for everyone else

Revocation only bites if the app checks. With online validation and a short cache window, the key dies within hours. Offline-signed licenses keep working until their validity window ends; that is the trade you accepted when you offered them. For hybrid designs, ship a revocation list with the next periodic check-in or the next update. Do not hardcode a blocklist into the binary; it will be stale by the time anyone downloads it.

Expect the key to reappear in more places over time. Set up a simple periodic search for your key prefix on public code hosts and paste sites. A distinctive prefix makes this trivial to search and makes false positives rare. Treat the whole thing as maintenance rather than a crisis: revoke, replace, note it, move on.

Closing the hole the key came through

Find out how the key got out and fix that path. Keys emailed in plain text get forwarded. A key displayed once on a post-checkout page with a copy button is a little better. A login-gated license page is better still. If keys leaked from a giveaway, use single-use claim codes with a short window. If a reseller batch leaked, per-reseller key prefixes make attribution instant the next time. Related: Generating License Keys That Work

If your signing secret leaked, that is a real incident. Rotate to a new key pair, ship a build that trusts the new public key (and, for a defined window, the old one), and reissue licenses through your normal exchange flow. Write down the timeline while it is fresh. The write-up, not the rotation, is what stops the same leak from happening again.

Key takeaways
  • Check your own validation logs before reacting to a screenshot; many leaked keys turn out to be trial, demo, or already revoked keys.
  • Revoke and reissue in one action, and contact the legitimate owner without accusing them.
  • Revocation only works as fast as your validation cache window; offline licenses keep running until they expire.
  • Fix the delivery path the key escaped through, and treat a leaked signing secret as a full rotation incident.
Julien Jimenez
Written by

Julien Jimenez

Julien Jimenez is an independent software builder based in Paris. He designs, ships, and operates focused SaaS products for small businesses and independent professionals. Read the full author page.

Issue and validate license keys with one API

Digital product license key issuing and validation API. KeyDispense is built to help you put this into practice.

Get an API key

More from the KeyDispense blog

Get the KeyDispense playbook

Practical guides on license delivery, straight to your inbox as we publish them. No spam, unsubscribe any time.

By subscribing you agree to our privacy policy.