← Blog

Claude MCP skill CORS misconfiguration — skill collaboration and co-author management endpoints (SA-SKL-CORS81)

SA-SKL-CORS81 identifies four CORS misconfiguration vulnerabilities in MCP skill registry skill collaboration and co-author management endpoints. Credential-bearing CORS on the collaborator list endpoint exposes the full collaborator document including pending invitations with their one-time invite tokens, the access level granted to each collaborator (owner, editor, viewer), and admin-only collaboration audit log entries that reveal when each collaborator last accessed the skill's private administrative views using the victim admin's session; wildcard ACAO on the collaborator invitation endpoint allows any page to send collaborator invitations under the victim admin's identity, and flooding these requests simultaneously spams every target user's inbox with redundant invitation notifications while exhausting the registry's per-skill invitation quota and causing the collaboration feature to reject legitimate invitations with a quota-exceeded error; a timing oracle on the pending invitations endpoint reveals which skills have active pending collaborator invitations by exploiting the cache latency differential between invitation-active warm entries (~4ms) and cold lookups (~170ms) without reading any response body; and credential-bearing CORS on the collaborator removal endpoint allows any page to permanently remove any collaborator from any skill using the admin's session, instantly revoking in-progress co-authors' write access and disrupting active collaborative editing workflows mid-session.

SA-SKL-CORS81 findings at a glance
CRITICALCORS81-001 — GET /api/skills/:id/collaborators has cors({origin:true,credentials:true}) — any origin reads full collaborator list including pending invitations with invite tokens, collaborator access levels (owner/editor/viewer), and admin-only collaboration audit log entries using victim admin session
HIGHCORS81-002 — POST /api/skills/:id/collaborators/invite has ACAO:* — any page sends collaborator invitations under victim admin identity; attacker floods invitation requests spamming users and exhausting invitation quota causing collaboration feature DoS
MEDIUMCORS81-003 — GET /api/skills/:id/collaborators/pending reflects Origin before auth check — timing oracle reveals skills with active pending collaborator invitations (invitation-active warm cache ~4ms vs cold ~170ms)
CRITICALCORS81-004 — DELETE /api/skills/:id/collaborators/:userId has cors({origin:true,credentials:true}) — any origin removes collaborators from skill permanently disrupting active co-author workflows

CORS81-001 — Credential-bearing CORS exposes invite tokens and admin collaboration audit log

The GET /api/skills/:id/collaborators endpoint returns a collaboration manifest that includes the current collaborator roster with per-user access levels, all pending invitation records with their one-time inviteToken values that grant immediate editor access when clicked, and admin-only collaboration audit log entries that expose when each collaborator last accessed the skill's private administrative views and what actions they performed. With cors({origin:true,credentials:true}) applied before authentication, any cross-origin page visited by an authenticated admin reads this document in full including the raw invite tokens — an attacker who intercepts these tokens can accept pending invitations on behalf of target users, granting themselves editor-level write access to any skill in the registry.

Vulnerable
// CORS81-001 — VULNERABLE
router.get('/skills/:id/collaborators',
  cors({ origin: true, credentials: true }),
  requireSession,
  async (req, res) => {
    const isAdmin = req.session.roles.includes('registry_admin');
    const collaborators = await db.getSkillCollaborators(req.params.id, {
      includeAuditLog: isAdmin,
      includePendingTokens: true
    });
    res.json(collaborators);
  }
);
Fixed
// CORS81-001 — FIXED: auth before CORS; strip invite tokens and admin audit log from response
router.get('/skills/:id/collaborators',
  requireSession,
  applyCorsAllowlist,
  async (req, res) => {
    const collaborators = await db.getSkillCollaborators(req.params.id, {
      includeAuditLog: false,
      includePendingTokens: false
    });
    res.json(collaborators);
  }
);

CORS81-002 — Wildcard ACAO on invitation endpoint exhausts quota and spams users

The POST /api/skills/:id/collaborators/invite endpoint sends a collaborator invitation email to the specified address and creates a pending invitation record consuming the skill's invitation quota. With ACAO:*, any page can trigger this endpoint without credentials. An attacker floods invitation requests targeting the same skill across hundreds of distinct email addresses, simultaneously exhausting the per-skill invitation quota — which prevents the legitimate skill owner from inviting any new collaborators until the quota resets — and spamming each target address with redundant invitation notifications, generating complaint signals that may cause the registry's sending domain to be blocklisted.

Vulnerable
// CORS81-002 — VULNERABLE: wildcard ACAO on collaborator invitation endpoint
router.post('/skills/:id/collaborators/invite',
  cors({ origin: '*' }),
  requireSession,
  async (req, res) => {
    const invite = await collaborationService.sendInvite({
      skillId: req.params.id,
      inviteeEmail: req.body.email,
      accessLevel: req.body.accessLevel,
      invitedBy: req.session.userId
    });
    res.json({ inviteId: invite.id, status: 'sent' });
  }
);
Fixed
// CORS81-002 — FIXED: allowlist CORS; CSRF; per-skill rate limit 10 invites/hour
router.post('/skills/:id/collaborators/invite',
  requireSession,
  applyCorsAllowlist,
  csrfProtection,
  requireSkillOwnerRole,
  rateLimit({ key: req => `collab-invite:${req.params.id}`, max: 10, window: '1h' }),
  async (req, res) => {
    const invite = await collaborationService.sendInvite({
      skillId: req.params.id,
      inviteeEmail: req.body.email,
      accessLevel: req.body.accessLevel,
      invitedBy: req.session.userId
    });
    res.json({ inviteId: invite.id, status: 'sent' });
  }
);

CORS81-003 — Timing oracle reveals skills with pending invitations via Origin reflection

The GET /api/skills/:id/collaborators/pending endpoint returns the list of pending collaborator invitations. Skills with at least one active pending invitation have a warm cache entry that resolves in approximately 4ms. Skills with no pending invitations hit a cold database query that takes approximately 170ms. Because the endpoint reflects the requesting Origin header before the authentication check, an unauthenticated cross-origin request can measure this latency differential to identify which skills are actively recruiting collaborators — useful targeting intelligence for phishing campaigns that impersonate the registry's invitation flow to steal collaborator credentials before legitimate invitees can accept.

Vulnerable
// CORS81-003 — VULNERABLE: Origin reflected before auth
router.get('/skills/:id/collaborators/pending',
  cors({ origin: true }),
  requireSession,
  async (req, res) => {
    const pending = await pendingInviteCache.get(`pending:${req.params.id}`)
      || await db.getPendingInvitations(req.params.id);
    res.json(pending);
  }
);
Fixed
// CORS81-003 — FIXED: auth before CORS; constant-time response floor 50ms
const PENDING_RESPONSE_FLOOR_MS = 50;
router.get('/skills/:id/collaborators/pending',
  requireSession,
  applyCorsAllowlist,
  async (req, res) => {
    const start = Date.now();
    const pending = await pendingInviteCache.get(`pending:${req.params.id}`)
      || await db.getPendingInvitations(req.params.id);
    const elapsed = Date.now() - start;
    if (elapsed < PENDING_RESPONSE_FLOOR_MS) await sleep(PENDING_RESPONSE_FLOOR_MS - elapsed);
    res.json(pending);
  }
);

CORS81-004 — Credential-bearing CORS removes collaborators disrupting active co-author sessions

The DELETE /api/skills/:id/collaborators/:userId endpoint removes a collaborator from the skill, immediately revoking their write access and invalidating any active editing sessions they have open. With cors({origin:true,credentials:true}), any cross-origin page visited by an authenticated admin can remove any collaborator from any skill. An attacker who can lure an admin to a malicious page can silently remove all collaborators from every skill in the registry simultaneously, disrupting in-progress co-authoring work without any warning and leaving skill owners unable to understand why their collaborators suddenly lost access.

Vulnerable
// CORS81-004 — VULNERABLE: credential-bearing CORS on collaborator removal endpoint
router.delete('/skills/:id/collaborators/:userId',
  cors({ origin: true, credentials: true }),
  requireSession,
  requireSkillOwnerRole,
  async (req, res) => {
    await db.removeCollaborator(req.params.id, req.params.userId);
    res.json({ removed: req.params.userId });
  }
);
Fixed
// CORS81-004 — FIXED: auth before CORS; re-auth; soft-remove with 48h grace period; audit log
router.delete('/skills/:id/collaborators/:userId',
  requireSession,
  applyCorsAllowlist,
  csrfProtection,
  requireSkillOwnerRole,
  reAuthRequired,
  async (req, res) => {
    const reinstateableUntil = new Date(Date.now() + 48 * 60 * 60 * 1000);
    await db.softRemoveCollaborator(req.params.id, req.params.userId, {
      removedBy: req.session.userId, reinstateableUntil
    });
    await auditLog.write({ action: 'collaboration.collaborator.remove', skillId: req.params.id,
      removedUserId: req.params.userId, actorId: req.session.userId, at: new Date() });
    res.json({ removed: req.params.userId, reinstateableUntil });
  }
);

SkillAudit scans for all SA-SKL-CORS81 patterns — credential-bearing CORS before auth on collaboration endpoints, wildcard ACAO on invitation endpoints, timing oracle misconfigurations on pending invitation checks, and collaborator removal endpoints without soft-remove grace periods. Get a free audit to see the full CORS analysis for your skill.