← Blog

CORS Misconfigurations in MCP Skill Registry Skill Notification and Alert Subscription Management Endpoints

SA-SKL-CORS88 documents four CORS misconfiguration vulnerabilities across the notification and alert subscription management surface of MCP skill registries. The findings span credential token exfiltration, notification channel flooding, active delivery timing oracle, and silent alert subscription deletion.

SA-SKL-CORS88 findings
CRITICALCORS88-001 — GET /api/skills/:id/notifications has cors({origin:true,credentials:true}); any origin reads full notification config including webhook URLs, email addresses, Slack workspace tokens, and admin-only PagerDuty service key using victim admin session
HIGHCORS88-002 — POST /api/skills/:id/notifications/subscribe has ACAO:*; any page creates notification subscriptions under victim admin identity flooding notification channels and exhausting notification quota; denial-of-service against alert delivery pipeline
MEDIUMCORS88-003 — GET /api/skills/:id/notifications/status reflects Origin before auth check; timing oracle reveals skills with active notification delivery (notification-active warm ~3 ms vs cold ~180 ms); enumerates which skills have live alert pipelines as targets for CORS88-001
CRITICALCORS88-004 — DELETE /api/skills/:id/notifications/:subscriptionId has cors({origin:true,credentials:true}); any origin permanently deletes notification subscriptions leaving publishers blind to critical security alerts, availability degradation events, and billing threshold warnings

CORS88-001 — Credential-bearing CORS on notification config endpoint

The GET /api/skills/:id/notifications endpoint returns the complete notification configuration for a skill, including webhook destination URLs, email addresses, Slack workspace tokens, and an admin-only pagerdutyServiceKey field intended for SRE on-call routing. The endpoint uses cors({origin:true,credentials:true}), allowing any browser origin to read this configuration using the victim admin's session. The Slack workspace token is a persistent bot token that grants the attacker ongoing access to the publisher's Slack workspace, write access to channels, and the ability to impersonate the notification bot. The PagerDuty service key enables the attacker to create, resolve, and silence incidents in the publisher's on-call system.

Vulnerable
// CORS88-001 — VULNERABLE
router.get(
  '/:skillId/notifications',
  cors({ origin: true, credentials: true }),  // any origin reads tokens
  requireSession,
  requireOwnership('skillId'),
  async (req, res) => {
    const config = await db.notificationConfigs.findOne({
      where: { skillId: req.params.skillId },
      include: [{ model: db.notificationSecrets, as: 'secrets' }],
      // VULNERABLE: includes slackBotToken, pagerdutyServiceKey, webhookSecrets
    });
    res.json(config);
  }
);

Persistent Slack workspace access via single CORS fetch: Exfiltrated slackBotToken: "xoxb-..." grants attacker ongoing bot-level access to the publisher's Slack workspace. Attacker can enumerate channels, read messages, post as the notification bot, and silently forward all future notification events to an attacker-controlled channel.

Fixed
// CORS88-001 — FIXED
// Allowlist CORS; mask tokens to prefix only; PagerDuty key on separate admin endpoint.
const { corsOptions } = require('../../config/cors');

router.get(
  '/:skillId/notifications',
  cors(corsOptions),           // allowlist — no origin reflection
  requireSession,
  requireOwnership('skillId'),
  async (req, res) => {
    const config = await db.notificationConfigs.findOne({
      where: { skillId: req.params.skillId },
      attributes: [
        'webhookUrl',          // non-secret: OK to return
        'emailAddresses',
        'slackTokenPrefix',    // masked: "xoxb-abc***" — not full token
        // FIXED: pagerdutyServiceKey excluded — separate admin-only endpoint
      ],
    });
    res.json(config);
  }
);

CORS88-002 — Wildcard ACAO on notification subscription endpoint

The POST /api/skills/:id/notifications/subscribe endpoint registers a new alert subscription channel for a skill. With ACAO:*, any page can flood this endpoint using the victim admin's bearer token. Each subscription creation consumes notification quota: registries typically enforce a maximum of 10–50 active subscriptions per skill. An attacker who creates 50 subscriptions pointing to attacker-controlled endpoints exhausts the quota, preventing the publisher from adding legitimate alert channels, and also floods those endpoints with every notification event the skill generates.

Vulnerable
// CORS88-002 — VULNERABLE
router.post(
  '/:skillId/notifications/subscribe',
  (req, res, next) => {
    res.setHeader('Access-Control-Allow-Origin', '*');
    res.setHeader('Access-Control-Allow-Headers', 'Content-Type, Authorization');
    if (req.method === 'OPTIONS') return res.sendStatus(204);
    next();
  },
  requireSessionOrBearer,
  requireOwnership('skillId'),
  async (req, res) => {
    // VULNERABLE: attacker creates subscriptions pointing to attacker endpoints
    const sub = await db.notificationSubscriptions.create({
      skillId: req.params.skillId,
      endpoint: req.body.endpoint,  // attacker-controlled URL
      events: req.body.events ?? ['all'],
    });
    res.status(201).json(sub);
  }
);
Fixed
// CORS88-002 — FIXED
router.post(
  '/:skillId/notifications/subscribe',
  cors(corsOptions),
  requireSession,              // session-only — bearer not accepted for subscription mutations
  requireOwnership('skillId'),
  async (req, res) => {
    const existing = await db.notificationSubscriptions.count({
      where: { skillId: req.params.skillId },
    });
    if (existing >= 10) {
      return res.status(429).json({ error: 'Subscription quota reached (max 10)' });
    }
    const sub = await db.notificationSubscriptions.create({
      skillId: req.params.skillId,
      endpoint: req.body.endpoint,
      events: req.body.events ?? ['all'],
    });
    res.status(201).json(sub);
  }
);

CORS88-003 — Notification delivery timing oracle

The notification status endpoint reflects Origin before the authentication middleware executes. Skills with active notification delivery warm a Redis cache entry for the current delivery batch; the timing differential between warm (~3ms) and cold (~180ms) is measurable from JavaScript without authentication. An attacker can enumerate all skill IDs and identify those with active alert pipelines, using the oracle output as a targeting list for CORS88-001 (token exfiltration) and CORS88-004 (subscription deletion). Skills with active alerts are more likely to have configured PagerDuty and Slack integrations — the highest-value credential targets in CORS88-001.

Vulnerable
// CORS88-003 — VULNERABLE
router.get(
  '/:skillId/notifications/status',
  cors({ origin: true, credentials: true }),  // Origin reflected before auth
  requireSession,
  async (req, res) => {
    // Cache-warmed for active skills (~3ms) vs cold path for inactive (~180ms)
    const status = await notifCache.getDeliveryStatus(req.params.skillId);
    if (!status) return res.status(404).json({ error: 'No active delivery' });
    res.json(status);
  }
);
Fixed
// CORS88-003 — FIXED
router.get(
  '/:skillId/notifications/status',
  cors(corsOptions),           // reject non-allowlisted origins before any processing
  requireSession,              // auth runs before cache lookup — no timing differential
  requireOwnership('skillId'),
  async (req, res) => {
    const status = await notifCache.getDeliveryStatus(req.params.skillId);
    if (!status) return res.status(404).json({ error: 'No active delivery' });
    res.json(status);
  }
);

CORS88-004 — Credential-bearing CORS on notification subscription deletion

The DELETE /api/skills/:id/notifications/:subscriptionId endpoint permanently removes a notification subscription. With cors({origin:true,credentials:true}), any origin can delete all notification subscriptions using the victim admin session. The impact is complete alerting blindness: the publisher receives no notifications for security events, availability degradation, usage threshold warnings, or billing alerts. An attacker planning a prolonged campaign against a skill registry may delete notifications as a preparatory step, ensuring the publisher does not receive alerts during the attack window.

Vulnerable
// CORS88-004 — VULNERABLE
router.delete(
  '/:skillId/notifications/:subscriptionId',
  cors({ origin: true, credentials: true }),  // any origin silences alerts
  requireSession,
  requireOwnership('skillId'),
  async (req, res) => {
    await db.notificationSubscriptions.destroy({
      where: { id: req.params.subscriptionId, skillId: req.params.skillId },
    });
    res.status(204).send();
  }
);
Fixed
// CORS88-004 — FIXED
router.delete(
  '/:skillId/notifications/:subscriptionId',
  cors(corsOptions),           // allowlist — cross-origin deletion blocked
  requireSession,
  requireMFAReauth,            // re-authentication required to delete critical alert channels
  requireOwnership('skillId'),
  async (req, res) => {
    await db.notificationSubscriptions.destroy({
      where: { id: req.params.subscriptionId, skillId: req.params.skillId },
    });
    res.status(204).send();
  }
);

Scan your MCP skill registry for SA-SKL-CORS88

SkillAudit detects credential-bearing CORS on notification endpoints, timing oracle patterns, and hard-delete vulnerabilities on alert subscriptions in under 60 seconds.

Run a free audit