On this page
What this issue is
A webhook is a message one system sends to another when something happens, such as a form submission sent to your CRM, Zapier, Make or n8n. A signature is a proof attached to that message. It shows the message came from the system you expect and was not changed on the way.
Without a signature or secret, the receiving URL accepts any POST request that has the right shape. The URL is the only protection, and URLs leak through browser code, logs, emails, screenshots and shared docs.
Why it costs you leads or sales
The direct risk is low for many sites, but the effects add up. Fake leads fill your CRM, trigger auto-replies and sales follow-up, and waste task or operation quotas on Zapier or Make. Real leads get buried, and reports become less trustworthy. Fake records can also push bad conversion data into ad platforms if your automation sends it on.
- Attacker finds URLFrom page source, logs or a shared doc
- Fake POST sentMade-up name, email and message
- Endpoint accepts itNo signature or secret is checked
- Fake lead in CRMSales team follows up on it
- Real leads buriedReports and quotas are skewed
Without a signature, the endpoint treats both requests the same way.
Example: illustrative numbers only. The same 40 real leads look much weaker once spoofed ones are mixed in.
How to check if your site has it
- The webhook URL is the only thing identifying the sender
- Your form tool's webhook settings have no secret, token or signing key field filled in
- Your receiving code never reads a signature or token header
- The URL appears in public page source or client-side JavaScript
- You see leads in the CRM with odd names, gibberish messages or no matching form entry
To test it safely on your own endpoint, send a request with made-up test data and no credentials. If the endpoint answers 200 and creates a record, it accepts unsigned requests. Delete the test record afterwards.
curl -i -X POST https://example.com/webhooks/leads \
-H "Content-Type: application/json" \
-d '{"name":"Test Spoof","email":"spoof-test@example.com"}'How to fix it
Check what the sender supports
Look in your form plugin or app for a secret, signing key or custom header option. Some tools sign requests, others only let you add a static header.
Generate a long random secret
Create at least 32 random characters and store it in an environment variable or password manager, not in page code.
Send the secret or signature
Best: an HMAC of the raw body using the secret, sent in a header. Acceptable: a static secret header over https.
Verify on the receiver
Recompute the HMAC from the raw request body, compare with a constant-time function and return 401 on a mismatch.
Rotate the old URL and secret
If the old URL was exposed, create a new endpoint or path and retire the old one.
const crypto = require('crypto');
const express = require('express');
const app = express();
app.post('/webhooks/leads', express.raw({ type: 'application/json' }), (req, res) => {
const secret = process.env.WEBHOOK_SECRET;
const received = req.get('X-Signature') || '';
const expected = crypto.createHmac('sha256', secret).update(req.body).digest('hex');
const a = Buffer.from(received);
const b = Buffer.from(expected);
if (a.length !== b.length || !crypto.timingSafeEqual(a, b)) {
return res.status(401).send('Invalid signature');
}
const lead = JSON.parse(req.body.toString('utf8'));
// save the lead here
res.status(200).send('ok');
});<?php
$secret = getenv('WEBHOOK_SECRET');
$body = file_get_contents('php://input');
$received = $_SERVER['HTTP_X_SIGNATURE'] ?? '';
$expected = hash_hmac('sha256', $body, $secret);
if (!hash_equals($expected, $received)) {
http_response_code(401);
exit('Invalid signature');
}
$lead = json_decode($body, true);
// save the lead here
http_response_code(200);Check your form plugin
Open the plugin's webhook or integration settings. If it has a custom headers field, add a header such as X-Webhook-Secret with your secret. Options differ by plugin.
Verify in your receiver
If you receive the webhook in a WordPress REST route, compare the header in the route's permission_callback and return a 401 on mismatch.
Do not put secrets in tags
GTM runs in the visitor's browser, so any secret in a tag is public. Send leads from your server, not from a browser tag, when a secret is needed.
Add a header to the webhook action
In a workflow's Webhook action, add a custom header with your secret if the action offers headers in your account. Then check it on your receiver.
Sign on the server
Compute the HMAC server-side and send it in a header, as in the snippets above. Never sign in browser JavaScript.
How to confirm it's fixed
Send an unsigned request
Repeat the curl test with no signature. You should get 401 and no record should be created.
Send a request with a wrong signature
Change one character. It should also be rejected.
Submit your real form
Submit a test lead through the live form. It should arrive in the CRM as before.
How to prevent it happening again
- Make signature checking part of every new webhook setup
- Keep secrets in environment variables, never in page code or public repos
- Use https only
- Rotate secrets when staff or agencies leave
- Log rejected requests so you can spot probing
- Add rate limiting or spam filtering in front of the endpoint
How FunnelGuard handles this
This issue is outside what FunnelGuard checks. FunnelGuard runs your real customer journeys as a robot visitor and checks steps, tracking hits and whether test leads arrive. It does not test whether your endpoint rejects forged requests. For that, use an API security testing tool or a penetration test, plus your own receiver logs. FunnelGuard can still show whether genuine test leads reach your inbox and CRM after you add the check, so you know the fix did not block real submissions.
Questions people ask
What is a webhook signature?
A webhook signature is a value, usually an HMAC hash of the request body made with a shared secret, sent in a header. The receiver recomputes it and accepts the request only if the values match. It proves who sent the message and that it was not altered.
Can someone send fake leads to my webhook URL?
Yes, if the endpoint does not verify a secret or signature. Anyone who learns the URL can send a POST request with made-up data. A long random URL makes guessing hard but does not stop leaks.
How do I secure a webhook without a signing feature?
Add a static secret in a custom header or field, send it over https, and check it on the receiver. Reject requests without it. It is weaker than an HMAC because the secret travels with every request, but it blocks casual spoofing.
How do I verify an HMAC signature in a webhook?
Read the raw request body, compute HMAC SHA-256 with your secret, and compare the result to the signature header using a constant-time function. Return 401 if they differ. Use the raw body, not re-encoded JSON.
Is a secret URL enough to protect a Zapier or Make webhook?
It helps, but it is not a signature. The URL can leak through page source, logs or shared screenshots. Add a secret header or field check inside the zap or scenario for stronger protection.
Why are fake leads appearing in my CRM?
Common causes are bots filling the public form and attackers posting directly to an exposed webhook URL. Check the record details against your form entries. If no form entry exists, the webhook was likely called directly.
Does FunnelGuard detect spoofed webhook requests?
No. FunnelGuard checks that your real journeys work and that test leads arrive, but it does not test endpoint security. Use an API security testing tool or a penetration test for that.
Related issues
- DLV-111Webhook endpoint returns 4xx/5xx, lead droppedFix guide
- DLV-118Webhook URL still points to a deleted zapFix guide
- DLV-121Webhook sends data over http, not httpsFix guide
- DLV-125Duplicate webhook delivery creates duplicate recordsFix guide
- DLV-120Webhook fired without retries, one transient error loses the leadFix guide
- DLV-119Webhook payload format changed after a form plugin updateFix guide