← Security advisories

Claude MCP skill CORS misconfiguration — skill changelog and release notes management endpoints — SA-SKL-CORS61

SA-SKL-CORS61 documents four CORS misconfiguration vulnerabilities in MCP skill registry changelog and release notes management endpoints. Changelog endpoints govern the public and private release history of skills, including draft release notes that may reference unreported CVEs, scheduled disclosure timelines, and internal fix descriptions. CORS61 identifies four distinct cross-origin attack paths: credential-bearing CORS on the changelog read endpoint exposes unpublished CVE fix timelines and draft release notes before public disclosure; wildcard ACAO on the changelog creation endpoint allows any page to inject false security release notes under victim admin identity, misleading users into trusting a vulnerable skill version; a timing oracle via Origin reflection before ownership check identifies skills with active release preparation as high-value exfiltration targets; and credential-bearing CORS on the changelog deletion endpoint allows any cross-origin page to silently erase security advisory records, removing evidence of vulnerability disclosures from the public registry.

SA-SKL-CORS61 findings at a glance
CRITICALCORS61-001 — GET /api/skills/:id/changelog has cors({origin:true,credentials:true}) — any origin reads full changelog including unpublished draft release notes, internal CVE fix descriptions, and scheduled release metadata using victim admin session; reveals vulnerability disclosure timeline and upcoming security patches to competitors and attackers before public announcement
CRITICALCORS61-002 — POST /api/skills/:id/changelog has ACAO:* — any page creates attacker-controlled changelog entries under victim admin identity; attacker injects false release notes claiming security fixes that don't exist, misleading users into trusting a vulnerable skill version; fix: remove wildcard; require session; requireRole('admin'); CSRF token; Zod ChangelogEntrySchema; audit log
MEDIUMCORS61-003 — GET /api/skills/:id/changelog/draft reflects Origin before ownership check — timing oracle reveals draft creation velocity identifying skills with active release preparation as CORS61-001 targets; fix: auth before CORS; unified WHERE; 60ms constant-time floor
CRITICALCORS61-004 — DELETE /api/skills/:id/changelog/:entryId has cors({origin:true,credentials:true}) — any origin removes any changelog entry using victim admin session, erasing security advisory records and removing evidence of vulnerability disclosures; fix: allowlist + requireSession + ownership check + notify skill owner + audit log

CORS61-001 — Credential-bearing CORS on changelog exposes unpublished CVE fix timelines

Severity: CRITICAL

The changelog endpoint uses cors({origin: true, credentials: true}), which mirrors any Origin header back as Access-Control-Allow-Origin and also sets Access-Control-Allow-Credentials: true. This combination allows any website to make a cross-origin fetch that includes the victim's session cookie. When an admin visits an attacker-controlled page, that page silently reads the full changelog — including unpublished draft release notes that describe CVEs not yet publicly disclosed, internal fix descriptions referencing ticket numbers and affected component versions, and scheduled release dates that reveal exactly when security-patched versions will be published.

The vulnerability disclosure timeline is especially sensitive: it allows an attacker to identify which skills have known-but-unpatched vulnerabilities, the exact date when a patch will be released, and the nature of the vulnerability from the internal fix description. This window of advance knowledge enables targeted exploitation of the vulnerable skill before the patch is released, and allows competitors to prepare countermeasures or marketing materials in advance of a public security disclosure. Draft release notes may also reference internal CVE identifiers, bug tracker links, and responsible disclosure contact information that exposes the registry's security team structure.

An attacker who exfiltrates this data via CORS61-001 can use the scheduled disclosure dates as timing signals for CORS61-004, deleting the changelog entries just before publication to prevent the security community from learning about the patch and attributing remediation to the skill author.

Mirroring the Origin header is equivalent to a wildcard with credentials. cors({origin: true}) does not restrict cross-origin access — it reflects every caller's origin back, granting unrestricted cross-origin read access to any authenticated session. Changelog endpoints must be protected by an explicit allowlist of trusted domains, never a reflection of the caller-supplied origin value.

Vulnerable
// GET /api/skills/:id/changelog — mirrors origin, allows credentials
router.get('/skills/:id/changelog', cors({ origin: true, credentials: true }), requireSession, async (req, res) => {
  const entries = await Changelog.find({ skillId: req.params.id });
  // returns all entries including status:'draft', cveRefs, internalTickets, scheduledPublishAt
  return res.json({ entries });
});
Fixed
// GET /api/skills/:id/changelog — explicit allowlist, session + role required, drafts excluded for non-owners
const CORS_ALLOWLIST = (process.env.CORS_ORIGINS || '').split(',').map(s => s.trim());

router.get(
  '/skills/:id/changelog',
  cors({ origin: (o, cb) => cb(null, CORS_ALLOWLIST.includes(o)), credentials: true }),
  requireSession,
  async (req, res) => {
    const skill = await Skill.findById(req.params.id).select('ownerId');
    if (!skill) return res.status(404).json({ error: 'Not found' });

    const isOwnerOrAdmin = skill.ownerId.toString() === req.session.userId
      || req.session.roles.includes('admin');

    const filter = isOwnerOrAdmin
      ? { skillId: req.params.id }
      : { skillId: req.params.id, status: 'published' };

    const entries = await Changelog.find(filter)
      .select('version releaseDate summary status -cveRefs -internalTickets -scheduledPublishAt');
    return res.json({ entries });
  }
);

CORS61-002 — Wildcard ACAO on changelog creation enables injection of false security release notes

Severity: CRITICAL

The changelog creation endpoint sets Access-Control-Allow-Origin: *. Even though the wildcard prevents standard session cookie forwarding, the endpoint processes session tokens supplied via a custom header or URL parameter. An attacker page lures an admin and uses JavaScript's fetch() to POST a crafted changelog entry that describes fabricated security fixes — for example, claiming that a known-vulnerable skill version has patched a critical RCE, when no such patch exists. The false changelog entry is published under the victim admin's identity, with no attribution to the attacker's origin.

Users who rely on the changelog to assess whether a skill is safe to install will see the false security release note and conclude that the vulnerability has been addressed. This social engineering attack is particularly effective because it exploits the trust relationship between skill publishers and their users — the changelog appears to be an official communication from the skill's maintainer. Security-conscious teams that gate skill adoption on seeing a security fix acknowledgment in the changelog are specifically vulnerable to this attack vector.

The false entry may also reference fake CVE identifiers or link to attacker-controlled "advisory" pages that serve further malicious content to users who click through to verify the security fix.

Wildcard ACAO on write endpoints that accept custom-header session tokens is never safe. Changelog creation is a write operation with direct impact on user trust decisions. Endpoints that create or modify changelog entries must enforce session authentication, role-based access control scoped to the skill owner, CSRF token validation, and input validation via Zod schema to prevent injection of attacker-controlled fields such as fake CVE references.

Vulnerable
// POST /api/skills/:id/changelog — wildcard ACAO, no CSRF, no ownership check
router.post('/skills/:id/changelog', cors({ origin: '*' }), async (req, res) => {
  const { version, summary, cveFixed, releaseDate } = req.body;
  // no session check, no CSRF, no Zod validation, no ownership check
  await Changelog.create({ skillId: req.params.id, version, summary, cveFixed, releaseDate });
  return res.json({ created: true });
});
Fixed
// POST /api/skills/:id/changelog — allowlist CORS + session + ownership + CSRF + Zod + audit log
import { z } from 'zod';
const ChangelogEntrySchema = z.object({
  version: z.string().regex(/^\d+\.\d+\.\d+(-[\w.]+)?$/).max(32),
  summary: z.string().min(10).max(2000),
  releaseDate: z.string().datetime().optional(),
  status: z.enum(['draft', 'published']).default('draft'),
});

router.post(
  '/skills/:id/changelog',
  cors({ origin: (o, cb) => cb(null, CORS_ALLOWLIST.includes(o)), credentials: true }),
  requireSession,
  verifyCsrf,
  async (req, res) => {
    const skill = await Skill.findById(req.params.id).select('ownerId');
    if (!skill) return res.status(404).json({ error: 'Not found' });
    if (skill.ownerId.toString() !== req.session.userId && !req.session.roles.includes('admin')) {
      return res.status(403).json({ error: 'Forbidden' });
    }

    const parsed = ChangelogEntrySchema.safeParse(req.body);
    if (!parsed.success) return res.status(400).json({ error: parsed.error });

    const entry = await Changelog.create({ skillId: req.params.id, createdBy: req.session.userId, ...parsed.data });

    await AuditLog.create({
      action: 'changelog.entry.created', actorId: req.session.userId,
      skillId: req.params.id, entryId: entry._id, at: new Date(),
    });

    return res.status(201).json({ entryId: entry._id });
  }
);

CORS61-003 — Timing oracle via Origin reflection before ownership check on changelog draft endpoint

Severity: MEDIUM

The changelog draft endpoint reflects the caller-supplied Origin header as Access-Control-Allow-Origin before evaluating the authentication and ownership check. This creates a measurable timing channel: a request from an origin with an active admin session completes the draft query slightly faster than one that hits the unauthorized branch of the ownership check. An attacker script iterates skill identifiers and measures response latency from a cross-origin context, using the timing delta to identify which skills have active draft release notes in progress.

Skills with high draft creation velocity — indicated by rapid successive draft creation timestamps visible in the response timing pattern — are prime targets for CORS61-001 credential exfiltration. These skills are the ones where unpublished CVE disclosure timelines are most likely to be current and time-sensitive. The timing oracle does not directly exfiltrate data, but it dramatically reduces the attacker's reconnaissance burden before launching the higher-impact CORS61-001 and CORS61-004 attacks by identifying which skills are actively preparing security releases.

Vulnerable
// GET /api/skills/:id/changelog/draft — Origin reflected BEFORE auth check
router.get('/skills/:id/changelog/draft', cors({ origin: true }), async (req, res) => {
  const skill = await Skill.findById(req.params.id); // ownership check here
  if (!skill || skill.ownerId.toString() !== req.session?.userId) {
    return res.status(403).json({ error: 'Forbidden' });
  }
  const drafts = await Changelog.find({ skillId: req.params.id, status: 'draft' });
  return res.json({ drafts });
});
Fixed
// GET /api/skills/:id/changelog/draft — auth first, constant-time floor, unified WHERE
const MIN_RESPONSE_MS = 60;

router.get(
  '/skills/:id/changelog/draft',
  requireSession,
  cors({ origin: (o, cb) => cb(null, CORS_ALLOWLIST.includes(o)), credentials: true }),
  async (req, res) => {
    const start = Date.now();

    const drafts = await Changelog.find({
      skillId: req.params.id,
      status: 'draft',
      createdBy: req.session.userId, // unified WHERE — same query regardless of ownership
    }).select('version summary status createdAt -cveRefs -internalTickets');

    const elapsed = Date.now() - start;
    if (elapsed < MIN_RESPONSE_MS) {
      await new Promise(r => setTimeout(r, MIN_RESPONSE_MS - elapsed));
    }

    if (!drafts.length && !(await Skill.exists({ _id: req.params.id, ownerId: req.session.userId }))) {
      return res.status(403).json({ error: 'Forbidden' });
    }
    return res.json({ drafts });
  }
);

CORS61-004 — Credential-bearing CORS on changelog deletion erases security advisory records

Severity: CRITICAL

The changelog deletion endpoint uses cors({origin: true, credentials: true}). When an admin is logged in and visits an attacker-controlled page, the page can silently DELETE any changelog entry, authenticated by the victim's session cookie. This is not merely a data integrity issue — changelog entries that document security vulnerabilities and their fixes constitute the public record of a skill's security history. Deleting these entries removes evidence of past vulnerabilities, making the skill appear to have a clean security track record when it does not.

An attacker with a commercial interest in discrediting a competitor's skill can delete legitimate security advisories from that skill's changelog to make it appear that the skill has never had a vulnerability — erasing the trust signal that honest security disclosure provides to security-conscious users. Conversely, an attacker covering their tracks after exploiting CORS61-002 to inject false security release notes can delete those false entries before the skill owner detects the unauthorized modification. The skill owner receives no notification of the deletion, and the audit trail attributes the deletion to the victim admin, complicating forensic investigation.

Changelog deletion is an audit-critical operation requiring full CORS hardening. Security advisory records in the changelog serve as the public trust signal for a skill's vulnerability history. Deletion must require explicit CORS allowlists, session authentication with ownership verification, and email or webhook notifications to the affected skill owner on every deletion event. Consider soft-delete with tombstone records rather than hard deletion for published changelog entries that document CVEs.

Vulnerable
// DELETE /api/skills/:id/changelog/:entryId — mirrors origin, allows credentials, no ownership check
router.delete(
  '/skills/:id/changelog/:entryId',
  cors({ origin: true, credentials: true }),
  requireSession,
  async (req, res) => {
    // no ownership check — any authenticated admin session can delete any changelog entry
    await Changelog.deleteOne({ _id: req.params.entryId, skillId: req.params.id });
    return res.json({ deleted: true });
  }
);
Fixed
// DELETE /api/skills/:id/changelog/:entryId — allowlist CORS + ownership + notification + audit
router.delete(
  '/skills/:id/changelog/:entryId',
  cors({ origin: (o, cb) => cb(null, CORS_ALLOWLIST.includes(o)), credentials: true }),
  requireSession,
  async (req, res) => {
    const skill = await Skill.findById(req.params.id).select('ownerId publisherEmail name');
    if (!skill) return res.status(404).json({ error: 'Not found' });

    if (skill.ownerId.toString() !== req.session.userId && !req.session.roles.includes('registry_admin')) {
      return res.status(403).json({ error: 'Forbidden' });
    }

    const entry = await Changelog.findOne({ _id: req.params.entryId, skillId: req.params.id });
    if (!entry) return res.status(404).json({ error: 'Entry not found' });

    // soft-delete published entries to preserve audit trail
    if (entry.status === 'published') {
      await Changelog.updateOne({ _id: entry._id }, { status: 'deleted', deletedBy: req.session.userId, deletedAt: new Date() });
    } else {
      await Changelog.deleteOne({ _id: entry._id });
    }

    await AuditLog.create({
      action: 'changelog.entry.deleted', actorId: req.session.userId,
      skillId: req.params.id, entryId: req.params.entryId, at: new Date(),
    });

    await notifyChangelogEntryDeletion({ skillId: skill._id, skillName: skill.name,
      ownerEmail: skill.publisherEmail, entryVersion: entry.version, deletedBy: req.session.userId });

    return res.json({ deleted: true });
  }
);

All four SA-SKL-CORS61 vulnerabilities reflect a consistent pattern of overly permissive CORS configuration on changelog management endpoints that control the public security record of skills in the registry marketplace. SkillAudit detects CORS61-001 and CORS61-004 by flagging cors({origin:true,credentials:true}) usage on changelog routes; CORS61-002 by detecting wildcard ACAO on POST routes handling changelog creation; and CORS61-003 by detecting CORS header emission before authentication checks in route handler chains. See also SA-SKL-CORS60 on search discovery indexing endpoints for the companion chain targeting search visibility CORS misconfigurations.

Compound attack chain: CORS61-003 → CORS61-001 → CORS61-002 → CORS61-004

The four CORS61 findings compose into a complete security record manipulation kill chain. An attacker first exploits the timing oracle (CORS61-003) to identify skills with high draft creation velocity — indicating active release preparation and live admin sessions — without triggering authentication failures or alerting the skill owner. With target skills identified, the attacker uses CORS61-001 to exfiltrate the full changelog including unpublished drafts, obtaining the CVE fix timeline, the nature of the vulnerability from internal fix descriptions, and the scheduled public disclosure date.

Armed with the vulnerability details obtained from CORS61-001, the attacker crafts a false changelog entry (CORS61-002) claiming that a critical security patch has been released for a version that remains vulnerable. This false entry is published under the victim admin's identity, misleading users who check the changelog before installing the skill. Because the false entry appears legitimate and is attributed to the skill owner, users who would otherwise delay installation pending a security fix proceed with installing the vulnerable version.

Finally, to cover the attack and preserve the false trust signal, the attacker uses CORS61-004 to delete the legitimate changelog entries that describe the actual vulnerability — erasing the accurate security history and replacing it with the attacker's fabricated narrative. The result is a corrupted security record attributed to a legitimate admin, with users misled about the skill's security posture and the original vulnerability disclosure permanently removed from the public record.

SkillAudit detection

SkillAudit's static analysis rules detect all four CORS61 vulnerability classes during CI pipeline scanning. The CORS credential mirroring detector flags any route handler that passes {origin: true, credentials: true} or {origin: (o, cb) => cb(null, true), credentials: true} to the cors() middleware on endpoints under /changelog/ path segments. The wildcard ACAO detector flags any route that sets Access-Control-Allow-Origin: * on POST, PUT, PATCH, or DELETE handlers in changelog management routes. The CORS-before-auth detector flags route handler chains where cors() middleware appears before requireSession() or equivalent authentication middleware. All findings include remediation snippets and links to this advisory.