← Security advisories

Claude MCP skill SSRF — skill analytics and usage reporting endpoints — SA-SKL-SSRF54

SA-SKL-SSRF54 documents four Server-Side Request Forgery vulnerabilities in MCP skill registry analytics and usage reporting endpoints. Analytics and reporting surfaces are prime SSRF targets because they accept user-supplied URLs as destination endpoints for data delivery — a design pattern that is easy to introduce and difficult to audit at scale. An analytics export callback URL that the service fetches to confirm delivery can be redirected to the EC2 instance metadata endpoint, returning AWS IAM credentials with registry-wide write access. A usage report delivery endpoint that proxies its fetch response can return the full Consul service catalog. An analytics data source endpoint that follows redirects can be pointed at Vault via a CNAME chain, returning KV secret data as dashboard content. And a usage alert webhook that stores its response body as confirmation state can persist etcd cluster configuration data into the registry's alert history database.

SA-SKL-SSRF54 findings at a glance
CRITICALSSRF54-001 — analytics export endpoint fetches user-supplied exportCallbackUrl to deliver export; attacker sets to 169.254.169.254; IAM credentials embedded in export delivery response returned to caller; fix: allowlist; DNS private-IP block; redirect:error; return only HTTP status boolean
CRITICALSSRF54-002 — usage report delivery endpoint fetches user-supplied reportDeliveryUrl to send usage reports; attacker points to Consul:8500; Consul catalog JSON returned as report delivery confirmation; fix: allowlist; Zod parse only boolean delivered; never proxy raw response body
CRITICALSSRF54-003 — analytics dashboard data source endpoint fetches user-supplied dataSourceUrl with redirect:follow; CNAME chain to Vault:8200 returns KV secrets as dashboard data; fix: redirect:error; allowlist; extract only structured dashboard data schema
HIGHSSRF54-004 — usage alert notification endpoint fetches user-supplied alertWebhookUrl; attacker points to etcd:2379; etcd configuration data stored as alert delivery confirmation; fix: allowlist; return only boolean notified; never store raw response body

SSRF54-001 — Export callback URL fetches IMDSv1 and returns IAM credentials

Severity: CRITICAL

The analytics export endpoint accepts a user-supplied exportCallbackUrl in the request body, intended to let users receive their analytics data export at a webhook. The service fetches this URL with node-fetch and returns the response status and body to the caller as confirmation. An attacker submits https://169.254.169.254/latest/meta-data/iam/security-credentials/ as the callback URL. The IMDSv1 endpoint returns the name of the attached IAM role; a second fetch to the full credentials path returns the AccessKeyId, SecretAccessKey, and Token for the registry's production IAM role, which is included verbatim in the export confirmation response returned to the attacker.

The fix validates exportCallbackUrl against an allowlist of known webhook domains before fetching, blocks private IP ranges and AWS metadata addresses at DNS resolution time, disables redirects to prevent CNAME-based bypass, and returns only a boolean delivery status to the caller — never the raw response body from the fetched URL.

Vulnerable
// POST /api/skills/:id/analytics/export
router.post('/:id/analytics/export', requireSession, async (req, res) => {
  const { exportCallbackUrl, format, dateRange } = req.body;
  const exportData = await generateExport(req.params.id, format, dateRange);
  const delivery = await fetch(exportCallbackUrl, { // no URL validation
    method: 'POST',
    body: JSON.stringify(exportData),
  });
  const confirmBody = await delivery.text();
  return res.json({ delivered: delivery.ok, confirmation: confirmBody });
  // confirmBody includes IAM credentials when exportCallbackUrl=169.254.169.254
});
Fixed
// POST /api/skills/:id/analytics/export
const EXPORT_CALLBACK_ALLOWLIST = new Set([
  'hooks.slack.com', 'webhook.site', 'api.pagerduty.com',
]);

async function isSafeCallbackUrl(url) {
  const parsed = new URL(url);
  if (!['http:', 'https:'].includes(parsed.protocol)) return false;
  if (!EXPORT_CALLBACK_ALLOWLIST.has(parsed.hostname)) return false;
  const { address } = await dns.lookup(parsed.hostname);
  if (isPrivateIp(address)) return false; // blocks 169.254.x.x, 10.x.x.x, etc.
  return true;
}

router.post('/:id/analytics/export', requireSession, async (req, res) => {
  const { exportCallbackUrl, format, dateRange } = ExportRequestSchema.parse(req.body);
  if (!await isSafeCallbackUrl(exportCallbackUrl)) {
    return res.status(400).json({ error: 'Invalid callback URL' });
  }
  const exportData = await generateExport(req.params.id, format, dateRange);
  const delivery = await fetch(exportCallbackUrl, {
    method: 'POST',
    body: JSON.stringify(exportData),
    redirect: 'error', // no redirects
  });
  return res.json({ delivered: delivery.ok }); // boolean only, never response body
});

SSRF54-002 — Report delivery URL proxies Consul service catalog

Severity: CRITICAL

The usage report delivery endpoint accepts a reportDeliveryUrl in the report configuration document and fetches it to push the usage report to the user's chosen destination. The raw response body from the fetch is returned to the caller as the delivery confirmation. An attacker configures reportDeliveryUrl to http://consul.internal:8500/v1/catalog/services. The Consul HTTP API returns a JSON document mapping all registered service names to their tags — a complete map of the internal network topology — which the registry returns as the report delivery confirmation body.

The topology data enables an attacker to enumerate all internal services, identify database hostnames and cache nodes, and compose targeted follow-up SSRF requests against specific internal addresses. The fix validates reportDeliveryUrl against an allowlist, parses the delivery response with a strict Zod schema that accepts only a boolean delivered field, and never proxies the raw response body back to the caller.

Never proxy internal HTTP response bodies to external callers. Any endpoint that fetches a user-supplied URL and returns the response body is a data exfiltration channel regardless of authentication controls. Return only a structured success/failure signal extracted from the response — never the raw body, status text, or headers from the fetched URL.

SSRF54-003 — Analytics data source follows CNAME redirect to Vault KV secrets

Severity: CRITICAL

The analytics dashboard data source endpoint accepts a dataSourceUrl and fetches it with redirect: 'follow' to retrieve external metric data for display in the skill's analytics dashboard. An attacker registers a domain they control with a CNAME record pointing to vault.internal. When the registry fetches the attacker-controlled domain, the CNAME redirects the request to the Vault HTTP API at port 8200. The Vault API returns KV secret data for any path accessible to the registry's service identity, which the analytics endpoint returns as dashboard data.

DNS-based SSRF bypasses hostname-only allowlists because the allowlist check passes on the original attacker-controlled hostname, while the actual TCP connection resolves to the internal Vault address. The fix disables redirects entirely (redirect: 'error'), applies the allowlist check to the final resolved address after DNS lookup, and extracts only the structured dashboard data fields from the response — rejecting any response that does not conform to the expected schema.

SSRF54-004 — Usage alert webhook stores etcd configuration as confirmation

Severity: HIGH

The usage alert notification endpoint fetches the user-supplied alertWebhookUrl to dispatch usage threshold alerts and stores the response body as the alert delivery confirmation in the alert history database. An attacker configures alertWebhookUrl to http://etcd.internal:2379/v3/kv/range. The etcd HTTP API returns a JSON document containing key-value pairs from the etcd cluster — including cluster configuration, service discovery records, and distributed lock state — which is persisted into the alert history database as the confirmation body.

The persisted etcd data is subsequently readable by any user with access to the alert history API, creating a secondary exfiltration channel that does not require the attacker to observe the original fetch response. The alert history also retains the data across request boundaries, so the data remains accessible even if rate limiting or logging detects the initial fetch. The fix validates alertWebhookUrl against an allowlist, returns only a boolean notified field as the delivery status, and never stores the raw response body in the alert history record.

Vulnerable
// POST /api/skills/:id/analytics/alerts
router.post('/:id/analytics/alerts', requireSession, async (req, res) => {
  const { alertWebhookUrl, threshold, metric } = req.body;
  const alertConfig = await AlertConfig.create({ alertWebhookUrl, threshold, metric });
  // ... trigger evaluation ...
  const delivery = await fetch(alertWebhookUrl, {
    method: 'POST', body: JSON.stringify({ metric, threshold, value: currentValue }),
  });
  const confirmBody = await delivery.text();
  await AlertHistory.create({ configId: alertConfig.id, confirmation: confirmBody });
  // confirmBody and stored confirmation contain etcd data
  return res.json({ notified: delivery.ok, confirmation: confirmBody });
});
Fixed
// POST /api/skills/:id/analytics/alerts
router.post('/:id/analytics/alerts', requireSession, async (req, res) => {
  const { alertWebhookUrl, threshold, metric } = AlertConfigSchema.parse(req.body);
  if (!await isSafeCallbackUrl(alertWebhookUrl)) {
    return res.status(400).json({ error: 'Invalid webhook URL' });
  }
  const alertConfig = await AlertConfig.create({ alertWebhookUrl, threshold, metric });
  const delivery = await fetch(alertWebhookUrl, {
    method: 'POST',
    body: JSON.stringify({ metric, threshold, value: currentValue }),
    redirect: 'error',
  });
  await AlertHistory.create({
    configId: alertConfig.id,
    notified: delivery.ok,
    notifiedAt: new Date(),
    // never store response body
  });
  return res.json({ notified: delivery.ok }); // boolean only
});

Remediation summary

FindingSeverityPrimary remediationSecondary hardening
SSRF54-001CriticalAllowlist callback domains; DNS private-IP block; redirect:error; return only boolean deliveredIMDSv2 enforcement via instance metadata hop-limit; network egress policy
SSRF54-002CriticalAllowlist delivery domains; Zod parse only boolean from response; never proxy raw response bodyOutbound firewall blocking internal service addresses
SSRF54-003Criticalredirect:error; allowlist applied to resolved address; strict dashboard data schema extractionDNS-level private-IP blocking; Vault network policy denying registry service identity
SSRF54-004HighAllowlist webhook domains; return only boolean notified; never store raw response body in historyAlert history API scoped to own-org records; etcd network policy

Find SSRF vulnerabilities like these before attackers do. SkillAudit scans your MCP skill registry analytics endpoints for all four SA-SKL-SSRF54 patterns plus the broader SSRF advisory series. See the SA-SKL-SSRF53 webhook event subscription advisory and the SA-SKL-SSRF52 audit report delivery advisory for related findings. Connect your repository at skillaudit.dev.