CORS Misconfigurations in MCP Skill Registry Review and Feedback Collection Endpoints
Review and feedback collection endpoints are the trust infrastructure of any skill registry. The aggregate ratings, written reviews, and moderation actions stored on these routes determine which skills developers adopt and which they avoid. When CORS is misconfigured on these endpoints, an attacker does not merely leak data — they can read reviewer email addresses and unpublished draft reviews that exist only in the victim's session context, inject fraudulent ratings under victim identity that persist and affect skill discovery rankings, identify which skills are under active review scrutiny using a response-timing oracle, and silently delete legitimate negative reviews using a victim moderator's session. Advisory SA-SKL-CORS55 details four distinct vulnerabilities across these endpoints that compose naturally into a compound review trust manipulation chain executable from a single malicious web page visited by any registry participant.
In this post
- Why review and feedback collection endpoints are high-value CORS targets
- CORS55-001 — Credential-bearing CORS on review list exposes reviewer PII and draft reviews
- CORS55-002 — Wildcard ACAO on review creation injects fraudulent ratings under victim identity
- CORS55-003 — Timing oracle on review analytics endpoint reveals review submission velocity
- CORS55-004 — Credential-bearing CORS on review deletion suppresses legitimate negative feedback
- Compound review trust manipulation chain
- Detection with SkillAudit AST queries
- Summary and remediation checklist
GET /api/skills/:id/reviews allows any origin with credentials to read the full review list including reviewer email addresses, unpublished draft reviews visible only to their authors, and review moderation flags used to target deletion via CORS55-004
POST /api/skills/:id/reviews returns Access-Control-Allow-Origin: *, letting any page submit attacker-controlled reviews under victim identity — consuming review quota, injecting fraudulent ratings, and poisoning skill trust scores in discovery feeds
GET /api/skills/:id/reviews/analytics reflects Origin before ownership check, creating a timing oracle that reveals review submission velocity tiers — identifying high-review-activity skills as the most valuable CORS55-001 targets for draft review exfiltration
DELETE /api/skills/:id/reviews/:reviewId allows any origin with credentials to delete any review using a victim moderator session — suppressing legitimate negative feedback and reversing moderator actions that protect users from malicious skills
Why review and feedback collection endpoints are high-value CORS targets
Unlike profile endpoints or search endpoints, review infrastructure operates at the intersection of three distinct attacker objectives. First, reviews contain structured PII: reviewer email addresses appear in populated author fields, and draft review content represents pre-publication security disclosures, compliance findings, and competitive assessments that the reviewer has not yet chosen to share publicly. Second, reviews directly manipulate trust signals: the aggregate rating and review count displayed in discovery feeds and search rankings are the primary signals that drive skill adoption decisions. Third, review moderation creates a secondary access control layer: moderator sessions carry permissions that extend across all skills in the registry, not just the skills the moderator authored.
These three properties mean that CORS misconfigurations on review endpoints create attack chains that go beyond simple data exfiltration. An attacker who can read moderation flags (CORS55-001), inject ratings (CORS55-002), identify high-velocity targets (CORS55-003), and delete reviews (CORS55-004) in sequence can systematically manipulate the trust infrastructure that the registry uses to protect its participants. The compound chain we document here requires no server-side vulnerability beyond misconfigured CORS — the attacker needs only a valid same-site origin that any registry user might visit.
Review endpoints directly affect which skills organizations adopt. Trust signal manipulation via CORS-based review injection or deletion is not equivalent to data theft — it is active interference with the safety-critical decision infrastructure that security-conscious teams use to gate MCP skill adoption. CORS misconfigurations on these routes warrant CRITICAL severity regardless of the organization's data classification policies.
CORS55-001 — Credential-bearing CORS on review list exposes reviewer PII and draft reviews
Severity: CRITICAL | Endpoint: GET /api/skills/:id/reviews
The review list endpoint is configured with cors({origin:true,credentials:true}) applied at the router level. This policy reflects any Origin header as an allowed origin while simultaneously setting Access-Control-Allow-Credentials: true. Any web page can therefore issue a credentialed cross-origin request to this endpoint and receive the full review list document in the response, including fields that the registry intends to restrict to authenticated context.
The review list document contains three categories of sensitive data. The first is reviewer email addresses, populated from the user record via Mongoose's .populate('author', 'email displayName'). Email addresses are present in the response for all reviews — including reviews from users who have not explicitly chosen to make their identity public. For skills reviewed by security researchers, compliance officers, or employees of organizations evaluating the skill for internal deployment, this represents direct PII exposure of individuals whose evaluation intent is commercially sensitive.
The second category is unpublished draft reviews. The registry allows reviewers to save draft reviews before publication — they may draft a detailed security assessment across multiple sessions, intending to refine it before making it public. These drafts are stored with a draft: true field and are not shown in the public review feed. However, because the CORS misconfiguration applies at the router level before any field filtering, the draft flag does not prevent exposure: any origin can read the full document including the draft field, the draft body content, and the draft rating that the reviewer has assigned but not yet published.
The third category is moderation flags. Review moderation flags record which reviews are under active moderator scrutiny — either because the skill publisher has disputed them, another moderator has begun a review process, or an administrator has flagged them for content policy violations. Reading moderation flags serves a tactical purpose in the compound attack chain: an attacker who knows which reviews are already under dispute can prioritize them for CORS55-004 deletion, since deletion of a review that is already under dispute is less likely to trigger anomaly detection (the system already expects the review to be in an unstable state).
// GET /api/skills/:id/reviews — cors({origin:true,credentials:true}) applied at router level
const router = express.Router();
router.use(cors({ origin: true, credentials: true })); // reflects any origin
router.get('/:id/reviews', async (req, res) => {
const reviews = await Review.find({ skillId: req.params.id })
.populate('author', 'email displayName') // exposes email to any origin
.select('+draft +moderationFlags'); // includes private fields
return res.json(reviews);
});
// GET /api/skills/:id/reviews — per-route allowlist cors + field scoping
const ALLOWED = process.env.ALLOWED_ORIGINS.split(',');
const reviewCors = cors({ origin: ALLOWED, credentials: true });
router.get('/:id/reviews', reviewCors, async (req, res) => {
const isAdmin = req.session?.role === 'admin';
const isSelf = (review) => String(review.authorId) === req.session?.userId;
const reviews = await Review.find({ skillId: req.params.id, draft: false })
.populate('author', 'displayName') // no email exposed
.select(isAdmin ? '+moderationFlags' : '-moderationFlags -draft');
// strip any draft field that slipped through
return res.json(reviews.filter(r => !r.draft));
});
The fix applies CORS on a per-route basis using an explicit allowlist of trusted origins rather than the router-level reflect-all policy. The response filters to only published (draft: false) reviews, populates only displayName (no email), and withholds moderationFlags from non-admin callers. For authenticated routes that need to show a reviewer their own draft, a separate GET /api/skills/:id/reviews/my-drafts endpoint with requireSession provides access to the caller's own unpublished content without exposing other users' drafts.
CORS55-002 — Wildcard ACAO on review creation injects fraudulent ratings under victim identity
Severity: CRITICAL | Endpoint: POST /api/skills/:id/reviews
The review creation endpoint returns Access-Control-Allow-Origin: * regardless of the origin making the request. While the endpoint does require a valid session via requireSession middleware, the wildcard ACAO means that any web page can submit a review creation request using the victim's browser session. The attacker controls the entire review body: the integer rating (1–5 stars), the text content, and the category tags that influence discovery feed categorization.
The practical consequence of wildcard ACAO on review creation extends beyond the immediate injection of a single fake review. Registry systems aggregate ratings into skill trust scores that affect ordering in search results, featured placements in discovery feeds, and recommendation engine outputs. A coordinated CORS55-002 attack against a skill with high-value placement — a skill that an organization is evaluating for security-critical deployment — can inject enough 1-star reviews to suppress it from recommended lists within a single session. Conversely, the same technique applied in reverse can inject 5-star reviews for a low-quality or malicious skill, promoting it ahead of legitimate alternatives.
Review quota is a secondary impact. The registry enforces a per-user limit on how many reviews can be submitted per month. Wildcard ACAO on review creation means that an attacker can exhaust the victim's review quota without their knowledge, preventing them from submitting legitimate reviews after the attack. The victim discovers the quota exhaustion only when they attempt to submit a real review and receive a rate-limit error — at which point the injected reviews are already affecting skill rankings.
CSRF tokens are essential on review creation endpoints. Session cookies alone do not prevent cross-site review injection when ACAO is wildcard or origin-reflecting. A same-site form submission from any page the victim visits will carry the session cookie — the CSRF token is the only defense that the server can enforce to distinguish intentional from injected submission.
// POST /api/skills/:id/reviews — ACAO:* set by upstream cors() middleware
// No CSRF check, no rate limit, no Zod schema validation
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 integer 1-5
body, // attacker-controlled text up to any length
tags, // attacker-controlled category array
});
return res.status(201).json(review);
});
// POST /api/skills/:id/reviews — allowlist cors + requireSession + CSRF + Zod + rate limit
import { z } from 'zod';
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', 'performance'])
).max(3).optional(),
});
router.post(
'/:id/reviews',
reviewCors, // per-route allowlist cors (from CORS55-001 fix)
requireSession,
verifyCsrf, // double-submit cookie or synchronizer token
rateLimit({
windowMs: 60_000,
max: 3,
keyGenerator: r => `review:${r.session.userId}:${r.params.id}`,
message: { error: 'Review rate limit exceeded' },
}),
async (req, res) => {
const parsed = ReviewSchema.safeParse(req.body);
if (!parsed.success) return res.status(400).json({ error: 'Invalid review data' });
const existing = await Review.findOne({
skillId: req.params.id,
authorId: req.session.userId,
draft: false,
});
if (existing) return res.status(409).json({ error: 'Review already submitted' });
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 before affecting ratings
});
return res.status(201).json({ id: review.id });
}
);
The fix applies five layers of control: per-route allowlist CORS removes wildcard ACAO, session authentication confirms the caller has a valid identity, CSRF token verification ensures the submission originates from a trusted page rather than a cross-site form, rate limiting caps the number of reviews per user per skill per minute, and Zod schema validation rejects malformed or oversized payloads. Reviews are created in draft: true state by default, requiring a separate publish action before they affect aggregate ratings — this provides a time window in which the legitimate user can discover and delete injected content.
CORS55-003 — Timing oracle on review analytics endpoint reveals review submission velocity
Severity: MEDIUM | Endpoint: GET /api/skills/:id/reviews/analytics
The review analytics endpoint reflects the Origin header as the value of Access-Control-Allow-Origin before the ownership check executes. This creates a timing oracle: the analytics endpoint serves cached results for skills with high review activity in under 5 ms (from an in-memory LRU cache maintained by the aggregation pipeline), while skills with low review activity require a full MongoDB aggregation query that takes 20–50 ms. The latency difference is cross-origin-detectable even without reading the response body — the browser can measure the RTT of a credentialed OPTIONS preflight followed by the actual GET and derive the response tier from the difference.
An attacker uses this oracle in the first stage of the compound attack chain. By iterating over skill IDs and measuring response latency, the attacker identifies which skills have the highest review submission velocity — these are the skills most likely to have multiple active reviewers with unpublished draft reviews in the queue. High-velocity skills are the highest-value CORS55-001 targets because a large active reviewer pool means more draft content to exfiltrate and more reviewer email addresses to harvest. The oracle also reveals which skills are receiving coordinated review campaigns, which may indicate emerging competitive pressure, an organized reputation attack, or a security disclosure process in progress — commercially sensitive information that the registry intends to withhold until reviews are published.
The timing oracle is not exploitable without the CORS misconfiguration — without origin reflection, the browser will not deliver the response RTT to the cross-origin page. The fix performs the ownership check and rate-limit enforcement before emitting any CORS header, enforces a constant-time response floor of 60 ms regardless of cache state, and unifies the 403/404 response paths to prevent status-code-based enumeration.
// GET /api/skills/:id/reviews/analytics — Origin reflected before auth check
router.get('/:id/reviews/analytics', async (req, res) => {
res.setHeader('Access-Control-Allow-Origin', req.headers.origin || '*');
res.setHeader('Access-Control-Allow-Credentials', 'true');
// ownership check runs AFTER CORS header is emitted
const skill = await Skill.findById(req.params.id);
if (!skill || skill.ownerId !== req.session?.userId) {
return res.status(403).json({ error: 'Forbidden' });
}
// cache hit: <5ms; cache miss: 20-50ms — detectable via RTT
const analytics = analyticsCache.get(req.params.id)
|| await computeAnalytics(req.params.id);
return res.json(analytics);
});
// GET /api/skills/:id/reviews/analytics — auth before CORS + constant-time floor
router.get('/:id/reviews/analytics', requireSession, async (req, res) => {
const start = Date.now();
// ownership check BEFORE any CORS header
const skill = await Skill.findOne({
_id: req.params.id,
ownerId: req.session.userId, // unified WHERE — no 403 vs 404 timing leak
});
if (!skill) {
await sleep(60 - (Date.now() - start)); // normalize latency
return res.status(404).json({ error: 'Not found' });
}
// apply allowlist CORS only after auth succeeds
reviewCors(req, res, async () => {
const analytics = analyticsCache.get(req.params.id)
|| await computeAnalytics(req.params.id);
await sleep(Math.max(0, 60 - (Date.now() - start))); // 60ms floor
return res.json(analytics);
});
});
CORS55-004 — Credential-bearing CORS on review deletion suppresses legitimate negative feedback
Severity: CRITICAL | Endpoint: DELETE /api/skills/:id/reviews/:reviewId
The review deletion endpoint shares the same router-level cors({origin:true,credentials:true}) policy as CORS55-001. Any web page can issue a credentialed DELETE request using the victim's browser session. The endpoint performs no ownership check — it deletes any review by ID regardless of whether the caller authored it, without verifying that the caller has moderator authority over the skill. Combined with the moderation flags exposed by CORS55-001, an attacker can identify exactly which reviews are worth deleting (high-impact negative reviews, reviews placed by moderators, reviews that are already under active dispute) and delete them precisely.
Review deletion via CORS55-004 serves two distinct attacker objectives. The first is straightforward trust signal manipulation: deleting legitimate negative reviews improves the skill's aggregate rating and removes the written content that would otherwise warn users about security or quality issues. This is the most commercially valuable capability for a skill publisher whose skill has received accurate negative reviews that are suppressing its adoption.
The second objective is moderator action reversal. When a moderator reviews a malicious skill, they typically create review records to document their actions — pinning a negative review, adding a warning note, or flagging the skill as requiring additional scrutiny. These records are stored as review-type documents in the same collection as user reviews. Deleting these records reverses the moderation decision silently: the warning notes disappear, the pinned reviews return to unpinned state, and the skill's review summary reverts to the pre-moderation state without any notification to the administrator who performed the original moderation. Because there is no audit log on the deletion endpoint, the administrator has no record of what was deleted, when, or from which origin.
// DELETE /api/skills/:id/reviews/:reviewId
// cors({origin:true,credentials:true}) from router.use()
// No ownership check — deletes any review by ID
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
// Per-route allowlist CORS + ownership check + moderator 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: 'Review not found' });
const isAuthor = String(review.authorId) === req.session.userId;
const isModerator = req.session.role === 'moderator' || req.session.role === 'admin';
if (!isAuthor && !isModerator) {
return res.status(403).json({ error: 'Forbidden' });
}
await review.deleteOne();
await AuditLog.create({
action: 'review.deleted',
actorId: req.session.userId,
reviewId: req.params.reviewId,
skillId: req.params.id,
origin: req.headers.origin,
deletedBy: isAuthor ? 'author' : 'moderator',
at: new Date(),
});
return res.status(204).end();
});
The fix applies per-route allowlist CORS, verifies that the caller is either the review author or a moderator before proceeding with deletion, and writes an audit log record on every deletion event. The audit log captures the acting user ID, the origin header, whether deletion was performed as author or moderator, and a timestamp — enabling administrators to reconstruct deletion activity and identify patterns consistent with cross-origin-driven moderation reversal.
Compound review trust manipulation chain
The four vulnerabilities in SA-SKL-CORS55 compose naturally into a four-stage attack executed entirely from a single malicious web page visited by any registry participant with a valid session:
| Stage | Finding | Action | Output used by |
|---|---|---|---|
| 1 — Target identification | CORS55-003 | Iterate skill IDs, measure review analytics response latency, rank skills by review submission velocity | Stage 2 target list |
| 2 — Reviewer intelligence | CORS55-001 | Read full review list for high-velocity skills; extract reviewer email addresses and unpublished draft review content | Exfiltrated PII + draft content; moderation flag map for stage 4 |
| 3 — Rating manipulation | CORS55-002 | Inject attacker-controlled reviews under victim identity; exhaust victim review quota to prevent correction | Distorted aggregate rating; quota lock-out |
| 4 — Evidence suppression | CORS55-004 | Delete target negative reviews and moderator actions identified via CORS55-001 moderation flags; no audit trail without fix | Trust signal restored to pre-negative-review state; forensic record erased |
The chain is self-reinforcing: the intelligence gathered in stages 1 and 2 makes stages 3 and 4 more precise, while stage 4 removes the forensic evidence that would otherwise allow an administrator to detect and reverse stages 2 and 3. An attacker who executes all four stages in sequence leaves the registry in a state where the targeted skill has better apparent trust metrics than before, the victim reviewer's quota is exhausted, and there is no log entry connecting the changes to a cross-origin origin.
Fixing one vulnerability in isolation is not sufficient. Patching only CORS55-002 (wildcard on review creation) while leaving CORS55-004 (credential-bearing on deletion) allows an attacker to inject reviews and then delete any counter-reviews submitted by legitimate users. Address all four findings in the same deployment to close the compound chain.
Detection with SkillAudit AST queries
SkillAudit's static analysis engine detects the three CORS patterns that drive SA-SKL-CORS55 findings using three query classes applied to the skill's source tree:
Query class 1 — Wildcard or origin-reflecting CORS on review and feedback routes. Flags any route handler on paths matching /reviews, /feedback, /ratings, or /comments that sets Access-Control-Allow-Origin: * or passes origin: true to cors(). This query catches both CORS55-001 and CORS55-002 patterns in a single pass. The query additionally flags cases where a router.use(cors({...})) call precedes any route handler on these paths, since router-level policies apply to all subsequent handlers regardless of their own CORS configuration.
Query class 2 — CORS emission before authentication or ownership check in route chain. Traces the middleware chain of each route handler to verify that requireSession, ownership verification logic (a lookup comparing document owner ID to req.session.userId), and rate-limit middleware all execute before any res.setHeader('Access-Control-Allow-Origin', ...) call or cors() invocation that uses origin: true or a reflect pattern. Routes where CORS is emitted before auth — as in CORS55-003 — are flagged as timing oracle risks. The query specifically looks for the pattern where res.setHeader appears in the function body before the first database lookup that includes a session-based condition.
Query class 3 — DELETE review and feedback routes without audit log write. Flags any DELETE handler on review or feedback resource paths that does not include an AuditLog.create(), db.insert(), or equivalent audit event write before the response is sent. This catches CORS55-004 and similar patterns where destructive operations on trust-critical records occur without leaving a forensic trail. The query treats any deleteOne(), findOneAndDelete(), or remove() on a document collection related to reviews as a deletion event that must be paired with a corresponding audit write.
All three queries are part of the CORS-REVIEW-TRUST query family in SkillAudit's registry security ruleset. Run them against your skill's source tree before submitting to any registry — a green audit badge on these queries signals that your review infrastructure cannot be used as a cross-origin attack surface against your users. See the SA-SKL-CORS55 advisory for the full finding set, and the SA-SKL-CORS54 advisory for the same pattern applied to install and deployment pipeline endpoints.
Summary and remediation checklist
| Finding | Severity | Root cause | Remediation |
|---|---|---|---|
| CORS55-001 | Critical | cors({origin:true,credentials:true}) at router level on review list |
Per-route allowlist CORS; requireSession for draft/PII fields; populate only displayName |
| CORS55-002 | Critical | ACAO: * on review creation; no CSRF, no rate limit, no Zod |
Remove wildcard; requireSession + verifyCsrf + rateLimit; Zod ReviewSchema; draft-first creation |
| CORS55-003 | Medium | Origin reflected before ownership check in analytics route | Auth before CORS emission; constant-time 60ms floor; unified WHERE clause |
| CORS55-004 | Critical | cors({origin:true,credentials:true}) on delete route; no ownership check; no audit log |
Allowlist CORS; ownership or moderator check; AuditLog.create() on every deletion |
CORS policy should be configured at the route level, not the router level. The most common root cause across all SA-SKL-CORS55 findings is a single router.use(cors({origin:true,credentials:true})) call that propagates a permissive policy to every subsequent handler regardless of their sensitivity. Apply cors() per route, with explicit origin allowlists derived from environment variables, so that a single misconfigured router cannot expose all review infrastructure simultaneously. See also: SA-SKL-CORS53 (search and discovery feed) for the same pattern on a different endpoint group.
Related advisories: SA-SKL-CORS55 | SA-SKL-CORS54 (install pipeline) | SA-SKL-CORS53 blog (search & discovery)