Claude MCP skill CORS misconfiguration — skill version signing and release attestation endpoints (SA-SKL-CORS67)
SA-SKL-CORS67 identifies four CORS misconfiguration vulnerabilities in MCP skill registry version signing and release attestation endpoints. Credential-bearing CORS on the release list endpoint exposes signing key IDs and attestation hashes; wildcard ACAO on the release creation endpoint lets any origin inject attacker-controlled release entries under victim admin identity; a timing oracle on the attestation endpoint reveals active automated release pipelines; and credential-bearing CORS on the release deletion endpoint breaks all version-pinned consumers downstream.
GET /api/skills/:id/releases has cors({origin:true,credentials:true}); any origin reads full release list including signing key IDs, attestation hashes, and release notes; signing key IDs enable forging release attestations for skill package distributionPOST /api/skills/:id/releases has ACAO:*; any page creates attacker-controlled release entries under victim admin identity pointing to malicious artifact with a legitimate-looking version number and signing attestationGET /api/skills/:id/releases/attestations reflects Origin before ownership check; timing oracle reveals release signing activity velocity identifying skills with active automated release pipelines as CORS67-001 targetsDELETE /api/skills/:id/releases/:releaseId has cors({origin:true,credentials:true}); any origin deletes any release using victim admin session; version-pinned consumers receive 404 on update check, breaking dependency resolutionCORS67-001 — Credential-bearing CORS exposes release signing key identifiers
The GET /api/skills/:id/releases endpoint returns the complete release list for a skill, including each release's version number, artifact URL, signing key ID, Sigstore attestation hash, release notes, and publication timestamp. The endpoint uses cors({origin:true,credentials:true}), enabling any origin to read the full response using the victim's session cookie.
The signing key ID is the critical value exposed here. It is the identifier that the registry's attestation service uses to look up the actual signing key when verifying a release artifact. An attacker who exfiltrates the signing key IDs can submit forged attestation requests to the registry that reference a legitimate key ID but contain an attacker-controlled artifact digest. If the attestation endpoint does not verify that the caller owns the referenced key, the attacker can create attestation records that pass consumer verification checks for malicious artifacts — a supply chain attack vector against every consumer of the skill.
// CORS67-001 — VULNERABLE
router.get(
'/releases',
cors({ origin: true, credentials: true }), // any origin reads signing key IDs
requireSession,
requireOwnership('skillId'),
async (req, res) => {
const releases = await db.releases.findAll({
where: { skillId: req.params.id },
// VULNERABLE: signingKeyId and attestationHash exposed — enables forging attestations
attributes: ['id', 'version', 'artifactUrl', 'signingKeyId', 'attestationHash', 'releaseNotes', 'createdAt'],
});
res.json(releases);
}
);
// CORS67-001 — FIXED
router.get(
'/releases',
cors(corsOptions), // allowlist CORS
requireSession,
requireOwnership('skillId'),
async (req, res) => {
const releases = await db.releases.findAll({
where: { skillId: req.params.id },
// FIXED: never return raw signingKeyId — return masked prefix only
attributes: ['id', 'version', 'artifactUrl', 'signingKeyIdPrefix', 'attestationHash', 'releaseNotes', 'createdAt'],
});
res.json(releases);
}
);
Signing key ID exfiltration impact: The attacker now holds the registry-internal identifiers for all signing keys used to attest this skill's releases. Combined with a misconfigured attestation creation endpoint that skips key-ownership verification, the attacker can create forged attestation records pointing to malicious artifacts. Any consumer that relies on attestation hash verification without validating the full chain of trust will install the attacker-controlled payload as a legitimate release.
CORS67-002 — Wildcard ACAO enables attacker-controlled release injection
The POST /api/skills/:id/releases endpoint creates a new release entry with an attacker-supplied artifact URL and version string. With ACAO:* set, any origin can issue a cross-origin POST using the victim's session cookie. The attacker crafts a release with version 2.4.1 (one patch ahead of the current stable 2.4.0) pointing to a malicious artifact hosted at an attacker-controlled CDN URL. The release is created under the victim admin's identity, appears in the official release list with a legitimate version number, and is included in the registry's automated update-check responses.
Consumers configured to auto-update to the latest patch release will resolve 2.4.1 as the next safe update and install the malicious artifact. Because the release was created via the registry API under the victim admin identity, it carries all the metadata — timestamps, audit trails, and version lineage — that would normally indicate a legitimate release.
// CORS67-002 — VULNERABLE
router.post(
'/releases',
(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');
if (req.method === 'OPTIONS') return res.sendStatus(204);
next();
},
requireSession,
requireOwnership('skillId'),
async (req, res) => {
const { version, artifactUrl, releaseNotes } = req.body;
const release = await db.releases.create({
skillId: req.params.id,
version,
artifactUrl,
releaseNotes,
createdByUserId: req.session.userId,
});
res.json({ ok: true, releaseId: release.id });
}
);
// CORS67-002 — FIXED
router.post(
'/releases',
cors(corsOptions), // allowlist CORS
requireSession,
verifyCsrfToken,
requireOwnership('skillId'),
async (req, res) => {
const parsed = ReleaseSchema.safeParse(req.body);
if (!parsed.success) return res.status(422).json({ error: parsed.error.issues });
const { version, artifactUrl, releaseNotes } = parsed.data;
// Validate artifactUrl is an allowed registry CDN origin, not attacker-controlled
if (!isAllowedArtifactOrigin(artifactUrl)) {
return res.status(422).json({ error: 'Artifact URL not in permitted CDN origin' });
}
const release = await db.releases.create({
skillId: req.params.id,
version,
artifactUrl,
releaseNotes,
createdByUserId: req.session.userId,
});
res.json({ ok: true, releaseId: release.id });
}
);
CORS67-003 — Timing oracle on release attestation endpoint
The GET /api/skills/:id/releases/attestations endpoint reflects the Origin header as ACAO before performing the ownership check. Because ownership resolution is cached, skills with an active admin session have a cache-hit response (<5ms) while uncached skills return in 20–40ms. This latency differential enables the attacker to enumerate which skills have high release signing activity — identifying skills with automated release pipelines that run on every commit as the highest-value CORS67-001 targets, since those skills produce the most signing key usage and present the widest supply-chain attack surface.
// CORS67-003 — VULNERABLE
router.get('/attestations',
(req, res, next) => {
res.setHeader('Access-Control-Allow-Origin', req.headers.origin || '*');
res.setHeader('Vary', 'Origin');
next();
},
requireSession,
requireOwnershipCached('skillId', { ttl: 60 }), // timing oracle via cache
async (req, res) => {
const attestations = await db.releaseAttestations.findAll({ skillId: req.params.id });
res.json(attestations);
}
);
// CORS67-003 — FIXED
router.get('/attestations',
cors(corsOptions),
requireSession,
async (req, res) => {
const startMs = Date.now();
// Unified query — ownership check inside the query, no separate cached step
const attestations = await db.releaseAttestations.findAllForOwner({
skillId: req.params.id,
userId: req.session.userId,
});
if (!attestations) {
const elapsed = Date.now() - startMs;
if (elapsed < 60) await delay(60 - elapsed); // constant-time floor
return res.status(403).json({ error: 'Not found' });
}
res.json(attestations);
}
);
CORS67-004 — Credential-bearing CORS deletes releases breaking version-pinned consumers
The DELETE /api/skills/:id/releases/:releaseId endpoint removes a release entry permanently. Using cors({origin:true,credentials:true}), any origin can issue a credentialed DELETE request to silently remove any release the victim admin has published. When the attacker deletes the latest stable release, all consumers pinned to that exact version (via "skillaudit-skill": "2.4.0" in their MCP configuration) receive 404 from the registry's artifact resolution endpoint. Automated update checks fail, CI pipelines that install the pinned version break, and teams running lockfile-based installs lose the ability to reproduce their previous build environment.
// CORS67-004 — VULNERABLE
router.delete('/:releaseId',
cors({ origin: true, credentials: true }), // any origin removes releases
requireSession,
requireOwnership('skillId'),
async (req, res) => {
await db.releases.destroy({ where: { id: req.params.releaseId } });
res.json({ ok: true });
}
);
// CORS67-004 — FIXED
router.delete('/:releaseId',
cors(corsOptions),
requireSession,
verifyCsrfToken,
requireOwnership('skillId'),
async (req, res) => {
const release = await db.releases.findOne({
where: { id: req.params.releaseId, skillId: req.params.id },
});
if (!release) return res.status(404).json({ error: 'Not found' });
// Soft-delete: preserve artifact resolution for existing pinned consumers
await release.update({
deletedAt: new Date(),
deletedByUserId: req.session.userId,
});
await db.auditLog.create({
type: 'release.deleted',
skillId: req.params.id,
releaseId: release.id,
version: release.version,
actorId: req.session.userId,
});
// Notify skill owner of deletion, as pinned consumers will be disrupted
await notifySkillOwner(req.params.id, 'release.deleted', { version: release.version });
res.json({ ok: true });
}
);
SkillAudit detection: The scanner identifies CORS67 patterns using three AST query classes: cors({origin:true,credentials:true}) on route handlers containing /releases; res.setHeader('Access-Control-Allow-Origin', req.headers.origin) before the ownership check; and releases.destroy() without a soft-delete .update({deletedAt:...}) pattern in the same handler. Submit your MCP skill registry codebase to SkillAudit for a full audit report.