Claude MCP skill CORS misconfiguration — skill rate limiting and quota enforcement endpoints — SA-SKL-CORS44
SA-SKL-CORS44 documents four CORS misconfiguration patterns in MCP skill registry rate limiting and quota enforcement endpoints. Rate limiting endpoints manage per-plan API thresholds, burst allowances, enterprise custom limits, and admin override grants that allow specific API keys to bypass normal throttling. Credential-bearing CORS on the rate limit config read exposes the full enforcement matrix — per-plan thresholds and custom enterprise negotiated limits — to any origin. Wildcard ACAO on the override endpoint lets any page consume admin override quota, bypassing per-plan enforcement for attacker-controlled API keys. A timing oracle on the violations endpoint reveals rate limit event existence across organizational boundaries. And credential-bearing CORS on override deletion enables any origin to reinstate throttling on production API consumers using a victim admin session.
cors({origin:true,credentials:true}) on GET /api/skills/:id/rate-limits; any origin reads full rate limit config including per-plan thresholds, burst allowances, and custom enterprise limits using victim sessionACAO: * on POST /api/skills/:id/rate-limits/override; any page creates rate limit overrides consuming admin override quota, bypassing per-plan enforcement for attacker-controlled API keysACAO origin reflection on GET /api/skills/:id/rate-limits/violations emitted before ownership check; timing oracle reveals rate limit violation event existence across all orgscors({origin:true,credentials:true}) on DELETE /api/skills/:id/rate-limits/override/:overrideId; any origin deletes any rate limit override using victim admin session, reinstating throttling on production API consumersCORS44-001 — Credential-bearing CORS on rate limit config exposes per-plan thresholds and enterprise limits
The rate limit configuration endpoint at GET /api/skills/:id/rate-limits returns the complete enforcement matrix for a skill: requests-per-minute and requests-per-day limits for each subscription plan tier, burst allowance windows, rate limit backoff strategies, and custom enterprise negotiated limits that override the standard per-plan matrix for specific high-volume customers. When configured with cors({origin:true,credentials:true}), any page can read all of this using the victim's authenticated session.
The enterprise negotiated limits are the most commercially sensitive portion of the response. Custom limits represent negotiated pricing agreements — an enterprise customer paying for a higher throughput tier has a contract that includes specific numbers. When a competitor reads those limits via CORS44-001, they learn the precise per-plan pricing and throughput commitments that the skill publisher has negotiated with their largest customers, which is equivalent to reading a commercial pricing schedule that the publisher has reason to keep confidential. It also reveals which customer accounts have been granted special treatment, since only high-value enterprise accounts receive custom overrides in practice.
CORS44-001 fix: Replace cors({origin:true,credentials:true}) with an explicit allowlist. Add requireSession before CORS middleware. For public callers, return only a boolean indicating whether rate limiting is enabled — never per-plan thresholds, burst allowances, or enterprise negotiated limits.
router.get('/skills/:id/rate-limits',
cors({ origin: true, credentials: true }),
async (req, res) => {
const config = await db.getRateLimitConfig(req.params.id);
res.json(config); // includes per-plan thresholds, burst allowances, enterprise custom limits
}
);
router.get('/skills/:id/rate-limits',
requireSession,
strictCors,
async (req, res) => {
const isOwner = await db.isSkillOwner(req.params.id, req.session.orgId);
if (!isOwner) {
const enabled = await db.hasRateLimitsEnabled(req.params.id);
return res.json({ rateLimitsEnabled: enabled });
}
const config = await db.getRateLimitConfig(req.params.id);
res.json(config);
}
);
CORS44-002 — Wildcard ACAO on override endpoint exhausts admin quota and bypasses enforcement
The rate limit override endpoint POST /api/skills/:id/rate-limits/override creates an admin-granted exception allowing a specified API key to exceed the normal per-plan rate limits. With ACAO: *, any page holding the victim's Bearer token can create overrides for arbitrary API keys, including attacker-controlled ones. The attack has two distinct damage profiles: admin override quota exhaustion (each registry enforces a per-org limit on the number of active overrides to prevent the system from being abused as a free tier bypass mechanism) and direct rate limit bypass for attacker-controlled API keys that the override grants unlimited throughput.
The rate limit bypass for attacker-controlled keys is immediately actionable for abuse scenarios. An API key that is normally subject to a 100-requests-per-minute limit on a Free plan becomes unlimited if an override is created for it via CORS44-002. For a skill that exposes a paid feature — a capability that the registry charges for per-API-call or gates behind higher-tier limits — an override bypass represents a direct financial loss to the skill publisher, since the attacker's API key uses the paid feature at no cost and the usage does not count toward billable volume that the registry would otherwise charge.
CORS44-002 fix: Remove wildcard. Require session. CSRF token. Require requireRole('admin'). Validate that the target API key belongs to the requesting org. Enforce per-org override count limits. Emit an audit log entry and admin notification on every override creation.
// WRONG — wildcard; anyone with a Bearer token can create rate limit overrides
router.post('/skills/:id/rate-limits/override',
cors({ origin: '*' }),
async (req, res) => {
await db.createRateLimitOverride(req.params.id, req.body.apiKeyId, req.body.limits);
res.json({ ok: true });
}
);
// RIGHT — allowlist + session + CSRF + admin role + API key ownership + override count limit
router.post('/skills/:id/rate-limits/override',
requireSession,
requireRole('admin'),
strictCors,
verifyCsrfToken,
async (req, res) => {
const skill = await db.getSkill(req.params.id);
if (!skill || skill.orgId !== req.session.orgId) return res.status(403).json({ error: 'forbidden' });
const apiKey = await db.getApiKey(req.body.apiKeyId);
if (!apiKey || apiKey.orgId !== req.session.orgId) {
return res.status(400).json({ error: 'API key does not belong to your org' });
}
const overrideCount = await db.getOverrideCount(req.session.orgId);
const org = await db.getOrg(req.session.orgId);
if (overrideCount >= org.maxRateLimitOverrides) {
return res.status(429).json({ error: 'rate limit override quota exceeded' });
}
await db.createRateLimitOverride(req.params.id, req.body.apiKeyId, req.body.limits);
await audit.log('rate_limit_override_created', { skillId: req.params.id, apiKeyId: req.body.apiKeyId, createdBy: req.session.userId });
res.json({ ok: true });
}
);
CORS44-003 — Timing oracle on violations endpoint reveals rate limit event existence
The rate limit violations endpoint GET /api/skills/:id/rate-limits/violations reflects the Origin header before the ownership check executes. When a skill has accumulated rate limit violations — 429 responses generated for API keys that exceeded their thresholds — the server executes a pagination query across the violations table that is measurably slower than the immediate 404 for skills with no violations. The latency difference is cross-origin observable via performance.now().
An attacker uses this oracle to enumerate which private skills have active rate limit violations — a signal that those skills have high-traffic API consumers operating near or above their plan limits. Skills with frequent rate limit violations are likely enterprise-grade API products with real usage volume, making them higher-value targets for the CORS44-001 config exfiltration. The oracle identifies the most commercially active skills in the registry without requiring any authenticated session for the oracle phase.
CORS44-003 fix: Move CORS middleware after auth and ownership enforcement. Include orgId in the WHERE clause so unauthorized skill IDs return a consistent fast path. Apply a minimum-latency strategy (setTimeout to a floor of 50ms) to normalize 403 and 404 response times. Never emit the ACAO header for requests that fail authorization.
CORS44-004 — Credential-bearing CORS on override delete reinstates throttling on production consumers
The rate limit override deletion endpoint DELETE /api/skills/:id/rate-limits/override/:overrideId uses cors({origin:true,credentials:true}). An attacker who tricks an org admin into visiting a malicious page can delete any rate limit override for any skill in the organization. The operational impact is immediate: the API key that was granted an override to exceed normal throttling limits is now subject to the standard per-plan limits again. If that API key belongs to a production service that depends on the override for throughput — a CI/CD pipeline, a high-volume analytics consumer, an enterprise integration — it begins receiving 429 errors the moment the override is deleted, with no prior warning.
CORS44-004 is a targeted operational disruption attack. By identifying which overrides belong to business-critical integrations (readable via CORS44-001), an attacker can delete precisely those overrides that will cause maximum operational disruption for the skill publisher's most important enterprise customers — generating 429 errors in production, triggering SLA breach alerts, and creating support escalations that consume engineering attention during the period when the attacker is pursuing their primary objective.
CORS44-004 fix: Replace credential-bearing CORS with an explicit allowlist. Add requireRole('admin') and skill ownership verification. Require CSRF token. Emit an audit log entry. Send notification to the owner of the API key whose override is being deleted, giving them advance warning of the throttling restoration.
// WRONG — credential-bearing CORS; any origin reinstates throttling on production consumers
router.delete('/skills/:id/rate-limits/override/:overrideId',
cors({ origin: true, credentials: true }),
async (req, res) => {
await db.deleteRateLimitOverride(req.params.id, req.params.overrideId);
res.json({ ok: true });
}
);
// RIGHT — allowlist + admin role + ownership check + audit log + API key owner notification
router.delete('/skills/:id/rate-limits/override/:overrideId',
requireSession,
requireRole('admin'),
strictCors,
verifyCsrfToken,
async (req, res) => {
const skill = await db.getSkill(req.params.id);
if (!skill || skill.orgId !== req.session.orgId) return res.status(403).json({ error: 'forbidden' });
const override = await db.getRateLimitOverride(req.params.overrideId);
if (!override || override.skillId !== req.params.id) return res.status(404).json({ error: 'not found' });
await db.deleteRateLimitOverride(req.params.id, req.params.overrideId);
await audit.log('rate_limit_override_deleted', { skillId: req.params.id, overrideId: req.params.overrideId, apiKeyId: override.apiKeyId, deletedBy: req.session.userId });
// notify API key owner that their override was removed so they can prepare for throttling
await notifications.notifyApiKeyOwner(override.apiKeyId, 'rate_limit_override_removed', { skillId: req.params.id });
res.json({ ok: true });
}
);
SkillAudit scans for credential-bearing CORS reflection on rate limit configuration endpoints, wildcard ACAO on override creation operations, and middleware ordering that emits CORS before auth — across all rate limiting and quota enforcement sub-routers in your MCP skill registry codebase.
Scan your registry| Finding | Severity | Endpoint | Impact |
|---|---|---|---|
| CORS44-001 | CRITICAL | GET /api/skills/:id/rate-limits | Full rate limit config exfiltration including per-plan thresholds, burst allowances, and enterprise negotiated custom limits |
| CORS44-002 | HIGH | POST /api/skills/:id/rate-limits/override | Admin override quota exhaustion; rate limit bypass for attacker-controlled API keys on paid plan features |
| CORS44-003 | MEDIUM | GET /api/skills/:id/rate-limits/violations | Timing oracle reveals rate limit violation existence across all orgs for high-traffic skill enumeration |
| CORS44-004 | CRITICAL | DELETE /api/skills/:id/rate-limits/override/:overrideId | Production API consumer throttling reinstated by deleting overrides; enterprise SLA disruption attack |
See also: SA-SKL-CORS43 (notification and alert subscription CORS patterns) and SA-SKL-CORS43 deep dive blog post for the compound alert-disablement and notification-forgery chain that credential-bearing CORS enables across notification and rate limiting endpoints.