← Security advisories

Claude MCP skill SSRF — skill runtime telemetry and observability pipeline endpoints — SA-SKL-SSRF65

SA-SKL-SSRF65 documents four Server-Side Request Forgery vulnerabilities in MCP skill registry runtime telemetry and observability pipeline endpoints. Telemetry and observability endpoints accept user-supplied destination URLs to configure where traces, metrics, and health data should be delivered — a design that allows administrators to route observability data to arbitrary backends. Without strict URL allowlisting, DNS-based private IP blocking, and redirect chain controls, these endpoints become server-side proxies that an attacker can point at cloud metadata services, internal service discovery, secret stores, and configuration databases to exfiltrate infrastructure credentials and topology data.

SA-SKL-SSRF65 findings at a glance
CRITICALSSRF65-001 — telemetry export endpoint fetches user-supplied telemetryExportUrl — attacker sets to 169.254.169.254; IAM credentials embedded in telemetry export confirmation response returned to caller; fix: allowlist; DNS private-IP block; redirect:error; return only HTTP status boolean
CRITICALSSRF65-002 — metrics collection endpoint fetches user-supplied metricsCollectorUrl — attacker points to Consul:8500; Consul catalog JSON returned as metrics collection confirmation containing full internal network topology; fix: allowlist; Zod parse only boolean collected; never proxy raw response body
CRITICALSSRF65-003 — trace export endpoint fetches user-supplied traceExportUrl with redirect:follow — CNAME chain to Vault:8200 returns KV secrets as trace export confirmation; CNAME-based rebinding defeats allowlist controls that check only initial hostname without following redirect chains through DNS; fix: redirect:error; allowlist; extract only structured trace export schema with traceId and exportedAt fields
HIGHSSRF65-004 — observability sink registration endpoint fetches user-supplied sinkHealthCheckUrl and stores raw response as sink health record — attacker points to etcd:2379; etcd configuration data stored persistently as sink health record readable via telemetry history API; fix: allowlist; return only boolean healthy and latencyMs; never store raw response body

SSRF65-001 — Telemetry export endpoint fetches user-supplied URL leaking IAM credentials

Severity: CRITICAL

The telemetry export configuration endpoint accepts a telemetryExportUrl parameter that specifies the destination endpoint for exporting runtime telemetry data (traces, spans, metrics). The endpoint calls fetch(telemetryExportUrl) without validating the URL against an allowlist or blocking requests to private IP ranges. An attacker who sets telemetryExportUrl to http://169.254.169.254/latest/meta-data/iam/security-credentials/ receives the cloud metadata service response — including IAM role name — which is then returned as the telemetry export confirmation body.

The IAM credentials returned by the metadata service include temporary access keys, secret access keys, and session tokens that are valid for the duration of the IAM role's credential rotation period (typically 1–6 hours). With these credentials an attacker has full programmatic access to all AWS services authorized by the registry server's IAM role — which typically includes S3 buckets containing SDK artifacts, ECR repositories, and RDS snapshot access.

Vulnerable
// POST /api/telemetry/export/configure — user-supplied URL fetched without restriction
router.post('/export/configure', requireSession, requireRole('admin'), async (req, res) => {
  const { telemetryExportUrl, format } = req.body;
  // attacker: telemetryExportUrl = 'http://169.254.169.254/latest/meta-data/iam/...'
  const confirmation = await fetch(telemetryExportUrl, {
    method: 'POST',
    body: JSON.stringify({ test: true, format }),
  });
  const body = await confirmation.json();
  return res.json({ configured: true, endpoint: telemetryExportUrl, confirmation: body });
});
Fixed
// POST /api/telemetry/export/configure — allowlist + DNS block + return boolean only
const { z } = require('zod');
const dns = require('dns').promises;

const TELEMETRY_ALLOWLIST = process.env.TELEMETRY_EXPORT_ALLOWLIST.split(',');
const PRIVATE_RANGES = [/^10\./, /^172\.(1[6-9]|2\d|3[01])\./, /^192\.168\./, /^169\.254\./];

async function isSafeUrl(urlStr) {
  const u = new URL(urlStr);
  if (!TELEMETRY_ALLOWLIST.some(h => u.hostname === h)) return false;
  const { address } = await dns.lookup(u.hostname);
  return !PRIVATE_RANGES.some(re => re.test(address));
}

router.post('/export/configure', requireSession, requireRole('admin'), async (req, res) => {
  const { telemetryExportUrl, format } = req.body;
  if (!(await isSafeUrl(telemetryExportUrl))) return res.status(400).json({ error: 'URL not in allowlist' });
  const response = await fetch(telemetryExportUrl, {
    method: 'POST',
    redirect: 'error',
    body: JSON.stringify({ test: true, format }),
  });
  return res.json({ configured: response.ok });  // never proxy response body
});

SSRF65-002 — Metrics collection endpoint fetches user-supplied URL returning internal service topology

Severity: CRITICAL

The metrics collection configuration endpoint accepts a metricsCollectorUrl parameter that specifies an external Prometheus or OpenTelemetry collector endpoint. The registry server fetches this URL to verify the collector is reachable and returns the raw response body as the collection confirmation. An attacker who sets metricsCollectorUrl to http://consul:8500/v1/catalog/services receives a JSON response listing all registered internal services with their health status, IP addresses, and metadata tags.

The Consul catalog response reveals the complete internal service mesh topology: service names, IP addresses, ports, health check URLs, and service metadata tags that may include environment variables, deployment IDs, and network segment identifiers. This topology is exactly the reconnaissance data needed to chain SSRF65-001 — an attacker who first maps the internal network via SSRF65-002 knows precisely which internal IP ranges and service names to target for credential extraction.

Vulnerable
// POST /api/telemetry/metrics/configure — raw response body proxied to caller
router.post('/metrics/configure', requireSession, requireRole('admin'), async (req, res) => {
  const { metricsCollectorUrl } = req.body;
  // attacker: metricsCollectorUrl = 'http://consul:8500/v1/catalog/services'
  const response = await fetch(metricsCollectorUrl);
  const body = await response.json();
  return res.json({ configured: true, collectorResponse: body });  // full Consul topology returned
});
Fixed
// POST /api/telemetry/metrics/configure — allowlist + return boolean only
router.post('/metrics/configure', requireSession, requireRole('admin'), async (req, res) => {
  const { metricsCollectorUrl } = req.body;
  if (!(await isSafeUrl(metricsCollectorUrl))) return res.status(400).json({ error: 'URL not in allowlist' });
  const response = await fetch(metricsCollectorUrl, { redirect: 'error' });
  return res.json({ collected: response.ok });  // only boolean returned
});

SSRF65-003 — Trace export follows CNAME chain to Vault returning KV secrets

Severity: CRITICAL

The trace export endpoint fetches traceExportUrl with redirect: 'follow' (node-fetch and undici default). An attacker controls a DNS record that is an alias (CNAME) pointing to an internal hostname such as vault.internal or resolves to the Vault API address at 127.0.0.1:8200. When the registry server resolves the attacker's hostname and follows the CNAME chain, it reaches Vault and receives the KV secret store response as the trace export result.

CNAME-based DNS rebinding defeats allowlist controls that only validate the hostname in the initial URL — the allowlist check passes on the attacker's publicly registered domain, but the CNAME chain resolves to an internal address at fetch time. The Vault response body — which may include database passwords, API keys, and certificate private keys stored as KV secrets — is returned as the trace export confirmation body. The fix requires both setting redirect: 'error' to prevent redirect following and performing DNS-layer private IP blocking on the resolved address rather than the input hostname alone.

Vulnerable
// POST /api/telemetry/traces/export — redirect:follow enables CNAME-based bypass
router.post('/traces/export', requireSession, requireRole('admin'), async (req, res) => {
  const { traceExportUrl } = req.body;
  // allowlist check on input hostname passes for attacker.com (registered domain)
  // but CNAME chain: attacker.com → vault.internal → 127.0.0.1:8200
  const response = await fetch(traceExportUrl, { redirect: 'follow' });
  const body = await response.json();
  return res.json({ exported: true, confirmation: body });  // Vault KV secrets returned
});
Fixed
// POST /api/telemetry/traces/export — redirect:error + allowlist + structured response only
const TraceExportConfirmationSchema = z.object({
  traceId:    z.string().uuid().optional(),
  exportedAt: z.string().datetime().optional(),
});

router.post('/traces/export', requireSession, requireRole('admin'), async (req, res) => {
  const { traceExportUrl } = req.body;
  if (!(await isSafeUrl(traceExportUrl))) return res.status(400).json({ error: 'URL not in allowlist' });
  const response = await fetch(traceExportUrl, { redirect: 'error' });  // no CNAME chain following
  if (!response.ok) return res.json({ exported: false });
  const raw = await response.json();
  const parsed = TraceExportConfirmationSchema.safeParse(raw);
  return res.json({ exported: true, traceId: parsed.success ? parsed.data.traceId : undefined });
});

SSRF65-004 — Observability sink health check stores internal service config as persistent sink record

Severity: HIGH

The observability sink registration endpoint accepts a sinkHealthCheckUrl to verify that a registered sink endpoint is reachable. After fetching the URL, the endpoint stores the raw HTTP response body as a sinkHealthRecord document in the database, which is subsequently readable via the telemetry history API by any authenticated user. An attacker who sets sinkHealthCheckUrl to http://etcd:2379/v3/kv/range causes the etcd configuration store to respond with its full key-value listing — which is then stored persistently in the sink health database.

Unlike other SSRF findings in this advisory where the exfiltrated data is returned directly in the API response, SSRF65-004 creates a persistent exfiltration channel: the internal service data is written to the database and readable by any user with telemetry history access — not just the admin who configured the sink. The etcd response may contain cluster membership data, Kubernetes secrets stored in etcd, certificate authority keys, and service account tokens that are valid indefinitely until rotated.

Vulnerable
// POST /api/telemetry/sinks/register — raw response stored as sink health record
router.post('/sinks/register', requireSession, requireRole('admin'), async (req, res) => {
  const { sinkName, sinkHealthCheckUrl } = req.body;
  // attacker: sinkHealthCheckUrl = 'http://etcd:2379/v3/kv/range'
  const healthResponse = await fetch(sinkHealthCheckUrl);
  const healthData = await healthResponse.json();  // full etcd KV store response
  await SinkRecord.create({ sinkName, healthCheckUrl: sinkHealthCheckUrl,
    healthData,  // etcd config stored persistently, readable via telemetry history API
    registeredBy: req.session.userId });
  return res.json({ registered: true });
});
Fixed
// POST /api/telemetry/sinks/register — allowlist + return only boolean + never store response body
router.post('/sinks/register', requireSession, requireRole('admin'), async (req, res) => {
  const { sinkName, sinkHealthCheckUrl } = req.body;
  if (!(await isSafeUrl(sinkHealthCheckUrl))) return res.status(400).json({ error: 'URL not in allowlist' });
  const response = await fetch(sinkHealthCheckUrl, { redirect: 'error' });
  await SinkRecord.create({ sinkName, healthCheckUrl: sinkHealthCheckUrl,
    healthy: response.ok,  // only boolean — never store response body
    latencyMs: response.headers.get('x-response-time') ? parseInt(response.headers.get('x-response-time')) : null,
    registeredBy: req.session.userId });
  return res.json({ registered: true, healthy: response.ok });
});

Run SkillAudit to detect missing URL allowlists on telemetry export, metrics collection, trace export, and sink registration endpoints in your MCP skill registry observability pipeline. Join the waitlist for access.