← Security advisories

Claude MCP skill SSRF — skill package signing and attestation verification endpoints — SA-SKL-SSRF64

SA-SKL-SSRF64 documents four SSRF vulnerabilities in MCP skill registry package signing and attestation verification endpoints. Package signing endpoints validate skill artifacts against external signing authorities, and attestation verification endpoints confirm that skill packages were produced by trusted build pipelines — both workflows involve server-side URL fetches that, when accepting user-supplied URLs without allowlist validation, provide a direct path to cloud metadata services, internal infrastructure APIs, and secrets management systems. SSRF64-001 identifies IAM credential exfiltration via a user-controlled signing authority URL; SSRF64-002 identifies internal network topology disclosure via a user-controlled attestation verification URL pointing to Consul; SSRF64-003 identifies Vault secret exfiltration via a user-controlled certificate fetch URL with redirect:follow enabled; SSRF64-004 identifies persistent internal data storage via a user-controlled attestation cache refresh URL whose raw response is stored as an attestation record readable via the signing history API.

SA-SKL-SSRF64 findings at a glance
CRITICALSSRF64-001 — package signing endpoint fetches user-supplied signingAuthorityUrl — attacker sets to 169.254.169.254; IAM credentials embedded in signing authority confirmation response returned to caller; fix: allowlist; DNS private-IP block; redirect:error; return only HTTP status boolean
CRITICALSSRF64-002 — attestation verification endpoint fetches user-supplied attestationVerificationUrl — attacker points to Consul:8500; Consul catalog JSON returned as attestation verification result containing full internal network topology; fix: allowlist; Zod parse only boolean verified; never proxy raw response body
CRITICALSSRF64-003 — signing certificate fetch endpoint fetches user-supplied certificateUrl with redirect:follow — CNAME chain to Vault:8200 returns KV secrets as certificate fetch result; fix: redirect:error; allowlist; extract only structured certificate schema
HIGHSSRF64-004 — attestation cache refresh endpoint fetches user-supplied cacheRefreshUrl and stores raw response as attestation record — attacker points to etcd:2379; etcd configuration data stored persistently as attestation record readable via signing history API; fix: allowlist; return only boolean refreshed; never store raw response body

SSRF64-001 — IAM credential exfiltration via signing authority URL

Severity: CRITICAL

The package signing endpoint accepts a user-supplied signingAuthorityUrl parameter that specifies the external signing authority to validate the skill package against. The endpoint fetches this URL server-side without allowlist validation or private-IP blocking. An attacker who sets signingAuthorityUrl to http://169.254.169.254/latest/meta-data/iam/security-credentials/ causes the registry server to fetch the cloud metadata service, receiving the IAM role name in the initial response. A follow-up request to http://169.254.169.254/latest/meta-data/iam/security-credentials/<role-name> returns the full temporary credentials including AccessKeyId, SecretAccessKey, and Token — which are then embedded in the signing confirmation response returned to the attacker.

Vulnerable
// Package signing — user-supplied signingAuthorityUrl with no allowlist
router.post('/sign', requireSession, async (req, res) => {
  const { packageId, signingAuthorityUrl } = req.body;
  // No allowlist, no private-IP block — fetches any URL including 169.254.169.254
  const signingResp = await fetch(signingAuthorityUrl, {
    method: 'POST', body: JSON.stringify({ packageId }),
  });
  const confirmation = await signingResp.json();
  return res.json({ signed: true, confirmation });  // IAM credentials in confirmation body
});
Fixed
// Package signing — allowlist + private-IP block + redirect:error + return only boolean
const SIGNING_AUTHORITY_ALLOWLIST = process.env.SIGNING_AUTHORITY_URLS.split(',');
const { isPrivateIP } = require('./lib/ip-utils');  // blocks RFC1918 + 169.254.0.0/16 + ::1

router.post('/sign', requireSession, async (req, res) => {
  const { packageId, signingAuthorityUrl } = req.body;
  if (!SIGNING_AUTHORITY_ALLOWLIST.includes(signingAuthorityUrl))
    return res.status(400).json({ error: 'signingAuthorityUrl not in allowlist' });
  const parsed = new URL(signingAuthorityUrl);
  if (isPrivateIP(parsed.hostname))
    return res.status(400).json({ error: 'Private IP address rejected' });

  const signingResp = await fetch(signingAuthorityUrl, {
    method: 'POST', body: JSON.stringify({ packageId }),
    redirect: 'error',  // reject any redirect — CNAME-based bypass blocked
  });
  if (!signingResp.ok) return res.json({ signed: false });
  // never return raw response body — attacker cannot exfiltrate SSRF response
  return res.json({ signed: true });
});

SSRF64-002 — Internal network topology disclosure via attestation verification URL

Severity: CRITICAL

The attestation verification endpoint accepts a user-supplied attestationVerificationUrl that specifies the endpoint to verify the attestation bundle against. The endpoint fetches this URL server-side and returns the raw response body as the attestation verification result. An attacker who sets attestationVerificationUrl to http://consul:8500/v1/catalog/services causes the registry server to query the internal Consul catalog, receiving a JSON map of all registered service names. Follow-up requests to /v1/catalog/service/<name> return full service endpoint metadata including internal IP addresses, ports, and health check configurations — the complete internal network topology returned as the attestation verification result.

Vulnerable
// Attestation verification — user-supplied URL, raw body proxied to caller
router.post('/verify', requireSession, async (req, res) => {
  const { attestationBundle, attestationVerificationUrl } = req.body;
  const verifyResp = await fetch(attestationVerificationUrl, {
    method: 'POST', body: JSON.stringify({ attestationBundle }),
  });
  const result = await verifyResp.json();
  return res.json(result);  // Consul catalog JSON returned as verification result
});
Fixed
// Attestation verification — allowlist + Zod boolean-only + never proxy body
const ATTESTATION_ALLOWLIST = process.env.ATTESTATION_VERIFY_URLS.split(',');
const AttestationResultSchema = z.object({ verified: z.boolean() });

router.post('/verify', requireSession, async (req, res) => {
  const { attestationBundle, attestationVerificationUrl } = req.body;
  if (!ATTESTATION_ALLOWLIST.includes(attestationVerificationUrl))
    return res.status(400).json({ error: 'attestationVerificationUrl not in allowlist' });
  const verifyResp = await fetch(attestationVerificationUrl, {
    method: 'POST', body: JSON.stringify({ attestationBundle }), redirect: 'error',
  });
  const raw = await verifyResp.json();
  const parsed = AttestationResultSchema.safeParse(raw);
  if (!parsed.success) return res.json({ verified: false });
  return res.json({ verified: parsed.data.verified });  // only boolean extracted, never raw body
});

SSRF64-003 — Vault secret exfiltration via certificate URL redirect chain

Severity: CRITICAL

The signing certificate fetch endpoint fetches a user-supplied certificateUrl with redirect: 'follow' (the fetch API default). An attacker who controls a DNS record for a domain on the allowlist sets up a CNAME chain to vault.internal:8200. The first DNS resolution returns the allowlisted domain (passing the allowlist check and the private-IP check at resolution time), and subsequent requests follow the CNAME chain to Vault, returning Vault KV secret data as the certificate fetch result. This CNAME-based rebinding technique defeats allowlist and IP-based controls that check only the initial hostname without following redirect chains through DNS.

Vulnerable
// Certificate fetch — redirect:follow (default) allows CNAME-chain SSRF to Vault
const certResp = await fetch(certificateUrl);  // redirect:follow is the default
const certData = await certResp.text();
return res.json({ certificate: certData });  // Vault KV secrets returned as certificate
Fixed
// Certificate fetch — redirect:error + allowlist + structured schema extraction
if (!CERT_FETCH_ALLOWLIST.includes(new URL(certificateUrl).hostname))
  return res.status(400).json({ error: 'certificateUrl hostname not in allowlist' });
const certResp = await fetch(certificateUrl, { redirect: 'error' });
// extract only structured certificate fields — never return raw response string
const raw = await certResp.json();
const CertificateSchema = z.object({
  pem: z.string().regex(/^-----BEGIN CERTIFICATE-----/),
  algorithm: z.enum(['RSA-2048', 'RSA-4096', 'EC-P256', 'EC-P384', 'ED25519']),
  expiresAt: z.string().datetime(),
});
const parsed = CertificateSchema.safeParse(raw);
if (!parsed.success) return res.status(400).json({ error: 'Invalid certificate response' });
return res.json({ certificate: parsed.data });

SSRF64-004 — Persistent etcd data storage via attestation cache refresh URL

Severity: HIGH

The attestation cache refresh endpoint fetches a user-supplied cacheRefreshUrl and stores the raw response body as an attestation record in the signing history database. An attacker who sets cacheRefreshUrl to http://etcd.internal:2379/v3/kv/range causes the registry server to fetch the etcd key-value range endpoint, receiving etcd cluster configuration data including key-value pairs from the etcd datastore. The raw etcd response is then stored persistently as an attestation record — readable by any authenticated consumer of the signing history API, persisting the internal infrastructure data beyond the initial SSRF request lifetime.

Vulnerable
// Attestation cache refresh — user-supplied URL, raw body stored as attestation record
router.post('/attestation/cache/refresh', requireSession, async (req, res) => {
  const { cacheRefreshUrl } = req.body;
  const refreshResp = await fetch(cacheRefreshUrl);
  const rawBody = await refreshResp.text();
  // stores etcd configuration data persistently as attestation record
  await AttestationRecord.create({ skillId: req.body.skillId, rawAttestation: rawBody });
  return res.json({ refreshed: true });
});
Fixed
// Attestation cache refresh — allowlist + return only boolean + never store raw body
const CACHE_REFRESH_ALLOWLIST = process.env.ATTESTATION_CACHE_URLS.split(',');

router.post('/attestation/cache/refresh', requireSession, async (req, res) => {
  const { cacheRefreshUrl, skillId } = req.body;
  if (!CACHE_REFRESH_ALLOWLIST.includes(cacheRefreshUrl))
    return res.status(400).json({ error: 'cacheRefreshUrl not in allowlist' });
  const refreshResp = await fetch(cacheRefreshUrl, { redirect: 'error' });
  if (!refreshResp.ok) return res.json({ refreshed: false });
  // never store raw response body — parse only a minimal structured signal
  const raw = await refreshResp.json();
  const RefreshResultSchema = z.object({ cacheVersion: z.string().max(64) });
  const parsed = RefreshResultSchema.safeParse(raw);
  if (!parsed.success) return res.json({ refreshed: false });
  await AttestationCache.updateOne({ skillId }, { cacheVersion: parsed.data.cacheVersion, refreshedAt: new Date() }, { upsert: true });
  return res.json({ refreshed: true });
});

Run SkillAudit to detect user-supplied URL parameters in package signing and attestation verification endpoints, missing allowlist validation, redirect:follow in certificate fetch paths, and raw response body storage in MCP skill registry source code. Join the waitlist for access.