← Security advisories

Claude MCP skill SSRF — skill notification and alert delivery webhook endpoints — SA-SKL-SSRF66

SA-SKL-SSRF66 documents four SSRF vulnerabilities in MCP skill registry notification and alert delivery webhook endpoints. SSRF66-001: webhook delivery endpoint fetches user-supplied webhookUrl — attacker sets to 169.254.169.254 obtaining IAM credentials embedded in webhook delivery confirmation response; SSRF66-002: webhook health check endpoint fetches user-supplied webhookHealthUrl — attacker points to Consul:8500 receiving full Consul catalog JSON as health check response containing internal network topology; SSRF66-003: webhook retry endpoint fetches user-supplied retryUrl with redirect:follow — CNAME chain to Vault:8200 returns KV secrets defeating hostname-based allowlist controls; SSRF66-004: webhook registration endpoint fetches user-supplied verificationUrl and stores raw response as webhook verification record — attacker points to etcd:2379 persisting etcd configuration data into webhook history API.

SA-SKL-SSRF66 findings at a glance
CRITICALSSRF66-001 — webhook delivery endpoint fetches user-supplied webhookUrl — attacker sets to 169.254.169.254; IAM credentials embedded in webhook delivery confirmation response returned to caller; fix: allowlist; DNS private-IP block with PRIVATE_RANGES regex array; redirect:error; return only HTTP status boolean
CRITICALSSRF66-002 — webhook health check endpoint fetches user-supplied webhookHealthUrl — attacker points to Consul:8500; Consul catalog JSON returned as health check response containing full internal network topology; fix: allowlist; Zod parse only boolean healthy; never proxy raw response body
CRITICALSSRF66-003 — webhook retry endpoint fetches user-supplied retryUrl with redirect:follow — CNAME chain to Vault:8200 returns KV secrets as retry confirmation; CNAME-based rebinding defeats allowlist controls checking only initial hostname; fix: redirect:error; allowlist; extract only structured retry schema
HIGHSSRF66-004 — webhook registration endpoint fetches user-supplied verificationUrl and stores raw response as webhook verification record — attacker points to etcd:2379; etcd configuration data stored persistently as webhook verification record readable via webhook history API; fix: allowlist; return only boolean verified; never store raw response body

SSRF66-001 — IAM credential exfiltration via webhook delivery URL targeting instance metadata

Severity: CRITICAL

The webhook delivery endpoint accepts a user-supplied webhookUrl and fetches it directly without validating the target host or IP address. When an attacker registers a webhook with a URL pointing to the cloud provider's instance metadata service at 169.254.169.254, the registry server — running on a cloud VM with an attached IAM role — retrieves the instance metadata endpoint and returns the full JSON response including the IAM access key ID, secret access key, and session token in the confirmation field of the delivery response. The attacker receives valid short-lived credentials with the registry server's IAM role permissions.

Instance metadata credentials in cloud environments carry the permissions of the service role attached to the registry VM. Registry service roles commonly include permissions to read secrets from cloud secret managers, write to artifact storage, and invoke other internal services. A single webhook delivery request with webhookUrl: "http://169.254.169.254/latest/meta-data/iam/security-credentials/registry-role" is sufficient to exfiltrate credentials that enable further lateral movement throughout the cloud environment. The credentials are short-lived (typically 1–6 hours) but can be refreshed by repeating the webhook delivery request before they expire.

Vulnerable
app.post('/api/webhooks/deliver', requireSession, async (req, res) => {
  const { webhookUrl, payload } = req.body;
  const response = await fetch(webhookUrl, { method: 'POST', body: JSON.stringify(payload) });
  const confirmation = await response.json();  // IAM creds if webhookUrl = 169.254.169.254
  return res.json({ delivered: true, confirmation });
});
Fixed
const PRIVATE_RANGES = /^(10\.|172\.(1[6-9]|2\d|3[01])\.|192\.168\.|127\.|169\.254\.|::1|fc00:|fd)/;
async function safeWebhookFetch(url) {
  const parsed = new URL(url);
  const resolved = await dns.promises.lookup(parsed.hostname);
  if (PRIVATE_RANGES.test(resolved.address)) throw new Error('Private IP blocked');
  if (!WEBHOOK_ALLOWLIST.has(parsed.hostname)) throw new Error('Host not in allowlist');
  return fetch(url, { method: 'POST', redirect: 'error', signal: AbortSignal.timeout(5000) });
}
app.post('/api/webhooks/deliver', requireSession, async (req, res) => {
  const { webhookUrl, payload } = req.body;
  const response = await safeWebhookFetch(webhookUrl);
  return res.json({ delivered: response.ok });  // only boolean, never proxy response body
});

The fix performs DNS resolution of the target hostname before the fetch and checks the resolved IP address against a private range blocklist. This prevents both direct private IP submissions and DNS-based bypass attempts where an attacker registers a public hostname that resolves to a private IP. The WEBHOOK_ALLOWLIST provides an additional allowlist layer. The response body from the target server is never proxied back to the caller — only a boolean delivery status is returned, eliminating the exfiltration channel even if the SSRF protection is bypassed.

SSRF66-002 — Internal service topology leak via webhook health check URL targeting Consul

Severity: CRITICAL

The webhook health check endpoint accepts a user-supplied webhookHealthUrl and proxies the full response body back to the caller in the details field. When an attacker registers a webhook health check URL pointing to the internal Consul service discovery API at http://consul:8500/v1/catalog/services, the registry server receives and proxies the complete Consul catalog JSON — a list of every internal service registered in the environment including service names, addresses, ports, and health check endpoints that are not exposed to the public network.

The Consul catalog response provides a complete map of the internal service topology, including service names that reveal product architecture, internal API endpoints that can be targeted with subsequent SSRF requests, and health check URLs that expose internal monitoring infrastructure. With the topology in hand, an attacker can craft targeted SSRF requests against specific internal services identified from the Consul catalog — escalating from a topology discovery to data exfiltration from internal databases, secret managers, or other registry microservices.

Vulnerable
app.post('/api/webhooks/health', requireSession, async (req, res) => {
  const { webhookHealthUrl } = req.body;
  const response = await fetch(webhookHealthUrl);
  const health = await response.json();  // Consul catalog JSON if webhookHealthUrl = consul:8500
  return res.json({ healthy: true, details: health });  // proxies internal topology
});
Fixed
app.post('/api/webhooks/health', requireSession, async (req, res) => {
  const { webhookHealthUrl } = req.body;
  await validateWebhookUrl(webhookHealthUrl);  // allowlist + private-IP block
  const response = await fetch(webhookHealthUrl, { redirect: 'error', signal: AbortSignal.timeout(3000) });
  return res.json({ healthy: response.ok });  // only boolean; never proxy response body
});

The fix validates the health check URL against the same validateWebhookUrl allowlist and private-IP block used for delivery endpoints. The critical change is that the response body is never proxied — only the boolean HTTP status of the health check response is returned. This eliminates the data exfiltration channel regardless of what the target server returns. Health check endpoints must never relay internal service responses to external callers; the only information the caller needs is whether the target is reachable and returning a success status.

SSRF66-003 — CNAME-rebinding SSRF via webhook retry URL with redirect:follow bypasses allowlist

Severity: CRITICAL

The webhook retry endpoint fetches the user-supplied retryUrl with redirect: 'follow'. Hostname-based allowlist checks are performed against the initial hostname in the URL before the fetch begins. An attacker registers an allowlisted public hostname and configures a CNAME chain: the allowlisted domain CNAMEs to a second domain which CNAMEs to vault.internal:8200. When the fetch follows the redirect chain, it resolves the final hostname in the CNAME chain — the internal Vault address — after the allowlist check has already passed on the original hostname. The Vault KV API response is returned as the retry confirmation body and proxied back to the attacker.

CNAME-based allowlist bypass is a well-known SSRF escalation path that defeats all purely hostname-based defences. The fix requires both refusing to follow redirects (redirect: 'error') and performing post-DNS-resolution IP validation — the same approach used for SSRF66-001. Redirect:follow must never be used when fetching user-supplied URLs; if redirect following is required for legitimate webhooks, each redirect target must be independently validated against the allowlist and private-IP blocklist.

Vulnerable
app.post('/api/webhooks/retry', requireSession, async (req, res) => {
  const { retryUrl, deliveryId } = req.body;
  // redirect:follow — CNAME chain bypasses hostname allowlist check
  const response = await fetch(retryUrl, { redirect: 'follow' });
  const result = await response.json();  // Vault KV secrets if CNAME → vault:8200
  return res.json({ retried: true, result });
});
Fixed
const RetryConfirmationSchema = z.object({ retried: z.boolean(), deliveryId: z.string().max(128) });
app.post('/api/webhooks/retry', requireSession, async (req, res) => {
  const { retryUrl, deliveryId } = req.body;
  await validateWebhookUrl(retryUrl);
  const response = await fetch(retryUrl, { redirect: 'error', signal: AbortSignal.timeout(5000) });
  const raw = await response.json();
  const result = RetryConfirmationSchema.parse(raw);  // extract only structured fields; no raw proxy
  return res.json(result);
});

The fix uses redirect: 'error' to prevent the fetch from following any redirects, eliminating the CNAME-chain bypass vector. Even if a redirect were somehow followed, the Zod RetryConfirmationSchema allows only the specific fields expected from a legitimate retry confirmation response — any additional fields from an internal service response are discarded. The combination of redirect blocking, allowlist validation with post-DNS IP checking, and strict response schema extraction provides layered defence against all known SSRF bypass techniques.

SSRF66-004 — Persistent internal data exposure via webhook registration storing raw verification response

Severity: HIGH

The webhook registration endpoint fetches a user-supplied verificationUrl and stores the full parsed JSON response body as the verificationData field on the webhook document. When an attacker registers a webhook with a verificationUrl pointing to the internal etcd configuration store at http://etcd:2379/v3/kv/range, the registry server fetches and stores the etcd KV range response — containing internal configuration keys, database connection strings, and service credentials — as a webhook verification record. This data persists in the database and is subsequently readable via the webhook history API.

Unlike the other SSRF findings in this advisory where the exfiltrated data is returned in the immediate API response, this finding creates a persistent data store of internal service responses. Even if network monitoring detects the outbound SSRF request, the exfiltrated data remains in the webhook history table and is accessible to anyone with read access to the webhooks API. The webhook history API may have broader access controls than the registration endpoint — read-only users, analytics pipelines, and third-party integrations may all have access to webhook history records including the stored internal service responses.

Vulnerable
app.post('/api/webhooks/register', requireSession, async (req, res) => {
  const { verificationUrl, webhookId } = req.body;
  const response = await fetch(verificationUrl);
  const verificationData = await response.json();  // etcd config data if URL = etcd:2379
  await Webhook.findByIdAndUpdate(webhookId, { verificationData, verifiedAt: new Date() });
  return res.json({ registered: true });
});
Fixed
app.post('/api/webhooks/register', requireSession, async (req, res) => {
  const { verificationUrl, webhookId } = req.body;
  await validateWebhookUrl(verificationUrl);
  const response = await fetch(verificationUrl, { redirect: 'error', signal: AbortSignal.timeout(3000) });
  await Webhook.findByIdAndUpdate(webhookId, { verified: response.ok, verifiedAt: new Date() });
  return res.json({ registered: response.ok });  // only boolean stored; never raw response body
});

The fix stores only the boolean HTTP success status of the verification response rather than the response body. This eliminates both the SSRF exfiltration channel and the persistent data storage risk — no internal service response is ever written to the database regardless of the target URL. The validateWebhookUrl function provides allowlist and private-IP-block protection against direct SSRF. The webhook history API now contains only verified: boolean and verifiedAt: Date — fields that cannot carry exfiltrated internal service data.

Run SkillAudit to detect unvalidated URL fetch patterns, missing private-IP blocklists, redirect:follow on user-supplied URLs, and raw response body proxying in your MCP skill registry webhook endpoints. Join the waitlist for access.