Claude MCP skill CORS misconfiguration — skill analytics and usage metrics dashboard endpoints (SA-SKL-CORS85)
SA-SKL-CORS85 identifies four CORS misconfiguration vulnerabilities in MCP skill registry skill analytics and usage metrics dashboard endpoints. Credential-bearing CORS on the analytics read endpoint exposes the full dashboard document including daily and monthly active user counts, revenue metrics disaggregated by pricing tier, conversion funnel data showing exactly where users abandon the installation flow, A/B test results revealing which messaging variants drive upgrades, and admin-only competitive benchmarking rows that compare the target skill's metrics directly against named rival skills using data the publisher has not consented to share; wildcard ACAO on the analytics export endpoint allows any page to trigger bulk data exports under an admin's identity, flooding the export queue and triggering a rate-limit lockout that prevents legitimate analytics access for the duration of the lockout window; a timing oracle on the realtime analytics endpoint reveals which skills have an active live-data stream, exposing the specific skills whose publishers are actively monitoring usage at the moment of the attack; and credential-bearing CORS on the analytics report deletion endpoint allows any page to permanently erase the historical usage reports that publishers rely on for pricing decisions, Series A investor data rooms, and contractual performance reporting obligations.
GET /api/skills/:id/analytics has cors({origin:true,credentials:true}) — any origin reads full analytics dashboard including daily/monthly active users, revenue metrics, conversion funnels, A/B test results, and admin-only competitive benchmarking data against rival skills using victim admin sessionPOST /api/skills/:id/analytics/export has ACAO:* — any page triggers analytics export under victim admin identity; attacker floods export requests exhausting export quota and triggering rate-limit lockout preventing legitimate analytics accessGET /api/skills/:id/analytics/realtime reflects Origin before auth check — timing oracle reveals skills with active realtime analytics stream (stream-active warm cache ~2ms vs cold ~180ms)DELETE /api/skills/:id/analytics/:reportId has cors({origin:true,credentials:true}) — any origin deletes analytics reports permanently destroying historical usage data the publisher relies on for pricing decisions and investor reportingCORS85-001 — Credential-bearing CORS exposes revenue metrics and competitive benchmarking data
The GET /api/skills/:id/analytics endpoint returns the complete analytics dashboard document for a skill, including both public summary fields visible to all authenticated users and admin-only fields gated behind a role check performed after CORS middleware runs. With cors({origin:true,credentials:true}) applied before authentication, any cross-origin page visited by an authenticated admin reads the full document using the admin's session credentials. The revenue metrics field contains daily and monthly revenue disaggregated by subscription tier, refund rates, and lifetime value projections — data that reveals a competitor's exact monetization performance. The conversion funnel data shows step-by-step abandonment rates through the skill installation and subscription flow, which is a direct map of where a competitor is losing users. The A/B test results expose which copy, pricing, and feature-gate variants the publisher has tested and which are winning — strategic intelligence that takes months of real-user experimentation to generate. The admin-only competitive benchmarking rows are the most sensitive: they contain named comparisons where the registry platform has calculated how the target skill ranks against specific rival skills by name on DAU, revenue, and retention — data the competitor publishers have not consented to disclose to each other.
// CORS85-001 — VULNERABLE
const express = require('express');
const cors = require('cors');
const { db } = require('../db');
const { requireSession } = require('../middleware/auth');
const router = express.Router();
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, {
includeRevenueMetrics: isAdmin,
includeConversionFunnels: isAdmin,
includeABTestResults: isAdmin,
includeCompetitiveBenchmarks: isAdmin
});
res.json(analytics);
}
);
module.exports = router;
Competitive benchmarking rows contain named comparisons between rival publishers — this is not just the target skill's data, it is the rival's data disclosed without consent. Admin-only fields must live on a separately gated admin endpoint. They must never be reachable from the same route that serves public analytics data, regardless of the runtime role check that follows CORS middleware execution.
// CORS85-001 — FIXED: auth before CORS; strip admin-only fields; separate admin endpoint
const express = require('express');
const { db } = require('../db');
const { requireSession, requireAdminRole } = require('../middleware/auth');
const { applyCorsAllowlist } = require('../middleware/cors');
const router = express.Router();
// Public analytics endpoint — no admin fields
router.get('/skills/:id/analytics',
requireSession,
applyCorsAllowlist,
async (req, res) => {
const analytics = await db.getSkillAnalytics(req.params.id, {
includeRevenueMetrics: false,
includeConversionFunnels: false,
includeABTestResults: false,
includeCompetitiveBenchmarks: false
});
res.json(analytics);
}
);
// Admin-only analytics endpoint — explicit role gate
router.get('/admin/skills/:id/analytics',
requireSession,
requireAdminRole,
applyCorsAllowlist,
async (req, res) => {
const analytics = await db.getSkillAnalytics(req.params.id, {
includeRevenueMetrics: true,
includeConversionFunnels: true,
includeABTestResults: true,
includeCompetitiveBenchmarks: true
});
res.json(analytics);
}
);
module.exports = router;
CVSS score: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N — Base Score 6.5 (HIGH); with admin session required and third-party competitive data exposed, effective impact escalates to CVSS 8.1.
CORS85-002 — Wildcard ACAO on analytics export endpoint exhausts quota and triggers lockout
The POST /api/skills/:id/analytics/export endpoint queues a bulk data export job for a skill's analytics history. Each export job consumes a slot in the per-skill export quota, which is capped to prevent abuse of the underlying data pipeline. With ACAO:* applied, any page can trigger this endpoint using a victim admin's session credentials — the wildcard origin permits the browser to include the session cookie on the cross-origin request. An attacker who lures an admin to a malicious page can fire hundreds of export requests per minute, saturating the export quota for every skill the admin has access to. Once the quota is exhausted, the platform's rate-limit layer activates a lockout window that prevents any legitimate export requests from the admin's account until the lockout expires — typically one hour in production configurations. The practical effect is that the publisher cannot access their own historical analytics data for the duration of the lockout, which is acutely damaging during time-sensitive events like investor due diligence, board reporting cycles, or incident response investigations where analytics data is required to scope the user impact.
// CORS85-002 — VULNERABLE: wildcard ACAO on analytics export endpoint
const express = require('express');
const cors = require('cors');
const { exportQueue } = require('../queues');
const { requireSession } = require('../middleware/auth');
const router = express.Router();
router.post('/skills/:id/analytics/export',
cors({ origin: '*' }),
requireSession,
async (req, res) => {
const job = await exportQueue.add('analytics-export', {
skillId: req.params.id,
requestedBy: req.session.userId,
format: req.body.format,
dateRange: req.body.dateRange
});
res.json({ jobId: job.id, status: 'queued' });
}
);
module.exports = router;
Export quota exhaustion during investor due diligence or incident response can have immediate business consequences beyond the security impact. Allowlisted CORS prevents cross-origin export triggering; a per-skill rate limit of two exports per day matches legitimate reporting cadence while making flood attacks impractical; and requireSkillRole(['owner']) ensures only the actual skill owner can initiate exports of their own data.
// CORS85-002 — FIXED: allowlist CORS; CSRF; per-skill rate limit 2/day; requireSkillRole
const express = require('express');
const { exportQueue } = require('../queues');
const {
requireSession,
requireSkillRole
} = require('../middleware/auth');
const { applyCorsAllowlist } = require('../middleware/cors');
const { csrfProtection } = require('../middleware/csrf');
const { rateLimit } = require('../middleware/rate-limit');
const router = express.Router();
router.post('/skills/:id/analytics/export',
requireSession,
applyCorsAllowlist,
csrfProtection,
requireSkillRole(['owner']),
rateLimit({
key: req => `analytics-export:${req.params.id}`,
max: 2,
window: '1d',
message: 'Analytics export rate limit exceeded — max 2 exports per skill per day'
}),
async (req, res) => {
const job = await exportQueue.add('analytics-export', {
skillId: req.params.id,
requestedBy: req.session.userId,
format: req.body.format,
dateRange: req.body.dateRange
});
res.json({ jobId: job.id, status: 'queued' });
}
);
module.exports = router;
CVSS score: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:H — Base Score 7.1 (HIGH); availability impact is high due to lockout window; integrity impact reflects false export job injection under admin identity.
CORS85-003 — Timing oracle reveals skills with active realtime analytics stream via Origin reflection before auth
The GET /api/skills/:id/analytics/realtime endpoint returns the live event stream for a skill's current analytics activity. Skills with an active realtime stream maintain a warm WebSocket connection handle in memory; this warm state returns in approximately 2ms. Skills with no active stream incur a cold connection setup and database lookup that takes approximately 180ms. Because the endpoint reflects the requesting Origin header before the authentication middleware executes, an unauthenticated cross-origin page can measure the response latency to determine whether a given skill has an active realtime analytics stream — meaning the publisher is actively watching their dashboard at the moment of the probe. This timing intelligence enables targeted social engineering: an attacker who knows a publisher is actively monitoring their analytics is more likely to be watching for anomalies, making real-time phishing or spoofing attacks during this window more effective. Combined with CORS85-001, it provides a list of skills whose publishers are most actively engaged, which are the highest-value targets for immediate credential exfiltration.
// CORS85-003 — VULNERABLE: Origin reflected before auth
const express = require('express');
const cors = require('cors');
const { realtimeAnalyticsHub } = require('../realtime');
const { requireSession } = require('../middleware/auth');
const router = express.Router();
router.get('/skills/:id/analytics/realtime',
cors({ origin: true }),
requireSession,
async (req, res) => {
const stream = await realtimeAnalyticsHub.getStream(req.params.id);
res.json(stream);
}
);
module.exports = router;
A publisher actively watching their analytics dashboard is itself sensitive operational state — revealing it enables targeted timing attacks. Moving authentication before CORS eliminates the channel by which an unauthenticated attacker can probe for realtime stream state; the constant-time response floor of 50ms closes the residual timing channel that remains when stream connection branching produces measurable latency differences even after auth is correctly ordered.
// CORS85-003 — FIXED: auth before CORS; constant-time response floor 50ms
const express = require('express');
const { realtimeAnalyticsHub } = require('../realtime');
const { requireSession } = require('../middleware/auth');
const { applyCorsAllowlist } = require('../middleware/cors');
const REALTIME_RESPONSE_FLOOR_MS = 50;
const router = express.Router();
router.get('/skills/:id/analytics/realtime',
requireSession,
applyCorsAllowlist,
async (req, res) => {
const start = Date.now();
const stream = await realtimeAnalyticsHub.getStream(req.params.id);
const elapsed = Date.now() - start;
if (elapsed < REALTIME_RESPONSE_FLOOR_MS) {
await new Promise(r => setTimeout(r, REALTIME_RESPONSE_FLOOR_MS - elapsed));
}
res.json(stream);
}
);
module.exports = router;
CVSS score: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N — Base Score 3.7 (LOW); timing oracle requires repeated measurement but no credentials; operational state disclosure justifies remediation given social engineering enablement.
CORS85-004 — Credential-bearing CORS deletes analytics reports destroying investor and pricing data
The DELETE /api/skills/:id/analytics/:reportId endpoint permanently removes an analytics report from a skill's historical usage record. Publishers rely on these reports for investor data room submissions, Series A due diligence packages, board-level performance presentations, and contractual performance reporting obligations with enterprise customers who have minimum-usage SLA guarantees. With cors({origin:true,credentials:true})
// CORS85-004 — VULNERABLE: credential-bearing CORS on analytics report deletion
const express = require('express');
const cors = require('cors');
const { db } = require('../db');
const { requireSession, requireAdminRole } = require('../middleware/auth');
const router = express.Router();
router.delete('/skills/:id/analytics/:reportId',
cors({ origin: true, credentials: true }),
requireSession,
requireAdminRole,
async (req, res) => {
await db.deleteAnalyticsReport(req.params.id, req.params.reportId);
res.json({ deleted: req.params.reportId });
}
);
module.exports = router;
Analytics reports submitted to investor data rooms represent legal commitments — their deletion can constitute fraudulent misrepresentation if reports cannot be reproduced for due diligence verification. Soft-delete with 90-day retention provides a reinstatement window for reports deleted by attackers exploiting this CORS misconfiguration. Re-authentication before deletion raises the bar against session-hijack attacks. The audit log with mandatory reason field provides the forensic record needed to distinguish legitimate administrative deletion from attack-driven erasure.
// CORS85-004 — FIXED: auth before CORS; re-auth; soft-delete 90-day retention; audit log
const express = require('express');
const { db } = require('../db');
const { requireSession, requireAdminRole, reAuthRequired } = require('../middleware/auth');
const { applyCorsAllowlist } = require('../middleware/cors');
const { csrfProtection } = require('../middleware/csrf');
const { auditLog } = require('../audit');
const router = express.Router();
router.delete('/skills/:id/analytics/:reportId',
requireSession,
applyCorsAllowlist,
csrfProtection,
requireAdminRole,
reAuthRequired,
async (req, res) => {
const expiresAt = new Date(Date.now() + 90 * 24 * 60 * 60 * 1000);
await db.softDeleteAnalyticsReport(req.params.id, req.params.reportId, {
deletedBy: req.session.userId,
reason: req.body.reason,
expiresAt
});
await auditLog.write({
action: 'analytics.report.delete',
skillId: req.params.id,
reportId: req.params.reportId,
actorId: req.session.userId,
reason: req.body.reason,
at: new Date()
});
res.json({ deleted: req.params.reportId, reinstateableUntil: expiresAt });
}
);
module.exports = router;
CVSS score: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H — Base Score 8.1 (HIGH); integrity and availability both high due to irreversible destruction of investor and pricing data relied on for contractual obligations.
SkillAudit checks for all SA-SKL-CORS vulnerability patterns including credential-bearing CORS before auth on analytics dashboard endpoints, wildcard ACAO on export triggering, timing oracle misconfigurations on realtime stream status checks, and soft-delete enforcement on analytics report deletion. Get a graded report with line-level code fixes in 60 seconds.
Get a free audit