← Security advisories

Claude MCP skill SSRF — skill webhook and callback endpoint configuration — SA-SKL-SSRF48

SA-SKL-SSRF48 documents four SSRF vulnerabilities in MCP skill registry webhook and callback endpoint configuration. These endpoints allow skill publishers to register external URLs that the registry will call when specific events occur: webhook test endpoints verify delivery reachability, callback verification endpoints confirm that an external system accepted a registration, webhook delivery endpoints dispatch event payloads, and callback health check endpoints confirm that registered callback targets remain reachable. All four perform server-side HTTP requests to user-supplied URLs without adequate validation, creating SSRF vectors that expose the registry's internal network — including cloud provider IMDS endpoints, service discovery systems, secrets managers, and configuration stores.

SA-SKL-SSRF48 findings at a glance
CRITICALSSRF48-001 — webhook test endpoint fetches user-supplied webhookUrl; attacker sets to 169.254.169.254; IAM credentials in webhook test response
CRITICALSSRF48-002 — callback verification endpoint fetches user-supplied callbackUrl; attacker points to Consul:8500; Consul catalog JSON returned as callback verification payload
CRITICALSSRF48-003 — webhook delivery endpoint follows redirect on deliveryUrl; CNAME to Vault:8200 returns KV secrets as webhook delivery confirmation
HIGHSSRF48-004 — callback health check endpoint fetches user-supplied healthUrl; attacker points to etcd:2379; etcd configuration data stored as health check result readable via analytics API

SSRF48-001 — Webhook test endpoint fetches user-supplied URL to cloud IMDS

The webhook test endpoint at POST /api/skills/:id/webhooks/test accepts a webhookUrl parameter and performs a server-side HTTP GET to that URL to verify that the endpoint is reachable before registering it as a delivery target. When the attacker supplies http://169.254.169.254/latest/meta-data/iam/security-credentials/ as the webhookUrl, the registry's server makes the IMDS request from its own network identity — which carries the cloud provider's metadata service privilege — and returns the IAM security credential response body to the attacker as the webhook test result. The returned credentials include the AccessKeyId, SecretAccessKey, and Token for the registry's production IAM role, granting the attacker full AWS API access as the registry service.

SSRF48-001 fix: Maintain an allowlist of known webhook hosting domains (e.g., hooks.slack.com, api.pagerduty.com, webhook.site) and reject any URL that does not match an allowlisted domain. Perform a DNS pre-resolution check and block any URL that resolves to a private IP range (RFC1918, link-local, loopback). Set redirect: 'error' to prevent redirect chains to internal hosts. Return only the HTTP status code and round-trip latency from the test — never the response body.

WRONG
router.post('/skills/:id/webhooks/test', requireSession, async (req, res) => {
  const { webhookUrl } = req.body;
  // No URL validation — SSRF to any internal host
  const result = await fetch(webhookUrl);
  const body = await result.text();
  res.json({ status: result.status, body });  // proxies full response body to attacker
});
RIGHT
const WEBHOOK_DOMAIN_ALLOWLIST = new Set([
  'hooks.slack.com', 'api.pagerduty.com', 'api.opsgenie.com', 'webhook.site'
]);

router.post('/skills/:id/webhooks/test', requireSession, async (req, res) => {
  const { webhookUrl } = req.body;
  const parsed = new URL(webhookUrl);
  if (!WEBHOOK_DOMAIN_ALLOWLIST.has(parsed.hostname)) {
    return res.status(400).json({ error: 'webhook_domain_not_allowed' });
  }
  // DNS pre-resolution: block private/link-local IPs
  const resolved = await dns.resolve4(parsed.hostname);
  for (const ip of resolved) {
    if (isPrivateIp(ip)) return res.status(400).json({ error: 'private_ip_blocked' });
  }
  const result = await fetch(webhookUrl, { redirect: 'error' });
  // Return only status and latency — never response body
  res.json({ reachable: true, statusCode: result.status });
});

SSRF48-002 — Callback verification endpoint proxies Consul service catalog

The callback verification endpoint at POST /api/skills/:id/callbacks/verify fetches the user-supplied callbackUrl to confirm that an external system has accepted the callback registration. When the attacker supplies http://consul:8500/v1/catalog/services, the registry proxies the full Consul service catalog JSON — including internal service names, port mappings, health check endpoints, and service tags — back to the attacker as the callback verification payload. This provides a complete map of the registry's internal service topology, directly enabling targeted SSRF probes against individual internal services identified in the catalog.

SSRF48-002 fix: Apply the same domain allowlist and DNS pre-resolution check as SSRF48-001. After receiving the callback verification response, parse only the specific fields that indicate success or failure — a JSON schema check for a {"status":"ok"}-style acknowledgment. Never proxy the raw response body. Set redirect: 'error'.

SSRF48-003 — Webhook delivery endpoint follows redirect to Vault KV store

The webhook delivery endpoint at POST /api/skills/:id/webhooks/deliver dispatches event payloads to the registered deliveryUrl with redirect: 'follow'. When the attacker registers a deliveryUrl that points to a domain with a CNAME record pointing to vault.internal:8200, the fetch follows the redirect to the Vault server and returns the KV secrets response as the webhook delivery confirmation. The CNAME-based redirect bypass is the critical element: hostname allowlist checks based on the original URL hostname pass because the check targets the CNAME source domain, while the actual request reaches the Vault destination after DNS resolution returns the internal IP.

SSRF48-003 fix: Set redirect: 'error' on all webhook delivery requests — if the destination requires a redirect, the registration should fail and the publisher should update their webhook URL directly. Apply DNS pre-resolution after any hostname allowlist check to catch CNAME chains that resolve to private IPs. Extract only the HTTP status code from the delivery response — never return or store the response body.

SSRF48-004 — Callback health check stores etcd cluster configuration as health result

The callback health check endpoint at GET /api/skills/:id/callbacks/health periodically fetches the registered healthUrl to confirm that callback targets remain reachable, and stores the result in an analytics table that registry administrators can read via the analytics API. When the attacker registers http://etcd:2379/v3/kv/range as the healthUrl, the health check process fetches the etcd key-value range endpoint and stores the full response — containing etcd cluster configuration, stored secrets, and service discovery data — as the health check result. The attacker retrieves this data by reading the analytics API, which requires only a standard authenticated session rather than the administrative access that would be needed to query etcd directly.

SSRF48-004 fix: Apply domain allowlist and DNS pre-resolution to health check URLs at registration time, not just at check time. Validate that the health check response conforms to a simple boolean-or-numeric health schema before storing it — reject any response that is not a known health check format (e.g., HTTP 200 with {"status":"healthy"}). Store only a boolean reachability flag and the HTTP status code, never the raw response body. Rate-limit health check registrations per org.

SkillAudit's SSRF scanner detects user-supplied URL fetch patterns across webhook test, callback verification, delivery, and health check handlers. It identifies missing allowlists, absent DNS pre-resolution, and redirect:follow misuse in a single static analysis pass. Get started free.