← Blog

Claude MCP skill privilege escalation — skill marketplace featuring and promotional placement endpoints (SA-SKL-PRIVESC66)

SA-SKL-PRIVESC66 identifies four privilege escalation vulnerabilities in MCP skill registry skill marketplace featuring and promotional placement endpoints. The marketplace featuring tier is read from a JWT featuringTier claim without a database-side verification step — crafting a JWT with featuringTier: 'homepage_hero' grants top search ranking, homepage carousel placement, and reduced listing fees without having paid for or earned the placement through editorial selection; the featuring assignment endpoint does not validate that the requested tier is higher than the publisher's current tier, allowing any publisher to assign the premium homepage_hero tier to their own skills through a direct API call that bypasses the editorial approval and paid promotion process entirely; the global featuring configuration endpoint does not check whether the requesting user owns the resource being modified, allowing any authenticated publisher to overwrite the platform-wide search ranking boost multipliers, carousel rotation schedules, and featuring algorithm weights that determine which skills appear prominently for all users; and the featuring tier cache key uses only skillId without incorporating featuringPolicyVersionId, causing revoked premium placements to persist in the cache for the full TTL duration even after an admin has explicitly revoked the homepage hero placement.

SA-SKL-PRIVESC66 findings at a glance
CRITICALPRIVESC66-001 — marketplace featuring tier read from JWT featuringTier claim — craft JWT with featuringTier:'homepage_hero' grants top search ranking, homepage carousel placement, and reduced listing fee without database-side check
CRITICALPRIVESC66-002 — POST /api/registry/marketplace/feature/assign missing tier boundary check — any publisher assigns homepage_hero featuring tier to themselves bypassing editorial approval and paid promotion process
HIGHPRIVESC66-003 — PATCH /api/registry/marketplace/featuring/config missing ownership check — any authenticated user modifies global featuring algorithm weights, homepage carousel rotation schedule, and search ranking boost multipliers affecting all skills
MEDIUMPRIVESC66-004 — marketplace featuring tier cache key uses skillId without featuringPolicyVersionId — cache entries bleed across featuring policy upgrades; revoked homepage_hero placements retained until TTL expiry

PRIVESC66-001 — JWT featuringTier claim grants homepage_hero placement without database check

The marketplace featuring system determines a skill's display tier — standard, promoted, or homepage_hero — by reading the featuringTier claim from the authenticated session JWT. Homepage hero placement gives a skill top position in search results, guaranteed carousel rotation on the homepage, and a reduced revenue share rate. Because the JWT is signed by the registry but the claim value is derived from a one-time promotional assignment stored in the database, the system is designed to trust the JWT value without re-validating it against the current database state on each request. An attacker who obtains any valid JWT and understands the claim structure — trivial from a free-tier account — crafts a new JWT payload with featuringTier: 'homepage_hero' and signs it using the same algorithm. If the JWT signing key has been compromised or if the system accepts algorithm:none, the forged JWT grants full homepage hero benefits without payment or editorial approval.

Vulnerable
// PRIVESC66-001 — VULNERABLE: JWT featuringTier trusted without DB check
router.get('/marketplace/skills',
  requireSession,
  async (req, res) => {
    // featuringTier read directly from JWT — not verified against DB
    const publisherFeaturingTier = req.session.featuringTier || 'standard';
    const skills = await db.getMarketplaceSkills({
      publisherId: req.session.userId,
      featuringTier: publisherFeaturingTier,  // attacker crafts 'homepage_hero'
      includeCarousel: publisherFeaturingTier === 'homepage_hero',
      reducedRevShare: publisherFeaturingTier === 'homepage_hero'
    });
    res.json(skills);
  }
);
Fixed
// PRIVESC66-001 — FIXED: DB-backed featuring tier lookup; JWT carries only sub
router.get('/marketplace/skills',
  requireSession,
  async (req, res) => {
    // Always fetch featuring tier from DB — JWT carries only sub (user ID)
    const featuringRecord = await db.getFeaturingTier(req.session.userId);
    const featuringTier = featuringRecord?.tier || 'standard';
    const skills = await db.getMarketplaceSkills({
      publisherId: req.session.userId,
      featuringTier,
      includeCarousel: featuringTier === 'homepage_hero',
      reducedRevShare: featuringTier === 'homepage_hero'
    });
    res.json(skills);
  }
);

JWTs are integrity-protected but not secrecy-protected — any holder can read and replay the claims. Storing authorization-sensitive state like featuring tier in a JWT claim conflates authentication (who is this user) with authorization (what are they allowed to do). Authorization decisions must be backed by the current database state, not by a claim that was correct at token issuance time but may have changed. The JWT should carry only the user's subject identifier; all privilege checks go to the database.

PRIVESC66-002 — Missing tier boundary check allows self-assignment to homepage_hero featuring

The featuring assignment endpoint allows publishers to request promotional placement for their skills. The endpoint authenticates the publisher and verifies they own the skill being featured, but it does not validate that the requested featuring tier is reachable from the publisher's current tier — specifically, that an upgrade to homepage_hero requires either editorial approval or payment confirmation. An attacker who is a standard-tier publisher sends a direct POST /api/registry/marketplace/feature/assign request with { skillId: "attacker-skill", tier: "homepage_hero" }. The endpoint validates ownership (the attacker owns their skill) and sets the featuring tier to homepage_hero immediately, granting premium placement, carousel rotation, and reduced revenue share without any payment or editorial review — benefits that legitimate publishers pay hundreds of dollars per month to access.

Vulnerable
// PRIVESC66-002 — VULNERABLE: no tier boundary check — any publisher reaches homepage_hero
router.post('/marketplace/feature/assign',
  requireSession,
  async (req, res) => {
    const { skillId, tier } = req.body;
    await requireSkillOwnership(req.session.userId, skillId);
    // No tier boundary check — attacker directly sets homepage_hero
    await db.setFeaturingTier(skillId, tier, req.session.userId);
    res.json({ featured: true, tier });
  }
);
Fixed
// PRIVESC66-002 — FIXED: FEATURING_TIER_ORDER ordinal check; homepage_hero requires admin queue
const FEATURING_TIER_ORDER = { standard: 0, promoted: 1, homepage_hero: 2 };

router.post('/marketplace/feature/assign',
  requireSession,
  async (req, res) => {
    const { skillId, tier } = req.body;
    if (!(tier in FEATURING_TIER_ORDER)) {
      return res.status(400).json({ error: 'Invalid featuring tier' });
    }
    await requireSkillOwnership(req.session.userId, skillId);
    const currentRecord = await db.getFeaturingTier(req.session.userId);
    const currentTierOrdinal = FEATURING_TIER_ORDER[currentRecord?.tier || 'standard'];
    const requestedTierOrdinal = FEATURING_TIER_ORDER[tier];
    // Cannot assign a tier at or above current tier without admin approval queue
    if (requestedTierOrdinal >= FEATURING_TIER_ORDER.homepage_hero) {
      await db.createFeaturingApprovalRequest(skillId, tier, req.session.userId);
      return res.status(202).json({ queued: true, message: 'Requires editorial approval' });
    }
    // Standard → promoted: payment confirmation required
    if (requestedTierOrdinal > currentTierOrdinal) {
      return res.status(402).json({ error: 'Payment required for tier upgrade' });
    }
    await db.setFeaturingTier(skillId, tier, req.session.userId);
    await auditLog.write({ action: 'featuring.assign', skillId, tier, actorId: req.session.userId });
    res.json({ featured: true, tier });
  }
);

Featuring tiers are ordered privileges — the boundary between them must be enforced with explicit ordinal comparisons, not just ownership checks. The FEATURING_TIER_ORDER map converts tier names to ordinals that make the boundary check unambiguous. Any request to reach homepage_hero goes into an approval queue regardless of how the request is structured; payment confirmation is required for all upgrades below that tier.

PRIVESC66-003 — Missing ownership check on featuring config allows global algorithm weight takeover

The PATCH /api/registry/marketplace/featuring/config endpoint allows updating the global featuring configuration — the search ranking boost multipliers applied to featured skills, the homepage carousel rotation schedule that determines how often each skill tier appears, and the featuring algorithm weights that bias which skills surface in category searches. The endpoint requires an authenticated session but does not verify that the requesting user has the marketplace_admin role required to modify platform-wide configuration. Any authenticated publisher can send a PATCH request directly to this endpoint with arbitrary configuration values. An attacker who sets the homepage_hero boost multiplier to 0 and their own skill's promoted multiplier to 1000 effectively hijacks the entire marketplace search ranking to surface their own skill above all homepage hero placements.

Vulnerable
// PRIVESC66-003 — VULNERABLE: no ownership check — any publisher modifies global config
router.patch('/marketplace/featuring/config',
  requireSession,
  async (req, res) => {
    // No role check — any publisher reaches this endpoint
    const updates = req.body;
    await db.updateFeaturingConfig(updates);
    res.json({ updated: true });
  }
);
Fixed
// PRIVESC66-003 — FIXED: marketplace_admin role; Zod FeaturingConfigUpdateSchema; audit log
const { z } = require('zod');

const FeaturingConfigUpdateSchema = z.object({
  homepageHeroBoostMultiplier: z.number().min(1).max(10).optional(),
  promotedBoostMultiplier: z.number().min(1).max(5).optional(),
  carouselRotationIntervalMs: z.number().int().min(5000).max(300000).optional(),
  categorySearchWeights: z.record(z.string(), z.number().min(0).max(1)).optional()
});

router.patch('/marketplace/featuring/config',
  requireSession,
  requireRole('marketplace_admin'),
  reAuthRequired,
  async (req, res) => {
    const updates = FeaturingConfigUpdateSchema.parse(req.body);
    const previous = await db.getFeaturingConfig();
    await db.updateFeaturingConfig(updates);
    await db.incrementFeaturingPolicyVersion();
    await auditLog.write({
      action: 'featuring.config.update',
      actorId: req.session.userId,
      before: previous,
      after: { ...previous, ...updates },
      at: new Date()
    });
    res.json({ updated: true });
  }
);

Global algorithm configuration is a high-impact resource — a single write affects every skill's visibility for every user. The Zod schema enforces min/max bounds on each multiplier, preventing extreme values that would effectively demote all competing skills to zero visibility. The audit log with before/after diff is essential for detecting and reversing a takeover: without it, there is no forensic record of what changed and no path to restoration without a full database backup restore.

PRIVESC66-004 — Featuring tier cache key missing policyVersionId retains revoked homepage_hero placements

The marketplace featuring tier is cached in Redis with a cache key of featuring-tier:{skillId} and a TTL of 15 minutes. When an admin revokes a publisher's homepage_hero placement — for example, because a fraudulent payment was detected or the featuring assignment was obtained through PRIVESC66-002 — the revocation writes the new standard tier to the database and invalidates the cache entry. However, because the cache key does not incorporate the featuringPolicyVersionId that is incremented on every featuring configuration change, the revocation's cache invalidation only works for the specific Redis key that currently holds the value. If the cache has already expired and been repopulated before the revocation, or if the publisher has multiple active cache entries due to regional caching, the old homepage_hero value may persist and continue to be served for up to 15 minutes after revocation.

Vulnerable
// PRIVESC66-004 — VULNERABLE: cache key missing policyVersionId
async function getFeaturingTierCached(skillId) {
  const cacheKey = `featuring-tier:${skillId}`;  // no policyVersionId
  const cached = await redis.get(cacheKey);
  if (cached) return JSON.parse(cached);
  const tier = await db.getFeaturingTier(skillId);
  await redis.setex(cacheKey, 900, JSON.stringify(tier));  // 15 min TTL
  return tier;
}

async function revokeFeaturingTier(skillId) {
  await db.setFeaturingTier(skillId, 'standard', 'system');
  await redis.del(`featuring-tier:${skillId}`);  // may not catch all variants
}
Fixed
// PRIVESC66-004 — FIXED: cache key includes policyVersionId; revoke bumps version
async function getFeaturingTierCached(skillId) {
  const policyVersion = await db.getFeaturingPolicyVersion();
  const cacheKey = `featuring-tier:${policyVersion}:${skillId}`;
  const cached = await redis.get(cacheKey);
  if (cached) return JSON.parse(cached);
  const tier = await db.getFeaturingTier(skillId);
  await redis.setex(cacheKey, 900, JSON.stringify(tier));
  return tier;
}

async function revokeFeaturingTier(skillId, actorId) {
  await db.setFeaturingTier(skillId, 'standard', actorId);
  // Incrementing policyVersion invalidates ALL cache entries for ALL skills —
  // new keys with the new version are written on next read; old keys become orphaned
  await db.incrementFeaturingPolicyVersion();
  await auditLog.write({
    action: 'featuring.tier.revoke',
    skillId,
    actorId,
    at: new Date()
  });
}

Cache invalidation by version increment is more reliable than explicit key deletion for security-sensitive revocations. Explicit key deletion requires knowing every cache key variant that may hold the stale value — across regions, shards, and read replicas. Version increment makes all old-version keys stale simultaneously without enumerating them. The tradeoff is a brief spike in DB reads immediately after revocation as all caches miss and re-warm with the new version. For security revocations, this cost is always worth paying.

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

SkillAudit checks for all SA-SKL-PRIVESC vulnerability patterns including JWT claim trust without database verification, missing tier boundary checks in promotional systems, missing ownership checks on global configuration endpoints, and cache key designs that allow revoked privileges to persist. Get a graded report with line-level code fixes in 60 seconds.

Get a free audit