A MailerLite API token lets whoever holds it call the MailerLite API as the user who created it. Through it a stranger can read your subscriber list, which holds names and email addresses, add or remove subscribers, edit groups and fields, and work with campaigns and automations. The list is the main asset at risk: it can be exported for spam or phishing, or emptied. The token inherits the permissions of its creator, so an administrator’s token is worth more than a limited user’s. Replace it first, then check what changed.
Check your GitHub account for leaked secrets — free
- Provider
- MailerLite
- Severity
- High
- Impact
- SaaS account access and billing
- Checked live by LeakWatch
- No
What a MailerLite API key looks like
MailerLite tokens are sent as a Bearer token in the Authorization header. The token format is not published as a fixed pattern, and tokens generated from the dashboard are long strings. The older MailerLite Classic API used a shorter key of 32 lowercase letters and digits, which is what LeakWatch looks for:
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Classic-style MailerLite key (masked, 32 lowercase letters and digits)
A key has no prefix, so context decides: variable names such as MAILERLITE_API_KEY or MAILERLITE_API_TOKEN, a call to the MailerLite API host, or a plugin setting named after MailerLite. MailerLite does not display the token again after creation, so a token you can read in a file was copied somewhere at that moment. Tokens can also be limited to trusted IP addresses when created, which reduces the value of a leaked one.
How MailerLite API keys get leaked
- Website and form plugins. CMS and newsletter plugins storing the key in a settings file, an export or a database dump.
- Environment files.
MAILERLITE_API_KEYin a.envcommitted with the project. - Signup form code. A subscription endpoint written for a landing page, with the token pasted into the script.
- Automation tools. The token stored in a workflow export from a no-code automation platform that is then shared.
- Frontend bundles. A token embedded in client-side JavaScript so a form can call the API directly, where anyone can read it.
What to do in the first hour
- Open the MailerLite API page in your account integrations (see the link below) and find the exposed token.
- Generate a new token. If the option is offered, restrict it to the IP addresses of your servers.
- Deploy the new token to the application or secret store and run one test subscription.
- Revoke the exposed token and retry a request with the old value to confirm it is refused.
- Check the subscribers. Look at recently added or removed subscribers, the activity log for the account if your plan has one, and groups or custom fields you did not create. Unexpected imports are a sign of abuse.
- Review campaigns and automations. Look for campaigns, drafts or automations you did not write, and check the sender addresses and domains in use.
- Consider notification duties. If subscriber data may have been read, your data protection rules may require you to document it or notify people.
- Clean up the code and rotate neighbouring secrets in the same file. See I accidentally pushed an API key to GitHub.
Not sure what else leaked from the same repository? Run a free scan.
Revoke it at MailerLite
MailerLite tokens are created and managed in the integrations area of your MailerLite account, on the page for the MailerLite API, after you sign in. The official documentation describes how to generate a token there; it does not clearly describe a revoke step, and a token is tied to the user who created it. A person has not confirmed the exact menu wording for this guide. Look for the list of existing tokens and the option to remove one. If you cannot find it, contact MailerLite support and say a token was exposed.
How LeakWatch detects it
The rule is called MailerLite API Key. It looks for the word mailerlite (any case), then up to 40 characters, then exactly 32 letters and digits with word boundaries on both sides. The key must therefore appear near the vendor name. A 32-character string with no mailerlite close to it is ignored, and so is a string of another length, which means longer tokens from the newer API may not be matched. The severity is high.
This type is not checked live: LeakWatch has no validator for MailerLite keys, so a finding shows the pattern was seen, not that the token 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
Can a leaked token read my subscribers?
Yes, if the token’s owner can. The API exposes subscribers, groups and fields, so treat the list as exposed until the token is gone and the activity looks normal.
Does removing the user who created the token help?
Third-party guides say a token stops working if its creator loses access, but do not rely on that. Revoke the token itself and create a new one.
Is a form's public embed code a secret?
No. Embed code for a signup form is meant to be public. An API token is private and must never appear in front-end code or a repository.