← Blog

Claude MCP skill SSRF via async webhook delivery and HTTP callback URL abuse — SA-SKL-SSRF13

Webhook and callback URL features in MCP skills are prime SSRF targets because they decouple URL registration from URL use: an attacker registers a URL that appears legitimate, then manipulates the network path so that the asynchronous delivery call reaches an internal resource. The four SA-SKL-SSRF13 patterns cover redirect-chain bypass at delivery time, scheduled health-check polling of attacker-registered IMDS URLs, URL parser inconsistencies between localhost and 127.0.0.1, and slow-loris thread-pool exhaustion via un-timed callback fetches — each exploiting the temporal gap between registration-time validation and delivery-time execution.

By SkillAudit  |  9 Nov 2026

Why async delivery creates a wider SSRF attack surface

Synchronous SSRF is well-understood: the attacker submits a URL and the response arrives in the same HTTP response. Async SSRF in webhook systems is subtler. The registration endpoint validates the URL at registration time and stores it in a database. Hours or days later, an internal job worker retrieves the stored URL and fires an HTTP POST to it. The validation code that ran at registration time may not run again at delivery time — and even when it does run again, it may be susceptible to redirect-chain bypasses that were not present when the URL was first registered.

MCP skills are particularly prone to this pattern because they frequently provide webhook delivery as a core feature: "run this audit and POST the results to your CI pipeline." The delivery worker is a trusted background process with network access to internal VPC resources, cloud metadata endpoints, and other services that the public internet cannot reach. SkillAudit's SA-SKL-SSRF13 rule set traces user-supplied callback URLs through the full registration-to-delivery lifecycle, flagging cases where the delivery-time fetch bypasses or omits the registration-time IP validation.

SA-SKL-SSRF13 findings at a glance
CRITICALSSRF13-001 — Webhook URL passes IP check at registration; delivery-time HTTP POST follows 301 redirect from public host to RFC1918 address; second DNS resolution never checked
CRITICALSSRF13-002 — Health-check scheduler calls user-registered health_url on every tick; attacker registers http://169.254.169.254/latest/meta-data/; IMDS credentials exfiltrated on schedule indefinitely
HIGHSSRF13-003 — Blocklist checks URL(webhookUrl).hostname === 'localhost'; passes for http://127.0.0.1/ and http://[::1]/; attacker reaches loopback services via numeric IP forms
HIGHSSRF13-004 — Async job worker fetches webhook URL with no AbortSignal timeout; attacker registers internal slow-loris endpoint; job thread held open indefinitely, exhausting worker pool

SSRF13-001 — Redirect-chain bypass at webhook delivery time

Many webhook systems validate the callback URL at registration time: they parse the hostname, resolve it to an IP address via DNS, and check that the IP is not in an RFC1918 or loopback range. The URL passes. It is stored. When the delivery worker runs hours later, it makes an HTTP POST to the stored URL. The URL's DNS resolves to the same public IP — but the server at that public IP has been configured by the attacker to return a 301 Moved Permanently redirect to http://10.0.1.5:9200/_cat/indices. The delivery worker's HTTP client follows the redirect by default. The redirect destination is an internal Elasticsearch node that was never checked by the registration-time validator.

The fix requires two changes: (1) validate the URL again at delivery time, not just at registration time; (2) configure the HTTP client to never follow redirects when making webhook delivery calls. Any redirect during delivery should cause the delivery to fail and the URL to be flagged for re-registration.

// VULNERABLE — delivery worker follows redirects without re-validating destination
import { fetch } from 'undici';
import { db } from './db.js';

async function deliverWebhook(webhookId: string, payload: object) {
  const { url } = await db.query('SELECT url FROM webhooks WHERE id = ?', [webhookId]);

  // VULNERABLE: url was validated at registration time (IP check passed)
  // attacker's server at url now returns 301 → http://10.0.1.5:9200/_cat/indices
  // fetch follows the redirect to the internal Elasticsearch node
  const res = await fetch(url, {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify(payload),
  });
  return res.status;
}
// FIXED — block redirects; re-validate URL at delivery time
import { fetch } from 'undici';
import { db } from './db.js';
import dns from 'dns/promises';

const RFC1918 = [
  /^10\./, /^172\.(1[6-9]|2\d|3[01])\./, /^192\.168\./,
  /^127\./, /^169\.254\./, /^0\./, /^::1$/, /^fc00:/,
];

async function isSafeWebhookUrl(urlStr: string): Promise {
  let parsed: URL;
  try { parsed = new URL(urlStr); } catch { return false; }
  if (parsed.protocol !== 'https:') return false;
  const { address } = await dns.lookup(parsed.hostname);
  return !RFC1918.some(re => re.test(address));
}

async function deliverWebhook(webhookId: string, payload: object) {
  const { url } = await db.query('SELECT url FROM webhooks WHERE id = ?', [webhookId]);

  // Re-validate at delivery time — catches DNS rebinding and redirect-chain attacks
  if (!await isSafeWebhookUrl(url)) {
    await db.query('UPDATE webhooks SET status=? WHERE id=?', ['blocked', webhookId]);
    throw Object.assign(new Error('Webhook URL blocked at delivery'), { code: 'SSRF_BLOCKED' });
  }

  const res = await fetch(url, {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify(payload),
    // redirect: 'error' — any redirect causes the fetch to throw
    // attacker cannot redirect from a valid public host to a private destination
    redirect: 'error',
    signal: AbortSignal.timeout(10_000),
  });
  return res.status;
}

SSRF13-002 — Health-check scheduler polls attacker-registered IMDS URL

MCP skills that offer uptime monitoring allow users to register a health_url: a URL the platform pings on a regular schedule to verify the user's service is running. The scheduler retrieves stored health_url values from the database and fires HTTP GETs on a cron tick. If validation is applied only at registration time and not at ping time, an attacker who registers http://169.254.169.254/latest/meta-data/iam/security-credentials/role-name as their health URL will have the platform's scheduler exfiltrate fresh IMDS IAM credentials on every tick — typically once per minute. The attacker does not need to interact with the platform again after registration; the scheduler delivers credentials automatically.

The severity is CRITICAL because the exfiltration is persistent, automatic, and continues until the health check entry is deleted. The fix requires validating health_url at both registration time and ping time, using redirect: 'error' to block redirect chains, and restricting accepted schemes to https:// only.

// VULNERABLE — scheduler pings health URLs without delivery-time IP check
import cron from 'node-cron';
import { fetch } from 'undici';
import { db } from './db.js';

cron.schedule('* * * * *', async () => {
  const checks = await db.query('SELECT id, health_url FROM health_checks WHERE active = 1');

  for (const check of checks) {
    try {
      // VULNERABLE: health_url was validated at registration (IP check passed then)
      // attacker registered http://169.254.169.254/latest/meta-data/iam/security-credentials/role
      // scheduler exfiltrates fresh IMDS credentials every minute — indefinitely
      const res = await fetch(check.health_url);
      const status = res.ok ? 'up' : 'down';
      await db.query('UPDATE health_checks SET last_status=? WHERE id=?', [status, check.id]);
    } catch {
      await db.query('UPDATE health_checks SET last_status=? WHERE id=?', ['error', check.id]);
    }
  }
});
// FIXED — re-validate at ping time; block redirects; https:// only
import cron from 'node-cron';
import { fetch } from 'undici';
import { db } from './db.js';

cron.schedule('* * * * *', async () => {
  const checks = await db.query('SELECT id, health_url FROM health_checks WHERE active = 1');

  for (const check of checks) {
    try {
      // Re-validate every ping — catches URLs registered before stricter validation
      if (!await isSafeWebhookUrl(check.health_url)) {  // from SSRF13-001 fix
        await db.query(
          'UPDATE health_checks SET active=0, last_status=? WHERE id=?',
          ['blocked_ssrf', check.id]
        );
        continue;
      }

      const res = await fetch(check.health_url, {
        method: 'GET',
        redirect: 'error',           // no redirect chains
        signal: AbortSignal.timeout(5_000),
      });

      const status = res.ok ? 'up' : 'down';
      await db.query('UPDATE health_checks SET last_status=? WHERE id=?', [status, check.id]);
    } catch {
      await db.query('UPDATE health_checks SET last_status=? WHERE id=?', ['error', check.id]);
    }
  }
});

SSRF13-003 — URL parser inconsistency between localhost and 127.0.0.1

Many webhook URL validators check the parsed hostname against a string blocklist: if (hostname === 'localhost') throw new Error('blocked'). This check passes for http://127.0.0.1/admin (hostname is 127.0.0.1, not localhost), http://[::1]/admin (hostname is [::1]), and http://0.0.0.0/admin. All three are loopback addresses that reach the same local services as localhost on most operating systems, but none match the string localhost. Additional bypasses include decimal-encoded IPs (http://2130706433/ = 127.0.0.1) and mixed-notation IPv6 loopback addresses.

The fix is to never use a string blocklist for hostname validation. Instead, resolve the hostname to an IP address using dns.lookup() and test the resolved IP against RFC1918 and loopback CIDR ranges using numeric comparison. This approach is immune to string bypass variants because it operates on the actual network address the connection will reach.

// VULNERABLE — hostname string blocklist allows numeric loopback bypasses
function validateWebhookUrl(webhookUrl: string): boolean {
  const { hostname } = new URL(webhookUrl);

  // VULNERABLE: only catches the string 'localhost'
  // bypasses: http://127.0.0.1/, http://[::1]/, http://0.0.0.0/,
  //           http://2130706433/ (decimal IPv4), http://localhost:0/ port variation
  const blocked = ['localhost', 'metadata.google.internal'];
  if (blocked.includes(hostname.toLowerCase())) {
    throw new Error('Blocked hostname');
  }

  return true;
}
// FIXED — resolve hostname to IP; test against CIDR ranges numerically
import dns from 'dns/promises';

async function validateWebhookUrl(webhookUrl: string): Promise {
  let parsed: URL;
  try { parsed = new URL(webhookUrl); } catch {
    throw Object.assign(new Error('Invalid URL'), { code: 'INVALID_URL' });
  }

  if (parsed.protocol !== 'https:') {
    throw Object.assign(new Error('https:// required'), { code: 'SCHEME_BLOCKED' });
  }

  // Resolve all variation of hostname — catches decimal IPv4, IPv6 loopback,
  // 0.0.0.0, and any numeric encoding — to the canonical address the kernel
  // will actually use for the connection
  let address: string;
  try {
    const result = await dns.lookup(parsed.hostname, { all: false });
    address = result.address;
  } catch {
    throw Object.assign(new Error('DNS resolution failed'), { code: 'DNS_FAILED' });
  }

  const RFC1918_PATTERNS = [
    /^10\./,
    /^172\.(1[6-9]|2\d|3[01])\./,
    /^192\.168\./,
    /^127\./,         // entire 127.0.0.0/8 loopback range
    /^169\.254\./,    // link-local / IMDS
    /^0\./,           // 0.0.0.0/8
    /^::1$/,          // IPv6 loopback
    /^fc00:/,         // IPv6 ULA
    /^fe80:/,         // IPv6 link-local
  ];

  if (RFC1918_PATTERNS.some(re => re.test(address))) {
    throw Object.assign(
      new Error(`Blocked internal address: ${address}`),
      { code: 'SSRF_BLOCKED' }
    );
  }
}

SSRF13-004 — Slow-loris thread-pool exhaustion via un-timed webhook fetch

When an async job worker delivers webhook POST requests without a timeout, an attacker can register an internal endpoint that opens a TCP connection and trickles data at 1 byte per 10 seconds — a classic slow-loris pattern. Each webhook delivery job holds a worker thread open for the duration of the connection. If the attacker has registered enough webhook URLs pointing at different ports on internal services, they can exhaust the job worker's thread pool: no other jobs run while threads are blocked waiting for data. This is a denial-of-service attack that also leaks information about which ports are open on internal hosts (open ports trickle data; closed ports reject immediately).

The fix is an AbortSignal.timeout() on every outbound webhook fetch, with a generous but bounded timeout (10 seconds is typical for external webhooks; 5 seconds for health checks). Additionally, limit the number of concurrent in-flight webhook delivery jobs so a single tenant cannot monopolise the worker pool even within the timeout window.

// VULNERABLE — webhook delivery has no timeout; slow-loris holds threads open
import { fetch } from 'undici';
import Queue from 'bull';

const webhookQueue = new Queue('webhook-delivery');

webhookQueue.process(async (job) => {
  const { url, payload } = job.data;

  // VULNERABLE: no AbortSignal timeout
  // attacker registers http://10.0.1.5:9200/ (internal Elasticsearch)
  // port 9200 is open — Elasticsearch trickles response bytes slowly
  // this fetch call never resolves until the connection times out at the OS level
  // (typically 75s TCP keepalive) — holding the Bull worker indefinitely
  const res = await fetch(url, {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify(payload),
  });
  return { status: res.status };
});
// FIXED — AbortSignal timeout on every delivery; concurrency cap per tenant
import { fetch } from 'undici';
import Queue from 'bull';

const webhookQueue = new Queue('webhook-delivery', {
  defaultJobOptions: {
    attempts: 3,
    backoff: { type: 'exponential', delay: 1000 },
    timeout: 15_000,  // Bull-level job timeout — safety net
  },
});

// Cap concurrent jobs per tenant to limit blast radius of slow-loris attack
webhookQueue.process(10, async (job) => {
  const { url, payload } = job.data;

  // Re-validate at delivery time (from SSRF13-001)
  if (!await isSafeWebhookUrl(url)) {
    throw Object.assign(new Error('Webhook URL blocked at delivery'), { code: 'SSRF_BLOCKED' });
  }

  // AbortSignal.timeout(10_000) — connection hangs for >10s = abort + retry
  const res = await fetch(url, {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify(payload),
    redirect: 'error',
    signal: AbortSignal.timeout(10_000),  // 10 second hard cap
  });

  if (!res.ok) {
    throw new Error(`Delivery failed: HTTP ${res.status}`);
  }
  return { status: res.status };
});

Detection with SkillAudit

SkillAudit's SA-SKL-SSRF13 rule set analyses MCP skill codebases for the async SSRF patterns above. The static pass traces user-supplied URL fields stored in database tables through job queues to fetch call sites, checking whether IP-range validation is applied at the fetch site (not just at the write site) and whether redirect: 'error' is set. The active probe registers a webhook URL pointing to an internal IP in the scan sandbox and triggers a delivery event, then measures whether the sandbox's internal endpoint receives a POST — confirming delivery-time SSRF exploitability beyond static inference. See also SA-SKL-SSRF12 for image-library SSRF and SA-SKL-SSRF11 for DNS rebinding bypass patterns.

Run SA-SKL-SSRF13 on your skill: Paste your MCP skill's GitHub URL at skillaudit.dev to get a full scan. The free tier covers public repositories and returns a shareable security badge.

FindingSeverityVulnerable patternFix
SSRF13-001CriticalWebhook URL IP check at registration only; delivery worker follows 301 redirect to RFC1918 host at fetch timeRe-validate URL at delivery time; set redirect: 'error' — any redirect during delivery fails the job
SSRF13-002CriticalHealth-check scheduler pings stored health_url without delivery-time IP check; IMDS URL polled every cron tickRe-validate on every scheduler tick; set active=0 and redirect: 'error' on blocked URLs
SSRF13-003HighHostname blocklist checks string 'localhost'; bypassed by 127.0.0.1, [::1], 0.0.0.0, decimal IPv4Resolve hostname to IP via dns.lookup(); test resolved address against RFC1918 CIDR patterns numerically
SSRF13-004HighJob worker fetches webhook URL with no AbortSignal; slow-loris internal endpoint holds threads open indefinitelyAbortSignal.timeout(10_000) on every delivery fetch; Bull-level job timeout as safety net