Claude MCP skill SSRF — skill webhook event subscription and notification endpoints — SA-SKL-SSRF53
SA-SKL-SSRF53 documents four server-side request forgery vulnerabilities in MCP skill registry webhook event subscription and notification endpoints. Webhook endpoints are SSRF-prone by design: they accept user-supplied URLs and make server-side HTTP requests to those URLs as part of normal operation. The question is not whether the server should make requests to user-supplied URLs — it must — but whether it enforces an allowlist, blocks private IP ranges, restricts redirect behavior, and avoids reflecting the raw response body back to the caller or persisting it to storage. All four SSRF53 findings violate at least one of these constraints, turning the webhook infrastructure into a network pivot for internal service reconnaissance and credential exfiltration.
subscriptionCallbackUrl to verify endpoint availability — attacker sets to 169.254.169.254; IAM credentials embedded in availability verification response; fix: allowlist of known webhook domains; DNS private-IP block; redirect:error; return only HTTP status booleannotificationUrl to deliver events — attacker points to Consul:8500; Consul catalog JSON returned as notification delivery confirmation; fix: allowlist; Zod parse only boolean delivered; never proxy raw response bodyretryUrl with redirect:follow — CNAME chain to Vault:8200 returns KV secrets as retry confirmation; fix: redirect:error; allowlist; extract only HTTP status codevalidationUrl for HMAC handshake — attacker points to etcd:2379; etcd configuration data returned as HMAC challenge response stored as subscription validation record; fix: allowlist; return only boolean validated; never store raw response bodySSRF53-001 — Subscription callback URL fetch embeds IAM credentials in availability verification response
Severity: CRITICAL
The webhook event subscription endpoint fetches the user-supplied subscriptionCallbackUrl to verify that the endpoint is reachable before activating the subscription. The endpoint makes this verification request using the registry server's network identity, without enforcing a URL allowlist or blocking private IP ranges. An attacker registers a webhook subscription with subscriptionCallbackUrl set to http://169.254.169.254/latest/meta-data/iam/security-credentials/, causing the registry server to fetch the AWS instance metadata endpoint and return the IAM role name in the availability verification response. A second subscription registration with the full credential path retrieves AccessKeyId, SecretAccessKey, and Token for the IAM role attached to the registry server instance.
The extracted credentials provide the same access level as the registry server itself — typically including read/write access to S3 buckets containing skill artifacts, ECR push access for skill container images, and secrets manager read access for database connection strings and API keys. The fix enforces an allowlist of permitted webhook domains (operator-configured list of CI and notification service domains), adds a DNS pre-resolution check that blocks private IP ranges and link-local addresses, sets redirect: 'error' to prevent redirect chains that bypass the IP block, and returns only a boolean reachable signal rather than the raw response body.
// Webhook subscription verification — no URL validation, proxies raw response
router.post('/webhooks/subscribe', requireSession, async (req, res) => {
const { subscriptionCallbackUrl, events } = req.body;
// Verification fetch — attacker points to 169.254.169.254
const verification = await fetch(subscriptionCallbackUrl);
const verifyBody = await verification.text(); // IAM credentials in response body
if (verification.ok) {
await Webhook.create({ userId: req.session.userId, url: subscriptionCallbackUrl, events });
return res.json({ ok: true, verificationBody: verifyBody }); // proxies credentials to caller
}
return res.status(400).json({ error: 'Endpoint not reachable' });
});
// Webhook subscription verification — allowlist + private IP block + boolean only
router.post('/webhooks/subscribe', requireSession, async (req, res) => {
const { subscriptionCallbackUrl, events } = WebhookSubscribeSchema.parse(req.body);
// Allowlist check — only permitted CI and notification domains
const parsed = new URL(subscriptionCallbackUrl);
if (!WEBHOOK_DOMAIN_ALLOWLIST.includes(parsed.hostname)) {
return res.status(400).json({ error: 'Domain not in webhook allowlist' });
}
// DNS pre-resolution — block private/link-local ranges
const resolved = await dns.resolve4(parsed.hostname);
if (resolved.some(isPrivateOrLinkLocal)) {
return res.status(400).json({ error: 'Private IP address not permitted' });
}
// Verification fetch — redirect:error prevents CNAME chains
const verification = await fetch(subscriptionCallbackUrl, {
method: 'GET',
redirect: 'error',
signal: AbortSignal.timeout(5000),
});
if (verification.ok) {
await Webhook.create({ userId: req.session.userId, url: subscriptionCallbackUrl, events });
return res.json({ ok: true, reachable: true }); // boolean only, no body proxy
}
return res.status(400).json({ error: 'Endpoint not reachable', reachable: false });
});
SSRF53-002 — Notification dispatch proxies Consul catalog JSON as delivery confirmation
Severity: CRITICAL
The webhook notification dispatch endpoint fetches the registered notificationUrl to deliver events and returns the raw response body as the delivery confirmation. An attacker who registered a webhook subscription with notificationUrl pointing to an internal Consul service discovery endpoint (http://consul.internal:8500/v1/catalog/services) receives the full Consul catalog — a list of all registered services, their health check endpoints, and their metadata tags — as the delivery confirmation response in the webhook event history API.
The Consul catalog is the most complete map of the internal network topology available from any single endpoint. It lists services by name, their ports, their health check URLs, and their tags which often include environment identifiers, cluster membership, and deployment metadata. This map enables targeted exploitation of other SSRF findings in the registry: once an attacker knows that the registry deployment has a Vault instance at a specific internal address, they can chain SSRF53-003 to extract secrets from it. The fix enforces an allowlist before dispatching notifications, parses only a boolean delivered signal from the notification response, and never stores or returns the raw response body.
SSRF53-003 — Retry URL redirect-follow chains to Vault KV secrets
Severity: CRITICAL
The webhook retry endpoint fetches the user-supplied retryUrl with redirect: 'follow'. This follows HTTP redirects including CNAME-based DNS redirects. An attacker registers a domain they control with a CNAME record pointing to the internal Vault service (vault.internal), then sets their webhook retryUrl to their controlled domain. The retry endpoint resolves the domain, follows the CNAME, and fetches http://vault.internal:8200/v1/secret/data/registry. The Vault KV response containing database connection strings, API keys, and signing secrets is returned as the retry confirmation response.
DNS-based SSRF is particularly effective against SSRF mitigations that only check the initial URL hostname but allow redirects: the initial hostname passes the allowlist check, and the redirect to the internal Vault address is followed automatically. The fix sets redirect: 'error' globally on all webhook fetch calls, preventing any redirect from being followed regardless of destination. The fix also adds a post-resolution private IP block to catch cases where an allowlisted domain resolves to a private address (DNS rebinding scenarios), and extracts only the HTTP status code from the retry response — no body is returned or stored.
CNAME chains bypass hostname-only allowlists. An attacker who controls a domain in your webhook allowlist (or any domain that passes allowlist validation) can point a CNAME record at any internal service. redirect: 'follow' will faithfully navigate that chain and fetch the internal endpoint. Set redirect: 'error' on all server-side fetch calls that use user-supplied URLs, and perform a post-resolution private IP check on the final resolved address before initiating the request.
SSRF53-004 — HMAC validation URL fetches etcd configuration data stored as subscription record
Severity: HIGH
The webhook subscription validation endpoint fetches the user-supplied validationUrl to perform an HMAC challenge-response handshake before activating the subscription. The endpoint sends a challenge token to the validation URL and expects the response to contain the HMAC signature of that token. The raw response body is stored as the subscription validation record in the registry database, persisted to allow audit-trail reconstruction of the validation handshake.
An attacker who points validationUrl to an internal etcd endpoint (http://etcd.internal:2379/v2/keys/) receives the etcd key listing as the challenge-response body. This response body is stored as the subscription validation record and is subsequently readable through the webhook event history API. The etcd key listing exposes cluster configuration keys including Kubernetes secrets paths, service configuration keys, and certificate data paths. The fix enforces the webhook domain allowlist before dispatching the HMAC handshake request, parses only a boolean validated signal by checking whether the response body contains the expected HMAC signature, and never stores the raw response body — only a boolean validation status and timestamp are persisted.
Remediation summary
| Finding | Severity | Primary remediation | Secondary hardening |
|---|---|---|---|
| SSRF53-001 | Critical | Allowlist of permitted webhook domains; DNS private-IP block; redirect:error | Return boolean reachable only; no body proxy |
| SSRF53-002 | Critical | Allowlist before notification dispatch; never proxy raw response body | Zod parse only boolean delivered signal |
| SSRF53-003 | Critical | redirect:error on all webhook fetch calls; post-resolution private IP check | Return only HTTP status code; no body storage |
| SSRF53-004 | High | Allowlist before HMAC handshake; store only boolean validated + timestamp | Never store raw challenge-response body |
Find SSRF vulnerabilities like these before attackers do. SkillAudit scans your MCP skill registry webhook endpoints for all four SA-SKL-SSRF53 patterns plus the broader SSRF advisory series. See the SA-SKL-SSRF52 audit report delivery advisory and the SA-SKL-SSRF51 auto-upgrade notification advisory for related findings. Connect your repository at skillaudit.dev.