Claude MCP skill SSRF — payment and billing webhook endpoints (SA-SKL-SSRF82)
SA-SKL-SSRF82 identifies four server-side request forgery vulnerabilities in MCP skill registry skill payment and billing webhook endpoints. The payment confirmation webhook endpoint fetches a user-supplied paymentWebhookUrl from the request body and returns the full response including the response body in the payment confirmation acknowledgment, allowing an attacker to point this URL to the cloud instance metadata service at 169.254.169.254 and retrieve the full IAM credential set including AccessKeyId, SecretAccessKey, and Token in the payment confirmation response; the subscription update callback endpoint fetches a user-supplied subscriptionCallbackUrl and returns the full response body as the subscription acknowledgment, allowing an attacker to point this to Consul:8500/v1/catalog/services and retrieve the full internal service catalog; the invoice delivery endpoint fetches a user-supplied invoiceDeliveryUrl with redirect:follow, making it vulnerable to CNAME-chain redirects from an attacker-controlled domain to Vault:8200/v1/kv/data/secrets that return internal KV secrets in the invoice delivery confirmation response; and the revenue export endpoint fetches a user-supplied revenueExportUrl and stores the raw response body as a revenue record in the database, allowing an attacker to point this to etcd:2379 and persistently store the etcd cluster configuration in the revenue history API.
paymentWebhookUrl — attacker sets to 169.254.169.254; IAM credentials in payment confirmation response bodysubscriptionCallbackUrl — attacker points to Consul:8500; full service catalog as subscription acknowledgment bodyinvoiceDeliveryUrl with redirect:follow — CNAME chain to Vault:8200 returns KV secretsrevenueExportUrl and stores raw response as revenue record — attacker points to etcd:2379; etcd config stored persistently via revenue history APISSRF82-001 — Payment webhook SSRF exfiltrates IMDS IAM credentials
The payment confirmation webhook endpoint accepts a paymentWebhookUrl parameter in the POST request body, fetches that URL using node-fetch, and includes the full response body in the acknowledgment returned to the caller. When an attacker sets paymentWebhookUrl to http://169.254.169.254/latest/meta-data/iam/security-credentials/, the first request returns the IAM role name. A second request to the role-specific URL returns the full credential set. Both responses appear verbatim in the payment confirmation acknowledgment bodies.
// SSRF82-001 — VULNERABLE: fetches user-supplied URL and returns full response body
router.post('/payments/confirm', requireSession, async (req, res) => {
const { paymentId, paymentWebhookUrl } = req.body;
const webhookResp = await fetch(paymentWebhookUrl); // SSRF here
const webhookBody = await webhookResp.text();
await db.recordPaymentConfirmation(paymentId, webhookBody);
res.json({ confirmed: true, webhookResponse: webhookBody }); // response body returned
});
// SSRF82-001 — FIXED: assertSafeExternalUrl; redirect:error; return only statusCode
async function assertSafeExternalUrl(url) {
const parsed = new URL(url);
if (!['http:', 'https:'].includes(parsed.protocol)) throw new Error('Disallowed protocol');
const { address } = await dns.promises.lookup(parsed.hostname);
if (isPrivateIp(address)) throw new Error('Private IP range disallowed');
}
router.post('/payments/confirm', requireSession, async (req, res) => {
const { paymentId, paymentWebhookUrl } = req.body;
await assertSafeExternalUrl(paymentWebhookUrl);
const webhookResp = await fetch(paymentWebhookUrl, { redirect: 'error' });
await db.recordPaymentConfirmation(paymentId, webhookResp.status);
res.json({ confirmed: true, webhookStatus: webhookResp.status }); // body never returned
});
SSRF82-002 — Subscription callback SSRF returns Consul service catalog
The subscription update callback endpoint fetches subscriptionCallbackUrl and returns the full response body in the subscription acknowledgment. Pointing this to http://consul:8500/v1/catalog/services (or the equivalent cloud-internal Consul address) returns the complete internal service registry as a JSON map of service names to tag arrays. This reveals the full internal service topology including service names, health check endpoints, and cluster membership information.
// SSRF82-002 — VULNERABLE: subscription callback returns full response body
router.post('/subscriptions/update', requireSession, async (req, res) => {
const { subscriptionId, subscriptionCallbackUrl } = req.body;
const callbackResp = await fetch(subscriptionCallbackUrl); // SSRF here
res.json({ updated: true, callbackBody: await callbackResp.json() }); // catalog leaked
});
// SSRF82-002 — FIXED: assertSafeExternalUrl; HEAD-only; return only statusCode
router.post('/subscriptions/update', requireSession, async (req, res) => {
const { subscriptionId, subscriptionCallbackUrl } = req.body;
await assertSafeExternalUrl(subscriptionCallbackUrl);
const callbackResp = await fetch(subscriptionCallbackUrl, { method: 'HEAD', redirect: 'error' });
res.json({ updated: true, callbackStatus: callbackResp.status });
});
SSRF82-003 — Invoice delivery redirect:follow CNAME chain to Vault secrets
The invoice delivery endpoint fetches invoiceDeliveryUrl with redirect:'follow'. An attacker registers a domain under their control, configures it with a CNAME record pointing to vault.internal:8200, and sets invoiceDeliveryUrl to their domain. The redirect:'follow' setting causes node-fetch to follow the CNAME chain, ultimately making a request to the internal Vault server and returning the KV secrets stored there in the invoice delivery confirmation response.
// SSRF82-003 — VULNERABLE: redirect:follow enables CNAME chain SSRF to Vault
router.post('/invoices/deliver', requireSession, async (req, res) => {
const { invoiceId, invoiceDeliveryUrl } = req.body;
const resp = await fetch(invoiceDeliveryUrl, { redirect: 'follow' }); // SSRF via CNAME
res.json({ delivered: true, deliveryResponse: await resp.text() }); // Vault secrets leaked
});
// SSRF82-003 — FIXED: assertSafeExternalUrl; redirect:error; return only statusCode
router.post('/invoices/deliver', requireSession, async (req, res) => {
const { invoiceId, invoiceDeliveryUrl } = req.body;
await assertSafeExternalUrl(invoiceDeliveryUrl);
const resp = await fetch(invoiceDeliveryUrl, { redirect: 'error' }); // CNAME chains blocked
res.json({ delivered: true, deliveryStatus: resp.status });
});
SSRF82-004 — Revenue export SSRF stores etcd config in revenue history
The revenue export endpoint fetches revenueExportUrl and stores the raw response body as a revenue export record in the database. Pointing this to http://etcd:2379/v3/kv/range causes the full etcd cluster configuration to be stored as a revenue record. The etcd configuration is then permanently accessible via the revenue history API, persisting beyond the initial request and available to any user with read access to the revenue history endpoint.
// SSRF82-004 — VULNERABLE: stores raw response body as revenue record
router.post('/revenue/export', requireSession, async (req, res) => {
const { exportPeriod, revenueExportUrl } = req.body;
const resp = await fetch(revenueExportUrl); // SSRF here
const rawBody = await resp.text();
await db.storeRevenueExport(exportPeriod, rawBody); // etcd config stored permanently
res.json({ exported: true });
});
// SSRF82-004 — FIXED: assertSafeExternalUrl; HEAD-only; store only URL and statusCode — never body
router.post('/revenue/export', requireSession, async (req, res) => {
const { exportPeriod, revenueExportUrl } = req.body;
await assertSafeExternalUrl(revenueExportUrl);
const resp = await fetch(revenueExportUrl, { method: 'HEAD', redirect: 'error' });
await db.storeRevenueExport(exportPeriod, { url: revenueExportUrl, status: resp.status });
res.json({ exported: true, exportStatus: resp.status });
});
SkillAudit scans for all SA-SKL-SSRF82 patterns — user-supplied URL fetch with response body return, redirect:follow enabling CNAME chain SSRF, and persistent storage of fetched response bodies. Get a free audit to detect SSRF vulnerabilities in your MCP skill or server.