Claude MCP skill CORS misconfiguration — skill review and feedback collection endpoints — SA-SKL-CORS55
SA-SKL-CORS55 documents four CORS misconfiguration patterns in MCP skill registry skill review and feedback collection endpoints. Review endpoints are trust infrastructure — the ratings and written reviews they store determine which skills users adopt and which they avoid. A CORS misconfiguration here does not just leak data; it allows an attacker to exfiltrate reviewer identities and unpublished draft reviews, inject fraudulent ratings under victim identity, enumerate which skills are under active review scrutiny, and permanently delete legitimate negative reviews that protect users from malicious skills. Credential-bearing CORS on the review list endpoint exposes reviewer email addresses, draft reviews visible only to their authors, and moderation flags. Wildcard ACAO on review creation lets any page submit attacker-controlled ratings. A timing oracle on the review analytics endpoint reveals review velocity. And credential-bearing CORS on the review deletion endpoint lets any origin suppress negative feedback and remove moderator actions.
cors({origin:true,credentials:true}) on GET /api/skills/:id/reviews; any origin reads full review list including reviewer email addresses, draft (unpublished) reviews, and review moderation flags using victim session; fix: allowlist; requireSession for private fields; return only published reviews with no reviewer PII for public callers; admin-only moderation flag fieldACAO: * on POST /api/skills/:id/reviews; any page submits attacker-controlled reviews under victim identity consuming review quota and injecting fraudulent ratings that affect skill discovery ranking and trust signals; fix: remove wildcard; require session; CSRF token; Zod ReviewSchema; rate-limit per userId+skillIdACAO origin reflection on GET /api/skills/:id/reviews/analytics emitted before ownership check; timing oracle reveals review submission velocity tiers identifying high-review-activity skills as CORS55-001 targets; fix: auth before CORS emission; unified WHERE clause; normalize 403/404 latencycors({origin:true,credentials:true}) on DELETE /api/skills/:id/reviews/:reviewId; any origin deletes any review using victim moderator session, suppressing legitimate negative reviews and removing moderation actions that protect users from malicious skills; fix: allowlist + requireSession + ownership/moderator check + audit log on review deletion eventsCORS55-001 — Credential-bearing CORS on review list exposes reviewer PII and draft reviews
Severity: CRITICAL
The GET /api/skills/:id/reviews endpoint is configured with cors({origin:true,credentials:true}). Any origin can read the full review list for any skill using the victim's session. The review list document includes reviewer email addresses (from the populated user record), draft reviews that are only visible to their authors before publication, and review moderation flags that expose which reviews are under active moderator scrutiny. Draft reviews are the most sensitive component: an author drafts a negative review over several sessions before publishing, intending the draft to remain private until submission. Any page visited by a user with a valid session can silently exfiltrate that unpublished draft content — including details about unreported vulnerabilities, compliance failures, or organizational security posture that the reviewer has not yet chosen to disclose publicly.
Moderation flags are the second high-value component. A review under moderation indicates that the skill publisher has flagged it for removal, that another moderator has begun a review process, or that the review contains content pending administrator review. Reading moderation flags allows an attacker to map which negative reviews are most vulnerable to being removed via CORS55-004 — prioritizing targeted deletion of reviews that are already under dispute, since their removal is less likely to trigger anomaly detection.
// GET /api/skills/:id/reviews — cors({origin:true,credentials:true}) on router
router.use(cors({ origin: true, credentials: true }));
router.get('/:id/reviews', async (req, res) => {
const reviews = await Review.find({ skillId: req.params.id })
.populate('author', 'email displayName') // exposes email
.select('+draft +moderationFlags'); // includes private fields
return res.json(reviews);
});
// GET /api/skills/:id/reviews — allowlist cors + scoped fields
const reviewCors = cors({ origin: process.env.ALLOWED_ORIGINS.split(','), credentials: true });
router.get('/:id/reviews', reviewCors, async (req, res) => {
const isAdmin = req.session?.role === 'admin';
const filter = { skillId: req.params.id, draft: false }; // public: published only
const reviews = await Review.find(filter)
.populate('author', 'displayName') // no email for public response
.select(isAdmin ? '+moderationFlags' : '-moderationFlags -draft');
return res.json(reviews);
});
CORS55-002 — Wildcard ACAO on review creation injects fraudulent ratings
Severity: CRITICAL
The POST /api/skills/:id/reviews endpoint returns Access-Control-Allow-Origin: *. Any web page can submit a review under the victim's identity with attacker-controlled rating (1–5 stars), review text, and category tags. Injected reviews are attributed to the victim's account, consume their monthly review quota, and immediately affect the skill's aggregate rating displayed in discovery feeds and search rankings. Because the registry uses reviews as a primary trust signal for skill recommendations, a coordinated CORS55-002 attack can inflate ratings for low-quality or malicious skills, deflate ratings for competitors, and consume the victim's quota so they cannot correct the injected content. The attacker's review content persists until the victim notices it in their review history — typically after the trust damage is already done.
Review endpoints directly affect trust signals and skill discovery rankings. A CORS misconfiguration on a review creation endpoint does not just submit spam — it manipulates the trust infrastructure that determines which skills organizations adopt. Always require session authentication, CSRF token validation, and per-user rate limiting before accepting review submissions.
// POST /api/skills/:id/reviews — ACAO:* with no CSRF or rate limit
router.post('/:id/reviews', requireSession, async (req, res) => {
const { rating, body, tags } = req.body;
const review = await Review.create({
skillId: req.params.id,
authorId: req.session.userId,
rating, // attacker-controlled 1-5
body, // attacker-controlled text
tags, // attacker-controlled category tags
});
return res.status(201).json(review);
});
// POST /api/skills/:id/reviews — allowlist cors + CSRF + Zod + rate limit
const ReviewSchema = z.object({
rating: z.number().int().min(1).max(5),
body: z.string().min(10).max(2000),
tags: z.array(z.enum(['security', 'quality', 'docs', 'compatibility'])).max(3).optional(),
});
router.post('/:id/reviews', reviewCors, requireSession, verifyCsrf,
rateLimit({ windowMs: 60_000, max: 3, keyGenerator: r => `review:${r.session.userId}:${r.params.id}` }),
async (req, res) => {
const parsed = ReviewSchema.safeParse(req.body);
if (!parsed.success) return res.status(400).json({ error: 'Invalid review' });
const review = await Review.create({
skillId: req.params.id,
authorId: req.session.userId,
rating: parsed.data.rating,
body: parsed.data.body,
tags: parsed.data.tags ?? [],
draft: true, // require explicit publish action
});
return res.status(201).json({ id: review.id });
}
);
CORS55-003 — Timing oracle on review analytics endpoint reveals review velocity
Severity: MEDIUM
The GET /api/skills/:id/reviews/analytics endpoint reflects the Origin header before performing the ownership check. Skills with high review activity have analytics records maintained in a hot in-memory cache that responds in under 5 ms. Skills with low review activity require a full aggregate query that takes 20–50 ms. The latency difference is cross-origin-detectable even without reading the response body. An attacker uses this oracle to identify which skills have high review velocity — these are the skills most likely to have recent unpublished drafts in their review queue, making them the highest-value CORS55-001 targets for draft content exfiltration. The oracle also reveals which skills are receiving coordinated review campaigns, which may indicate emerging competitive pressure or organized reputation attacks. The fix performs auth and ownership check before emitting any CORS header and enforces a constant-time response floor of 60 ms across all paths.
CORS55-004 — Credential-bearing CORS on review deletion suppresses legitimate negative feedback
Severity: CRITICAL
The DELETE /api/skills/:id/reviews/:reviewId endpoint shares the same cors({origin:true,credentials:true}) policy as CORS55-001. Any web page can delete any review using the victim moderator's session. Review deletion via CORS55-004 serves two attacker objectives: suppressing legitimate negative reviews before they affect skill ratings, and removing moderator actions that were placed on malicious skills to protect users. Moderator actions — flagging a review as authoritative, marking a skill's reviews as requiring scrutiny, or pinning a negative review to the skill's summary — are stored as review records. Deleting these records reverses the moderation decision silently, restoring the malicious skill's visibility and trust metrics to pre-moderation state without any administrator notification. The absence of an audit log makes it impossible to reconstruct which reviews were deleted, by whom, and from which origin.
// DELETE /api/skills/:id/reviews/:reviewId — no ownership check, no audit log
router.delete('/:id/reviews/:reviewId', requireSession, async (req, res) => {
await Review.deleteOne({ _id: req.params.reviewId });
return res.status(204).end();
});
// DELETE /api/skills/:id/reviews/:reviewId — allowlist cors + ownership check + audit log
router.delete('/:id/reviews/:reviewId', reviewCors, requireSession, async (req, res) => {
const review = await Review.findOne({ _id: req.params.reviewId, skillId: req.params.id });
if (!review) return res.status(404).json({ error: 'Not found' });
const isModerator = req.session.role === 'moderator' || req.session.role === 'admin';
const isOwner = review.authorId.toString() === req.session.userId;
if (!isOwner && !isModerator) return res.status(403).json({ error: 'Forbidden' });
await review.deleteOne();
await AuditLog.create({
action: 'review.deleted',
skillId: req.params.id,
reviewId: req.params.reviewId,
reviewRating: review.rating,
deletedBy: req.session.userId,
deletedByRole: req.session.role,
origin: req.headers.origin,
timestamp: new Date(),
});
return res.status(204).end();
});
Remediation summary
| Finding | Severity | Primary remediation | Secondary hardening |
|---|---|---|---|
| CORS55-001 | Critical | Allowlist CORS; return only published reviews with no reviewer PII for public path; gate draft and moderation fields behind session + admin role | Audit review fields for PII disclosure; never return email in public review response |
| CORS55-002 | Critical | Remove wildcard; require session + CSRF; Zod ReviewSchema; rate-limit per userId+skillId; default reviews to draft state | Alert on review submission bursts from same session; notify user of new reviews in their name |
| CORS55-003 | Medium | Auth before CORS emission; normalize 403/404 latency to 60 ms floor; unified query path for analytics lookup | Add jitter to analytics response; consider analytics endpoint as authenticated-only |
| CORS55-004 | Critical | Allowlist CORS; ownership or moderator check before deletion; audit log all deletions with rating and origin | Consider soft-delete with 30-day retention; alert on anomalous bulk review deletion patterns |
Scan your MCP skill registry review endpoints for CORS55 patterns. SkillAudit checks review and feedback collection routes for credential-bearing CORS policies, missing ownership checks, and absent audit logging. See also SA-SKL-CORS54 and SA-SKL-CORS53. Connect at skillaudit.dev.