← Blog

Claude MCP skill CORS misconfiguration — skill search ranking and discovery algorithm endpoints (SA-SKL-CORS86)

SA-SKL-CORS86 identifies four CORS misconfiguration vulnerabilities in MCP skill registry skill search ranking and discovery algorithm endpoints. Credential-bearing CORS on the ranking read endpoint exposes the full ranking document including algorithm signal weights that govern how the registry scores skills against one another, A/B experiment assignments revealing which ranking variants are under active evaluation, manual boost overrides that show which skills have received editorial promotion and by how much, and admin-only competitor suppression flags that record explicit editorial decisions to demote named rival skills from search results — information whose exposure hands competitors a precise map of how to game the discovery algorithm. Wildcard ACAO on the ranking boost creation endpoint allows any page to submit ranking boost requests under an admin's identity, flooding the registry's per-admin boost quota and displacing legitimate skills that earned their placement through quality review. A timing oracle on the ranking experiment probe endpoint reveals which skills are currently enrolled in an active ranking experiment, enabling targeted competitive monitoring without authentication. And credential-bearing CORS on the ranking boost deletion endpoint allows any page to silently erase the boosts that publishers have paid for through promoted placement programs or earned through the registry's quality review process, eliminating their search visibility overnight.

SA-SKL-CORS86 findings at a glance
CRITICALCORS86-001 — GET /api/skills/:id/ranking has cors({origin:true,credentials:true}) — any origin reads full ranking document including algorithm weights, A/B experiment assignments, manual boost overrides, and admin-only competitor suppression flags using victim admin session
HIGHCORS86-002 — POST /api/skills/search/ranking/boost has ACAO:* — any page creates ranking boost requests under victim admin identity; attacker floods boost requests for their own skills exhausting admin boost quota and bumping rival skills from search results
MEDIUMCORS86-003 — GET /api/skills/search/ranking/experiment reflects Origin before auth check — timing oracle reveals skills currently in a ranking experiment (experiment-active warm ~3ms vs cold ~170ms)
CRITICALCORS86-004 — DELETE /api/skills/:id/ranking/boost/:boostId has cors({origin:true,credentials:true}) — any origin deletes ranking boosts permanently reversing the discovery lift that publishers have paid for or earned through quality review

CORS86-001 — Credential-bearing CORS exposes ranking algorithm weights and competitor suppression flags

The GET /api/skills/:id/ranking endpoint returns the complete ranking document for a skill, containing both the public-facing rank score and a set of admin-only internal fields that are gated behind a role check performed after the CORS middleware has already issued permissive headers. 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 algorithm weights field contains the exact numerical coefficients that the registry applies to each ranking signal — install velocity, retention rate, audit score, review sentiment, and recency — which is the complete specification an adversary needs to systematically optimize a skill for maximum search position without genuine quality improvements. The A/B experiment assignment field reveals which ranking algorithm variant the skill is currently being evaluated under, exposing the registry's unreleased ranking logic before it reaches production. The manual boost override field shows the precise boost magnitude applied by editorial staff, disclosing whether a competitor received preferential treatment and the exact numeric advantage it confers.

The competitor suppression flags field is the most commercially sensitive component: it records explicit administrative decisions to demote specific named skills from search results, documenting which competitors the registry has judged to have violated quality standards and by how much their position has been penalized. For a competing publisher, this document is simultaneously an intelligence report on the registry's editorial decisions, a reverse-engineering guide to the ranking algorithm, and a roadmap for gaming discovery — all of which the registry's administrators intend to keep confidential. Because the CORS middleware runs before the role check, the runtime admin-field gating provides no protection: the browser has already received the CORS approval headers before the server checks whether the requester has registry_admin role, and the cross-origin read returns the full document regardless.

Vulnerable
// CORS86-001 — VULNERABLE: cors({origin:true,credentials:true}) before auth on ranking endpoint
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/ranking',
  cors({ origin: true, credentials: true }),
  requireSession,
  async (req, res) => {
    const isAdmin = req.session.roles.includes('registry_admin');
    const ranking = await db.getSkillRanking(req.params.id, {
      includeAlgorithmWeights: isAdmin,
      includeExperimentAssignment: isAdmin,
      includeBoostOverrides: isAdmin,
      includeSuppressionFlags: isAdmin
    });
    res.json(ranking);
  }
);

module.exports = router;

Competitor suppression flags record named editorial demotion decisions — exposing them discloses confidential regulatory judgments about named rival publishers that the registry has never consented to share. Admin-only ranking internals must live on a separate endpoint under an admin path prefix with its own role gate. They must never be reachable from the same route that serves public ranking data, regardless of the runtime role check that runs after CORS headers have already been sent.

Fixed
// CORS86-001 — FIXED: auth before CORS; strip admin 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 ranking endpoint — no internal fields
router.get('/skills/:id/ranking',
  requireSession,
  applyCorsAllowlist,
  async (req, res) => {
    const ranking = await db.getSkillRanking(req.params.id, {
      includeAlgorithmWeights: false,
      includeExperimentAssignment: false,
      includeBoostOverrides: false,
      includeSuppressionFlags: false
    });
    res.json(ranking);
  }
);

// Admin-only ranking internals endpoint — explicit role gate before CORS
router.get('/admin/skills/:id/ranking',
  requireSession,
  requireAdminRole,
  applyCorsAllowlist,
  async (req, res) => {
    const ranking = await db.getSkillRanking(req.params.id, {
      includeAlgorithmWeights: true,
      includeExperimentAssignment: true,
      includeBoostOverrides: true,
      includeSuppressionFlags: true
    });
    res.json(ranking);
  }
);

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 competitor suppression flags exposing named editorial decisions, effective impact escalates to CVSS 8.1.

CORS86-002 — Wildcard ACAO on ranking boost endpoint exhausts admin quota and displaces legitimate skills

The POST /api/skills/search/ranking/boost endpoint creates a ranking boost for a specified skill, granting it elevated search position for the duration of the boost window. The registry enforces a per-admin boost quota — a maximum number of active boosts an admin can maintain simultaneously — to prevent the discovery feed from being captured by a small number of heavily promoted skills. With Access-Control-Allow-Origin: * applied, any page can trigger this endpoint using a victim admin's session credentials, because the wildcard origin instructs the browser to permit cross-origin responses even when the request carries session cookies. An attacker who lures a registry admin to a malicious page can fire hundreds of boost requests per minute — all naming the attacker's own skills as the target — saturating the per-admin boost quota and preventing any legitimate boost from being applied. As a secondary effect, the flood of attacker-controlled boosts elevates the attacker's skills to the top of search results, displacing skills that earned their placement through the quality review process or through legitimate paid placement programs.

The practical consequence extends beyond the targeted admin's quota. If the registry applies a platform-wide cap on simultaneous active boosts, the attacker's flood can consume the global quota, preventing any boost from being applied by any admin until the attacker's fraudulent boosts expire. This is a denial-of-service against the registry's editorial capability executed entirely through the victim admin's legitimate session. Publishers whose boosts are displaced lose search visibility for the duration of the attack, which directly reduces their install rate and revenue during periods — such as a new version launch or a featured placement campaign — when discovery is commercially critical.

Vulnerable
// CORS86-002 — VULNERABLE: wildcard ACAO on ranking boost creation endpoint
const express = require('express');
const cors = require('cors');
const { db } = require('../db');
const { requireSession } = require('../middleware/auth');

const router = express.Router();

router.post('/skills/search/ranking/boost',
  cors({ origin: '*' }),
  requireSession,
  async (req, res) => {
    const boost = await db.createRankingBoost({
      skillId: req.body.skillId,
      boostMagnitude: req.body.boostMagnitude,
      durationHours: req.body.durationHours,
      createdBy: req.session.userId
    });
    res.json({ boostId: boost.id, status: 'active' });
  }
);

module.exports = router;

Flooding the boost quota silences legitimately promoted skills and hands an attacker top search placement without any quality review — the discovery feed becomes a reflection of the attacker's flood rate, not editorial merit. Allowlisted CORS prevents cross-origin boost creation; a per-admin rate limit of three boost creations per hour matches legitimate editorial cadence and makes flood attacks impractical; and requireAdminRole ensures only credentialed admins can create boosts at all.

Fixed
// CORS86-002 — FIXED: allowlist CORS; CSRF; per-admin rate limit 3/hr; requireAdminRole
const express = require('express');
const { db } = require('../db');
const {
  requireSession,
  requireAdminRole
} = 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/search/ranking/boost',
  requireSession,
  applyCorsAllowlist,
  csrfProtection,
  requireAdminRole,
  rateLimit({
    key: req => `ranking-boost-create:${req.session.userId}`,
    max: 3,
    window: '1h',
    message: 'Ranking boost rate limit exceeded — max 3 boosts per admin per hour'
  }),
  async (req, res) => {
    const boost = await db.createRankingBoost({
      skillId: req.body.skillId,
      boostMagnitude: req.body.boostMagnitude,
      durationHours: req.body.durationHours,
      createdBy: req.session.userId
    });
    res.json({ boostId: boost.id, status: 'active' });
  }
);

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 impact reflects fraudulent boost creation under admin identity; availability impact reflects quota exhaustion and global boost cap denial-of-service against editorial operations.

CORS86-003 — Timing oracle reveals skills enrolled in active ranking experiments via Origin reflection before auth

The GET /api/skills/search/ranking/experiment endpoint returns the ranking experiment enrollment status for a skill, indicating whether the skill is currently participating in an A/B test of a new ranking algorithm variant. Skills actively enrolled in an experiment maintain a warm experiment context in the registry's in-memory experiment cache, which returns in approximately 3ms. Skills not enrolled in any experiment incur a cold path that requires a database lookup and experiment eligibility check, taking approximately 170ms. Because the endpoint reflects the requesting Origin header before the authentication middleware executes, an unauthenticated cross-origin page can measure response latency to determine whether a given skill is currently in an active ranking experiment — without possessing any registry credentials. This timing channel allows a competitor to monitor whether the registry is actively testing a ranking change that affects a named rival, which reveals the registry's unreleased algorithmic roadmap and the specific skills selected for early exposure to new ranking logic.

The intelligence value of experiment enrollment status is non-trivial: a skill that enters a new ranking experiment is likely to see volatility in its search position during the experiment window, and a competitor who knows this in advance can time promotional campaigns or new version releases to coincide with the enrollment period — maximizing discovery capture while the competitor's position is unstable. Combined with the algorithm weight exposure from CORS86-001, a persistent attacker can map the registry's entire active experimentation surface and schedule competitive maneuvers against it without ever authenticating to the platform.

Vulnerable
// CORS86-003 — VULNERABLE: Origin reflected before auth — timing oracle on experiment status
const express = require('express');
const cors = require('cors');
const { experimentCache } = require('../cache/experiments');
const { requireSession } = require('../middleware/auth');

const router = express.Router();

router.get('/skills/search/ranking/experiment',
  cors({ origin: true }),   // reflects Origin before auth runs — timing oracle enabled
  requireSession,
  async (req, res) => {
    const { skillId } = req.query;
    const enrollment = await experimentCache.getEnrollment(skillId);
    res.json(enrollment);
  }
);

module.exports = router;

Experiment enrollment status reveals the registry's unreleased ranking roadmap — a competitor who can probe it without credentials can schedule counter-campaigns against a rival's position instability before the experiment completes. Moving authentication before CORS middleware eliminates the unauthenticated channel; a constant-time response floor of 50ms closes the residual timing gap between warm experiment cache hits and cold database lookups that would otherwise persist even after correct middleware ordering.

Fixed
// CORS86-003 — FIXED: auth before CORS; constant-time response floor 50ms
const express = require('express');
const { experimentCache } = require('../cache/experiments');
const { requireSession } = require('../middleware/auth');
const { applyCorsAllowlist } = require('../middleware/cors');

const EXPERIMENT_RESPONSE_FLOOR_MS = 50;

const router = express.Router();

router.get('/skills/search/ranking/experiment',
  requireSession,
  applyCorsAllowlist,
  async (req, res) => {
    const { skillId } = req.query;
    const start = Date.now();
    const enrollment = await experimentCache.getEnrollment(skillId);
    const elapsed = Date.now() - start;
    if (elapsed < EXPERIMENT_RESPONSE_FLOOR_MS) {
      await new Promise(r => setTimeout(r, EXPERIMENT_RESPONSE_FLOOR_MS - elapsed));
    }
    res.json(enrollment);
  }
);

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 unauthenticated measurement and discloses only enrollment status, not experiment content; remediation is nonetheless warranted given the competitive intelligence enablement against a named rival's search position.

CORS86-004 — Credential-bearing CORS deletes ranking boosts erasing paid and earned discovery lift

The DELETE /api/skills/:id/ranking/boost/:boostId endpoint permanently removes an active ranking boost from a skill, immediately reversing whatever search position lift the boost was providing. Publishers acquire ranking boosts through two mechanisms: paid promoted placement programs where the publisher pays the registry for a defined period of elevated search visibility, and earned boosts awarded by the registry's quality review team when a skill achieves a certification milestone or passes a security audit. With cors({origin:true,credentials:true}), any cross-origin page visited by an authenticated admin can silently delete any boost on any skill in the registry. An attacker who lures a registry admin to a malicious page can iterate over boost IDs for competing skills and delete all active boosts in a single session, stripping every certified and promoted skill of its search visibility simultaneously. The attack is irreversible: boost deletion removes the record from the database with no restoration path, and the publisher must either repurchase paid placement or restart the quality review process to recover their position.

The commercial damage from boost deletion is immediate and measurable. Skills whose paid boosts are deleted lose the discovery lift for which the publisher has already paid, and the registry incurs a contractual liability if the paid placement period has not expired. Skills whose quality-review boosts are deleted lose the credibility signal that their certification provided in search results, undermining the registry's core value proposition of surfacing audited, high-quality skills to users. If the attacker's goal is to suppress a specific competitor rather than the entire registry, targeted deletion of a single skill's boosts can suppress that skill from the top search results page for the duration it takes the publisher to notice, file a support ticket, and have the boost manually restored — typically measured in days during low-staffing periods.

Vulnerable
// CORS86-004 — VULNERABLE: credential-bearing CORS on ranking boost 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/ranking/boost/:boostId',
  cors({ origin: true, credentials: true }),
  requireSession,
  requireAdminRole,
  async (req, res) => {
    await db.deleteRankingBoost(req.params.id, req.params.boostId);
    res.json({ deleted: req.params.boostId });
  }
);

module.exports = router;

Paid placement boosts represent an outstanding contractual obligation to the publisher — their deletion before the paid window expires creates an immediate legal liability for the registry, independent of the security impact. Soft-delete with 30-day reinstatement window provides a recovery path for boosts deleted via this CORS attack. Re-authentication before deletion raises the bar against session-hijack exploitation. The mandatory reason field in the audit log creates the forensic record needed to distinguish legitimate administrative removal from attacker-driven deletion across all boost types including paid placements and quality-review awards.

Fixed
// CORS86-004 — FIXED: auth before CORS; re-auth; soft-delete 30-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/ranking/boost/:boostId',
  requireSession,
  applyCorsAllowlist,
  csrfProtection,
  requireAdminRole,
  reAuthRequired,
  async (req, res) => {
    const expiresAt = new Date(Date.now() + 30 * 24 * 60 * 60 * 1000);
    await db.softDeleteRankingBoost(req.params.id, req.params.boostId, {
      deletedBy: req.session.userId,
      reason: req.body.reason,
      expiresAt
    });
    await auditLog.write({
      action: 'ranking.boost.delete',
      skillId: req.params.id,
      boostId: req.params.boostId,
      actorId: req.session.userId,
      reason: req.body.reason,
      at: new Date()
    });
    res.json({ deleted: req.params.boostId, 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 impact reflects permanent erasure of paid placement contracts and quality-review certifications; availability impact reflects immediate loss of search visibility for affected skills and registry-wide trust in the boost system.

Scan your MCP skill for CORS86 and 200+ other vulnerability classes

SkillAudit checks for all SA-SKL-CORS vulnerability patterns including credential-bearing CORS before auth on ranking algorithm endpoints, wildcard ACAO on boost creation, timing oracle misconfigurations on experiment enrollment checks, and soft-delete enforcement on ranking boost deletion. Get a graded report with line-level code fixes in 60 seconds.

Get a free audit