# Leaked Mailgun Signing Key? Reset It and Audit Webhooks

> Mailgun HTTP webhook signing key exposed in a repo or config? Reset it in API Security, verify webhook signatures again and audit endpoints. Guide.

Source: https://leakwatch.net/secrets/mailgun-signing-key

---

[LeakWatch](/)

[Product](/product)[Live feed](/leaks)[Guides](/secrets)[Blog](/blog)[Free scan](/)

1.  [Home](/)
2.  [Secrets](/secrets)
3.  Mailgun Signing Key

Messaging · Secret guide

# Leaked Mailgun Signing Key: what to do in the first hour

High severityDetected onlyLast verified November 5, 2026 · 5 min read

A Mailgun signing key is the HTTP webhook signing key that Mailgun uses to sign the events it sends to your application, such as delivery, bounce and open notifications. Your application checks the signature to confirm that a webhook really came from Mailgun. Anyone who holds the signing key can forge webhook events that your application will accept. That can make a system believe that a message was delivered, a password reset was confirmed or a payment email was sent when none of that happened. This key is not a sending credential, so the first risk is forged data rather than spam. Reset the key first, then check the events your system accepted.

[Check your GitHub account for leaked secrets — free](/)

Provider

Mailgun

Severity

High

Impact

SaaS account access and billing

Checked live by LeakWatch

No

## What a Mailgun Signing Key looks like

The HTTP webhook signing key has a fixed shape: three groups of hexadecimal characters separated by dashes, with thirty-two characters in the first group and eight in each of the others:

```text
…XXXX-…XXXX-…XXXX   Mailgun HTTP webhook signing key (masked, shape only)
```

The key is stored in your application as a setting, often named `MAILGUN_SIGNING_KEY` or `MAILGUN_WEBHOOK_SIGNING_KEY`, and the code uses it to compute a signature over each request. Because the value looks like a generic identifier, a match depends on the name next to it. A value of this shape next to the word Mailgun, in a file that verifies webhooks, is a live credential.

This key is different from a Mailgun API key, which sends mail and reads account data. Both matter, but they are separate credentials with separate rotations. Check which one you have before you act, so you rotate the right value and the right systems.

## How Mailgun Signing Keys get leaked

-   **Committed configuration.** A settings file with the signing key in it, pushed to a repository that was public at some point or shared with contractors.
-   **Shared test fixtures.** A test file that contains the real key so that signature checks can be tested, copied into a public repository.
-   **Build logs.** A deployment step that prints its environment, or a debug option that logs the request and its headers.
-   **Support threads.** A key pasted into a question about why webhook signatures do not match.
-   **Container images.** A key written into an image during the build, which stays in the image layers even if a later step deletes the file.

## What to do in the first hour

1.  **Reset the key.** Open the API Security settings in your Mailgun account and reset the HTTP webhook signing key. Resetting replaces the value, so the old key no longer signs new webhooks.
2.  **Update your application** with the new signing key, and store it in your secret manager or in the environment of the server that receives webhooks. Webhooks signed with the old key will fail verification until the update is live, so plan the change.
3.  **Review accepted events.** Check the events your application accepted in the period since the key may have been exposed. Look for delivery, bounce or complaint records that do not match what Mailgun shows in its logs.
4.  **Check the endpoints.** Review the webhook endpoints configured in the account and remove any URL you did not create, since an attacker who can change an endpoint can receive your event data.
5.  **Check what the events trigger.** If a webhook causes a business action, such as marking an invoice paid or unlocking an account, review those actions for the period, because forged events can cause them.
6.  **Clean the code.** Remove the value from the files and history, and check for older copies in tests and build images. See [I accidentally pushed an API key to GitHub](/blog/i-accidentally-pushed-an-api-key-to-github).

Not sure what else leaked from the same project? [Run a free scan](/).

[Not sure what else leaked? Run a free scan.](/)

## Revoke it at Mailgun

In the Mailgun dashboard, open your account profile and choose API Security. In the HTTP webhook signing key section, use the rotate control and confirm the reset. A third-party security guide describes this path and the confirmation wording, but this guide could not confirm it against Mailgun’s own documentation. The official webhook documentation is the place to check whether the old key keeps working for an overlap period after a reset, because this guide found no confirmed Mailgun rollover behaviour. Until you know, assume the old key may stop working at once and deploy the new key quickly.

## How LeakWatch detects it

The rule is called “Mailgun Signing Key”. It looks for the word `mailgun` close to an assignment such as an equals sign or a colon, and then a value of three groups of lowercase hexadecimal characters separated by dashes, with thirty-two characters in the first group and eight in each of the other two. The name must come before the value and near it. A value of that shape with no Mailgun name nearby is not reported. The severity is **high**, with the impact class for SaaS services. **This type is not checked live**: LeakWatch does not call Mailgun with the key it finds.

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 signing key the same as a Mailgun API key?

No. The signing key verifies webhooks that Mailgun sends to you. An API key sends mail and reads account data. A leak of the signing key allows forged webhooks, and a leak of the API key allows sending and reading. Check both if both were exposed.

What can a forged webhook do?

It can make your system believe that an event happened. If your application uses delivery or bounce events for business logic, a forged event can change records or trigger actions. Review those actions after the exposure.

Will resetting the key break my webhooks?

It can, until the new key is deployed. Update the application quickly, then check that real events verify and that the event log has no gap.

## Related

-   [Mailgun API Key](/secrets/mailgun-api-key)
-   [Mandrill API Key](/secrets/mandrill-api-key)
-   [Postmark Server Token](/secrets/postmark-server-token)
-   [I accidentally pushed an API key to GitHub](/blog/i-accidentally-pushed-an-api-key-to-github)
-   [Which vendors leak most this week](/leaks/trends)
-   [All secret guides](/secrets)

[Get alerted next time a secret leaks — create a free account](/)

LeakWatch is not affiliated with Mailgun.

![Gabriel Diyan, founder of LeakWatch](/brand/Photo-Gabriel-Diyan.webp)

Gabriel Diyan (0xCr0c0)

Cybersecurity student, founder of LeakWatch. I built and run the scanner described here — the detection patterns, the false-positive classifier and the provider validators are mine. [More about who I am](/about).

[GitHub](https://github.com/Leakwatch-Scan) · [X](https://x.com/LeakwatchScan) · [LinkedIn](https://www.linkedin.com/in/gabriel-diyan-80a378375) · [GitHub (personal)](https://github.com/crocogab)

LeakWatch

Secrets leak into public commits every minute. This watches the forges for yours. Built and run by [Gabriel Diyan](/about), a cybersecurity student — [why LeakWatch exists](/about).

Scan

-   [Product](/product)
-   [Live feed](/leaks)
-   [Trends](/leaks/trends)
-   [API docs](/docs)
-   [CI/CD](/docs?tab=ci)

Read

-   [Blog](/blog)
-   [Secret guides](/secrets)
-   [Changelog](/changelog)
-   [About](/about)

Verify

-   [Security](/security)
-   [Privacy](/privacy)
-   [Terms](/terms)
-   [Legal](/legal)
-   [Contact](/contact)
-   [Status](https://status.leakwatch.net)

© 2026 LeakWatch

[GitHub](https://github.com/Leakwatch-Scan)[X](https://x.com/LeakwatchScan)
