Claude MCP skill CORS misconfiguration — skill analytics and usage metrics endpoints (SA-SKL-CORS80)
SA-SKL-CORS80 identifies four CORS misconfiguration vulnerabilities in MCP skill registry skill analytics and usage metrics endpoints. Credential-bearing CORS on the analytics retrieval endpoint exposes the full analytics document including install counts broken down by paying versus free tier, revenue attribution data linking installs to specific marketing campaigns, conversion funnel metrics revealing exactly where in the installation flow users abandon, and admin-only cohort analysis tables that expose aggregate behavioral data not visible to individual publishers using the victim admin's session; wildcard ACAO on the analytics export endpoint allows any page to trigger bulk analytics export jobs under the victim admin's identity, and flooding these export requests exhausts the registry's shared analytics storage quota and compute budget, causing an analytics denial-of-service that prevents all skills from generating new analytics reports; a timing oracle on the realtime analytics endpoint reveals which skills are experiencing active traffic spikes by exploiting the cache latency differential between high-traffic warm entries (~5ms) and cold lookups (~200ms) without reading the response body; and credential-bearing CORS on the analytics report deletion endpoint allows any page to permanently delete analytics report records for any skill using the admin's session, destroying the revenue attribution history that publishers rely on to verify their earnings calculations and dispute erroneous billing charges.
GET /api/skills/:id/analytics has cors({origin:true,credentials:true}) — any origin reads full analytics document including install counts broken down by paying vs free tier, revenue attribution data, conversion funnel metrics, and admin-only cohort analysis using victim admin sessionPOST /api/skills/:id/analytics/export has ACAO:* — any page triggers bulk analytics export under victim admin identity; attacker floods export requests exhausting storage quota and analytics compute budget causing analytics DoS across all skillsGET /api/skills/:id/analytics/realtime reflects Origin before auth check — timing oracle reveals skills experiencing real-time traffic spikes (high-traffic warm cache ~5ms vs cold ~200ms)DELETE /api/skills/:id/analytics/:reportId has cors({origin:true,credentials:true}) — any origin permanently deletes analytics reports destroying the revenue attribution history used by publishers to dispute billing disputesCORS80-001 — Credential-bearing CORS exposes revenue data and admin cohort analysis
The GET /api/skills/:id/analytics endpoint returns a comprehensive analytics document that includes tier-disaggregated install counts, revenue attribution data linking each install to a specific marketing campaign or referral source, conversion funnel metrics showing where users abandon the installation flow, and admin-only cohort analysis tables that the registry generates from aggregate behavioral data across all publishers. With cors({origin:true,credentials:true}) applied before authentication, any cross-origin page visited by an authenticated admin reads this document in full including the admin-only cohort fields, exposing sensitive revenue and behavioral intelligence to any attacker who can lure the admin to visit their page.
// CORS80-001 — VULNERABLE
router.get('/skills/:id/analytics',
cors({ origin: true, credentials: true }),
requireSession,
async (req, res) => {
const isAdmin = req.session.roles.includes('registry_admin');
const analytics = await db.getSkillAnalytics(req.params.id, { includeCohortAnalysis: isAdmin });
res.json(analytics);
}
);
// CORS80-001 — FIXED: auth before CORS; strip admin-only cohort fields from public response
router.get('/skills/:id/analytics',
requireSession,
applyCorsAllowlist,
async (req, res) => {
const analytics = await db.getSkillAnalytics(req.params.id, { includeCohortAnalysis: false });
res.json(analytics);
}
);
CORS80-002 — Wildcard ACAO on analytics export exhausts storage quota
The POST /api/skills/:id/analytics/export endpoint generates a bulk analytics export artifact stored in the registry's analytics storage tier. Each export job consumes a fixed amount of storage and analytics compute. With ACAO:*, any page can trigger this endpoint without credentials. An attacker floods export requests across the skill catalog, exhausting the shared storage quota and compute budget within seconds and preventing any new analytics reports from being generated for any skill until storage is manually reclaimed.
// CORS80-002 — VULNERABLE: wildcard ACAO on analytics export endpoint
router.post('/skills/:id/analytics/export',
cors({ origin: '*' }),
requireSession,
async (req, res) => {
const exportId = await analyticsExportQueue.enqueue({ skillId: req.params.id });
res.json({ exportId, status: 'queued' });
}
);
// CORS80-002 — FIXED: allowlist CORS; CSRF; per-skill rate limit 1/hour
router.post('/skills/:id/analytics/export',
requireSession,
applyCorsAllowlist,
csrfProtection,
rateLimit({ key: req => `analytics-export:${req.params.id}`, max: 1, window: '1h' }),
async (req, res) => {
const exportId = await analyticsExportQueue.enqueue({ skillId: req.params.id });
res.json({ exportId, status: 'queued' });
}
);
CORS80-003 — Timing oracle reveals high-traffic skills via Origin reflection
The GET /api/skills/:id/analytics/realtime endpoint returns the current realtime traffic count for a skill. Skills experiencing active traffic spikes have a warm cache entry that resolves in approximately 5ms. Skills with no current traffic hit a cold database query that takes approximately 200ms. Because the endpoint reflects the requesting Origin header before the authentication check, an unauthenticated cross-origin request can measure this latency differential to identify which skills are experiencing real-time traffic spikes — valuable targeting intelligence for a range of secondary attacks including CORS80-001 credential exfiltration timed for peak revenue attribution periods.
// CORS80-003 — VULNERABLE: Origin reflected before auth
router.get('/skills/:id/analytics/realtime',
cors({ origin: true }),
requireSession,
async (req, res) => {
const data = await realtimeCache.get(`rt:${req.params.id}`) || await db.getRealtimeAnalytics(req.params.id);
res.json(data);
}
);
// CORS80-003 — FIXED: auth before CORS; constant-time floor 50ms
const REALTIME_RESPONSE_FLOOR_MS = 50;
router.get('/skills/:id/analytics/realtime',
requireSession,
applyCorsAllowlist,
async (req, res) => {
const start = Date.now();
const data = await realtimeCache.get(`rt:${req.params.id}`) || await db.getRealtimeAnalytics(req.params.id);
const elapsed = Date.now() - start;
if (elapsed < REALTIME_RESPONSE_FLOOR_MS) await sleep(REALTIME_RESPONSE_FLOOR_MS - elapsed);
res.json(data);
}
);
CORS80-004 — Credential-bearing CORS permanently deletes revenue attribution reports
The DELETE /api/skills/:id/analytics/:reportId endpoint removes a specific analytics report from the registry's storage. With cors({origin:true,credentials:true}), any cross-origin page visited by an authenticated admin can permanently delete any analytics report for any skill. Publishers rely on analytics report history to verify their earnings calculations and dispute erroneous billing charges. Permanent deletion of this data undermines the registry's billing dispute resolution process and may violate data retention obligations in publisher agreements.
// CORS80-004 — VULNERABLE: credential-bearing CORS on analytics deletion endpoint
router.delete('/skills/:id/analytics/:reportId',
cors({ origin: true, credentials: true }),
requireSession,
requireAnalyticsAdminRole,
async (req, res) => {
await db.deleteAnalyticsReport(req.params.id, req.params.reportId);
res.json({ deleted: req.params.reportId });
}
);
// CORS80-004 — FIXED: auth before CORS; re-auth; soft-delete with 90-day retention; audit log
router.delete('/skills/:id/analytics/:reportId',
requireSession,
applyCorsAllowlist,
csrfProtection,
requireAnalyticsAdminRole,
reAuthRequired,
async (req, res) => {
const retainUntil = new Date(Date.now() + 90 * 24 * 60 * 60 * 1000);
await db.softDeleteAnalyticsReport(req.params.id, req.params.reportId, {
deletedBy: req.session.userId, retainUntil
});
await auditLog.write({ action: 'analytics.report.delete', skillId: req.params.id,
reportId: req.params.reportId, actorId: req.session.userId, at: new Date() });
res.json({ deleted: req.params.reportId, restorableUntil: retainUntil });
}
);
SkillAudit scans for all SA-SKL-CORS80 patterns — credential-bearing CORS before auth, wildcard ACAO on export endpoints, timing oracle misconfigurations, and destructive endpoints without soft-delete. Get a free audit to see the full CORS analysis for your skill.