CORS Misconfigurations in MCP Skill Registry Skill Marketplace Search and Discovery Filtering Endpoints
SA-SKL-CORS89 documents four CORS misconfiguration vulnerabilities across the marketplace search and discovery filtering surface of MCP skill registries. The findings span admin search bucket exfiltration, persistent filter quota flooding, active suggestion timing oracle, and silent curated discovery list deletion.
GET /api/registry/search/results has cors({origin:true,credentials:true}); any origin reads full personalized search results including admin-only promoted skills, suppressed competitor flags, and A/B test bucket assignments using victim admin sessionPOST /api/registry/search/filters has ACAO:*; any page creates persistent search filters under victim admin identity polluting search experience and flooding filter quota; denial-of-service against discovery pipelineGET /api/registry/search/suggestions reflects Origin before auth check; timing oracle reveals skills with active personalized suggestion pipeline (suggestion-active warm ~2 ms vs cold ~160 ms); enumerates high-value targets for CORS89-001DELETE /api/registry/search/filters/:filterId has cors({origin:true,credentials:true}); any origin permanently deletes saved search filters and curated discovery lists built by admin, destroying marketplace curation stateCORS89-001 — Credential-bearing CORS on personalized search results endpoint
The GET /api/registry/search/results endpoint returns the complete personalized search response for the authenticated session, including admin-only fields: promotedSkillIds (a ranked list of skills being paid to appear in top results), suppressedCompetitorIds (skills an admin has flagged for demotion), and abTestBucket (the specific A/B test variant the admin user is enrolled in for the search ranking experiment). The endpoint uses cors({origin:true,credentials:true}), so any browser-hosted page can read this response with the victim admin's session. The suppressed competitor list is especially sensitive: it reveals which skills the registry operator is intentionally downranking, exposing internal business relationships and enabling a targeted counter-campaign.
// CORS89-001 — VULNERABLE
router.get(
'/search/results',
cors({ origin: true, credentials: true }), // any origin reads admin search data
requireSession,
async (req, res) => {
const results = await searchService.query({
q: req.query.q,
userId: req.session.userId,
// VULNERABLE: admin-only fields returned to any cross-origin requester
includeAdminFields: req.session.role === 'admin',
});
res.json({
hits: results.hits,
promotedSkillIds: results.promotedSkillIds, // admin: paid promotions
suppressedCompetitorIds: results.suppressedIds, // admin: demoted skills
abTestBucket: results.abBucket, // internal experiment data
});
}
);
Competitor intelligence leak via single CORS fetch: Exfiltrated suppressedCompetitorIds reveals every skill the registry operator is intentionally downranking. Combined with promotedSkillIds, an attacker gains a complete map of paid placement relationships — usable for extortion, competitor intelligence, or gaming placement bids.
// CORS89-001 — FIXED
const { corsOptions } = require('../../config/cors');
router.get(
'/search/results',
cors(corsOptions), // allowlist — no origin reflection
requireSession,
async (req, res) => {
const results = await searchService.query({
q: req.query.q,
userId: req.session.userId,
includeAdminFields: req.session.role === 'admin',
});
// FIXED: strip admin-only fields from public response shape
const response = { hits: results.hits };
if (req.session.role === 'admin' && isSameOrigin(req)) {
response.promotedSkillIds = results.promotedSkillIds;
response.suppressedCompetitorIds = results.suppressedIds;
response.abTestBucket = results.abBucket;
}
res.json(response);
}
);
CORS89-002 — Wildcard ACAO on persistent search filter creation endpoint
The POST /api/registry/search/filters endpoint saves a named search filter under the authenticated user's identity — a reusable query that surfaces in the marketplace discovery sidebar. With ACAO:*, any page can flood this endpoint using the victim admin's bearer token. Each saved filter occupies a named slot in the discovery sidebar and counts against a per-account quota (typically 50–100 filters). An attacker who saturates this quota prevents the admin from creating legitimate discovery filters, pollutes the sidebar with attacker-named junk entries, and — since saved filters are shared with the admin's team — degrades the discovery experience for all team members who rely on curated search views.
// CORS89-002 — VULNERABLE
router.post(
'/search/filters',
(req, res, next) => {
res.setHeader('Access-Control-Allow-Origin', '*');
res.setHeader('Access-Control-Allow-Headers', 'Content-Type, Authorization');
if (req.method === 'OPTIONS') return res.sendStatus(204);
next();
},
requireSessionOrBearer,
async (req, res) => {
// VULNERABLE: attacker creates unlimited named filters under victim identity
const filter = await db.searchFilters.create({
userId: req.session.userId,
name: req.body.name, // attacker-controlled filter name
query: req.body.query,
isShared: req.body.isShared ?? true, // shared with team by default
});
res.status(201).json(filter);
}
);
// CORS89-002 — FIXED
router.post(
'/search/filters',
cors(corsOptions),
requireSession, // session-only — bearer not accepted for filter mutations
async (req, res) => {
const existing = await db.searchFilters.count({
where: { userId: req.session.userId },
});
if (existing >= 50) {
return res.status(429).json({ error: 'Filter quota reached (max 50)' });
}
const filter = await db.searchFilters.create({
userId: req.session.userId,
name: req.body.name,
query: req.body.query,
isShared: req.body.isShared ?? false, // FIXED: default non-shared
});
res.status(201).json(filter);
}
);
CORS89-003 — Search suggestion active pipeline timing oracle
The suggestion endpoint reflects Origin before the authentication middleware executes. Skills enrolled in the personalized suggestion pipeline maintain a Redis entry for the active suggestion batch; the cache warm/cold timing differential (~2ms vs ~160ms) is measurable via JavaScript performance.now() without authentication. An attacker enumerates skill IDs using this oracle to identify which skills are actively indexed in the personalized suggestion pipeline — indicating recent publishing activity and admin attention — and uses that list to target CORS89-001 credential reads and CORS89-004 filter deletions with higher precision.
// CORS89-003 — VULNERABLE
router.get(
'/search/suggestions',
cors({ origin: true, credentials: true }), // Origin reflected before auth
requireSession,
async (req, res) => {
// Cache-warmed for skills in active suggestion pipeline (~2ms)
// Cold path for inactive skills (~160ms)
const suggestions = await suggestionCache.get(req.query.skillId);
if (!suggestions) return res.status(404).json({ error: 'No active suggestions' });
res.json(suggestions);
}
);
// CORS89-003 — FIXED
router.get(
'/search/suggestions',
cors(corsOptions), // reject non-allowlisted origins before any processing
requireSession, // auth runs before cache lookup — no timing differential
async (req, res) => {
const suggestions = await suggestionCache.get(req.query.skillId);
if (!suggestions) return res.status(404).json({ error: 'No active suggestions' });
res.json(suggestions);
}
);
CORS89-004 — Credential-bearing CORS on saved search filter deletion endpoint
The DELETE /api/registry/search/filters/:filterId endpoint permanently removes a saved search filter. Admin-curated search filters represent significant editorial labor: each filter encodes business-critical query logic that surfaces the right skills for specific use cases. With cors({origin:true,credentials:true}), any origin can delete every saved filter using the victim admin session in a single loop. The result is complete destruction of the marketplace discovery curation layer — the carefully maintained saved views that the admin team uses to surface skills by category, trust level, language, and use case are permanently gone with no recovery path if no backup exists.
// CORS89-004 — VULNERABLE
router.delete(
'/search/filters/:filterId',
cors({ origin: true, credentials: true }), // any origin destroys curation state
requireSession,
async (req, res) => {
await db.searchFilters.destroy({
where: { id: req.params.filterId, userId: req.session.userId },
});
res.status(204).send();
}
);
// CORS89-004 — FIXED
router.delete(
'/search/filters/:filterId',
cors(corsOptions), // allowlist — cross-origin deletion blocked
requireSession,
requireMFAReauth, // re-authentication required to delete shared curation objects
async (req, res) => {
const filter = await db.searchFilters.findOne({
where: { id: req.params.filterId, userId: req.session.userId },
});
if (!filter) return res.status(404).json({ error: 'Filter not found' });
// FIXED: soft-delete — recoverable within 30 days
await filter.update({ deletedAt: new Date(), deletedBy: req.session.userId });
res.status(204).send();
}
);
Scan your MCP skill registry for SA-SKL-CORS89
SkillAudit detects credential-bearing CORS on search endpoints, suggestion timing oracle patterns, and filter deletion vulnerabilities in under 60 seconds.
Run a free audit