Claude MCP skill privilege escalation — skill curator and featured listing management endpoints (SA-SKL-PRIVESC54)
SA-SKL-PRIVESC54 identifies four privilege escalation vulnerabilities in MCP skill registry curator and featured listing management endpoints. The curator access middleware reads the access level from the JWT curatorLevel claim without server-side verification against the database; forging a JWT with curatorLevel: 'registry_curator' grants unrestricted access to all featured listing slots, homepage placement controls, and cross-skill promotional campaigns. A missing level boundary check on the curator access assignment endpoint allows any skill author to assign registry_curator to themselves via a direct API call, upgrading their own role without registry admin approval. A missing ownership check on the featured listing configuration endpoint allows any authenticated user to overwrite featured listing rotation, homepage placement priority, and cross-promotion targeting for all skills in the registry. A cache key collision bug causes curator access level cache entries to persist across curator policy upgrades, allowing a user whose curator access was downgraded after a policy version change to continue operating at the previous elevated level until the cache entry expires.
curatorLevel claim — forge JWT with curatorLevel:'registry_curator' grants access to all featured listing slots, homepage placement, and cross-skill promotional campaignsPOST /api/registry/curator/access missing level boundary check — any skill author assigns registry_curator to themselves granting featured listing control without admin approvalPATCH /api/registry/featured/config missing ownership check — any authenticated user sets featured listing rotation, homepage placement priority, and cross-promotion targeting for all skillsuserId without curatorPolicyVersionId — cache entries bleed across curator policy upgrades; downgraded users retain elevated access until cache expiresPRIVESC54-001 — JWT curatorLevel claim forgery grants registry curator access to all featured listing controls
The curator access middleware reads the curatorLevel access level from the JWT payload field of the same name without cross-referencing the database to verify that the claim matches the user's actual stored access level. If the registry uses HS256 JWT signing with a weak secret, an attacker can forge a JWT by brute-forcing the secret and inserting curatorLevel: 'registry_curator'. If the registry exposes a JWT decode endpoint that returns the full payload, the attacker can confirm the claim name. Even without a weak secret, if the JWT is generated by a user-facing authentication flow that includes the curatorLevel claim from an unverified user profile field, an attacker who can update their own profile can inject the claim at profile update time.
The registry_curator access level is the highest curator tier in the registry, granting control over all featured listing slot allocations, the homepage placement priority order that determines which skills appear above the fold, and cross-skill promotional campaigns that surface skills to users who installed related skills. An attacker with forged registry_curator access can boost their own skills to the top of all featured placements across the registry, suppress competing skills by removing them from featured slots, and configure cross-promotion campaigns that direct the entire registry's user base toward attacker-controlled skills. For a registry with hundreds of thousands of active Claude users, control over homepage placement translates directly to installation volume and the ability to distribute malicious skills to a large audience under the implicit endorsement of a featured placement.
// PRIVESC54-001 — VULNERABLE
function requireCuratorLevel(requiredLevel) {
return (req, res, next) => {
// VULNERABLE: curatorLevel read from JWT claim — no database verification
const curatorLevel = req.user.curatorLevel;
if (!curatorLevel || !hasSufficientLevel(curatorLevel, requiredLevel)) {
return res.status(403).json({ error: 'Insufficient curator access' });
}
req.curatorLevel = curatorLevel;
next();
};
}
router.get('/curator/featured/slots',
requireSession,
requireCuratorLevel('registry_curator'),
async (req, res) => {
const slots = await db.featuredSlots.findAll();
res.json(slots);
}
);
Attack PoC — PRIVESC54-001: The attacker forges a JWT with curatorLevel: 'registry_curator' using a brute-forced or leaked signing secret. The curator middleware accepts the forged claim without database verification, granting access to all featured listing controls.
// PRIVESC54-001 — ATTACK PoC
// Step 1: brute-force the HS256 secret (or use a known-weak default)
// Step 2: forge a JWT with elevated curatorLevel claim
const jwt = require('jsonwebtoken');
const weakSecret = 'secret'; // or discovered via brute-force
const forgedToken = jwt.sign(
{
sub: 'attacker-user-id',
email: 'attacker@example.com',
curatorLevel: 'registry_curator', // forged claim
iat: Math.floor(Date.now() / 1000),
exp: Math.floor(Date.now() / 1000) + 3600,
},
weakSecret,
{ algorithm: 'HS256' }
);
// Step 3: use forged token to control all featured listing slots
const slots = await fetch('https://registry.example.com/api/registry/curator/featured/slots', {
headers: { Authorization: `Bearer ${forgedToken}` },
}).then(r => r.json());
// PRIVESC54-001 — FIXED
function requireCuratorLevel(requiredLevel) {
return async (req, res, next) => {
// FIXED: always verify curator level from database, never from JWT claims
const curator = await db.curatorAccess.findOne({
where: {
userId: req.user.id,
status: 'active',
policyVersionId: await db.curatorPolicies.getCurrentVersionId(),
},
});
if (!curator || !hasSufficientLevel(curator.level, requiredLevel)) {
return res.status(403).json({ error: 'Insufficient curator access' });
}
req.curatorLevel = curator.level;
next();
};
}
router.get('/curator/featured/slots',
requireSession,
requireCuratorLevel('registry_curator'),
async (req, res) => {
const slots = await db.featuredSlots.findAll();
res.json(slots);
}
);
PRIVESC54-002 — Missing level boundary check enables self-assignment of registry_curator role
The POST /api/registry/curator/access endpoint allows users to claim curator access for their own account. The endpoint validates that the requesting user is a skill author (has at least one published skill in the registry) but does not apply a maximum level boundary on the requested curator tier. Any skill author can POST a request body of { "level": "registry_curator" } and receive a registry_curator access record in the database without admin approval, because the endpoint only checks that the user has the prerequisite (skill authorship) but not that the requested level is within the range of levels that can be self-assigned.
The curator access assignment flow was designed to allow skill authors to request skill_curator access, the lowest curator tier, which grants only the ability to submit skills for featured review. The absence of a boundary check on the requested level collapses the entire curator hierarchy into a single self-service endpoint: any skill author can assign themselves any curator tier, including registry_curator (all featured slots and homepage placement), campaign_manager (cross-skill promotional campaign creation), and monetization_curator (control over paid featured placements and revenue-sharing configurations). The impact is equivalent to PRIVESC54-001 from an access scope perspective, but easier to exploit because it does not require JWT forgery — the standard authenticated API client is sufficient.
// PRIVESC54-002 — VULNERABLE
router.post('/curator/access',
requireSession,
requireSkillAuthor, // validates user has at least one published skill
async (req, res) => {
const { level } = req.body;
// VULNERABLE: no maximum level boundary — any level including registry_curator accepted
const access = await db.curatorAccess.upsert({
userId: req.session.userId,
level, // attacker-supplied level, e.g. 'registry_curator'
status: 'active',
grantedAt: new Date(),
});
res.json({ ok: true, level: access.level });
}
);
Attack PoC — PRIVESC54-002: Any skill author can POST the following to self-assign registry_curator access, gaining full featured listing control without any admin approval step.
// PRIVESC54-002 — ATTACK PoC
await fetch('https://registry.example.com/api/registry/curator/access', {
method: 'POST',
credentials: 'include',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
level: 'registry_curator', // highest tier — no boundary check prevents this
}),
});
// Attacker now has registry_curator access; can control all featured slots and homepage
// PRIVESC54-002 — FIXED
// Levels that can be self-requested; higher tiers require explicit admin grant
const SELF_REQUESTABLE_LEVELS = new Set(['skill_curator']);
router.post('/curator/access',
requireSession,
requireSkillAuthor,
async (req, res) => {
const parsed = CuratorAccessRequestSchema.safeParse(req.body);
if (!parsed.success) return res.status(422).json({ error: parsed.error.issues });
const { level } = parsed.data;
// FIXED: enforce maximum boundary on self-requestable levels
if (!SELF_REQUESTABLE_LEVELS.has(level)) {
return res.status(403).json({
error: `Level '${level}' cannot be self-assigned; submit an admin access request`,
});
}
// Self-requested access enters pending_review — not active until admin approves
const access = await db.curatorAccess.create({
userId: req.session.userId,
level,
status: 'pending_review',
requestedAt: new Date(),
});
await notifyRegistryAdmins('curator.access.requested', { userId: req.session.userId, level });
res.json({ ok: true, status: 'pending_review' });
}
);
PRIVESC54-003 — Missing ownership check on featured config allows any user to control homepage placement
The PATCH /api/registry/featured/config endpoint accepts a JSON body that specifies the featured listing rotation schedule, homepage placement priority order, and cross-promotion targeting rules for all skills in the registry. The endpoint requires only that the caller is authenticated — there is no check that the caller holds any curator access level before accepting the configuration write. Any authenticated registry user, including skill authors who have not requested curator access, can overwrite the global featured listing configuration.
The practical exploitation scenario is straightforward: an attacker with any registry account creates a minimal skill to establish authorship, then PATCHes the featured configuration to place their skills in every featured slot at the highest priority level. Because the featured configuration controls the homepage placement order across the entire registry — not just the attacker's own skills — the attack simultaneously demotes all other featured skills to lower priority positions, reducing their installation velocity while boosting the attacker's skills. Cross-promotion targeting rules can additionally be configured to direct every user who installs any skill in a popular category toward the attacker's skills as a recommended complement, multiplying the installation funnel without requiring the attacker to earn authentic recommendations through usage patterns.
// PRIVESC54-003 — VULNERABLE
router.patch('/registry/featured/config',
requireSession, // any authenticated user can reach this handler
async (req, res) => {
// VULNERABLE: no curator role check — any authenticated user writes featured config
const { rotation, homepagePriority, crossPromotionRules } = req.body;
await db.featuredConfig.upsert({
rotation,
homepagePriority,
crossPromotionRules,
updatedAt: new Date(),
updatedByUserId: req.session.userId,
});
res.json({ ok: true });
}
);
Attack PoC — PRIVESC54-003: Any authenticated user can overwrite the global featured listing configuration, boosting their own skills to all homepage slots and demoting all other featured skills.
// PRIVESC54-003 — ATTACK PoC
await fetch('https://registry.example.com/api/registry/featured/config', {
method: 'PATCH',
credentials: 'include',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
homepagePriority: [
{ skillId: 'attacker-skill-1', slot: 0, weight: 100 },
{ skillId: 'attacker-skill-2', slot: 1, weight: 100 },
{ skillId: 'attacker-skill-3', slot: 2, weight: 100 },
],
crossPromotionRules: [
{
targetCategory: '*', // all categories
recommendedSkillId: 'attacker-skill-1',
boostFactor: 10,
},
],
}),
});
// PRIVESC54-003 — FIXED
router.patch('/registry/featured/config',
requireSession,
requireCuratorLevel('registry_curator'), // FIXED: only registry curators can write featured config
verifyCsrfToken,
async (req, res) => {
const parsed = FeaturedConfigSchema.safeParse(req.body);
if (!parsed.success) return res.status(422).json({ error: parsed.error.issues });
const { rotation, homepagePriority, crossPromotionRules } = parsed.data;
// FIXED: skills in homepagePriority must exist and be active
for (const entry of homepagePriority) {
const skill = await db.skills.findByPk(entry.skillId);
if (!skill || skill.status !== 'active') {
return res.status(400).json({ error: `Skill ${entry.skillId} not found or inactive` });
}
}
await db.featuredConfig.upsert({
rotation,
homepagePriority,
crossPromotionRules,
updatedAt: new Date(),
updatedByUserId: req.session.userId,
});
await auditLog.write({
action: 'featured.config.updated',
actorId: req.session.userId,
curatorLevel: req.curatorLevel,
});
res.json({ ok: true });
}
);
PRIVESC54-004 — Cache key collision bleeds curator access across policy upgrades
The curator access middleware caches each user's access level in Redis using a cache key of the form curator:access:${userId}. The key does not incorporate the current curator policy version identifier. When the registry admin publishes a new curator policy version that changes the access levels of existing curators (for example, downgrading a former registry_curator to skill_curator after a policy violation), the existing Redis cache entries for affected users are not invalidated. Those users continue to receive their previous access level on every cache hit until the TTL expires, which may be hours or days depending on the cache configuration.
The cache bleed is exploitable in both directions: a user who was recently downgraded retains the ability to perform operations requiring their former elevated level, and a user who was recently upgraded cannot perform operations at their new level until the old cache entry expires. In the downgrade direction, the window of retained access is determined by the cache TTL, which is typically set to a long value (1–24 hours) to reduce database query load on the curator access middleware. During this window, a downgraded registry_curator who triggered a policy violation can continue manipulating featured listing configuration, potentially using the remaining access window to establish persistent effects (a cross-promotion campaign, a homepage placement change) that survive beyond the cache expiry.
// PRIVESC54-004 — VULNERABLE
async function getCuratorAccessLevel(userId) {
// VULNERABLE: cache key excludes policyVersionId — bleeds across policy upgrades
const cacheKey = `curator:access:${userId}`;
const cached = await redis.get(cacheKey);
if (cached) return cached;
const access = await db.curatorAccess.findOne({
where: { userId, status: 'active' },
});
const level = access?.level ?? null;
await redis.setex(cacheKey, 3600, level ?? '');
return level;
}
// PRIVESC54-004 — FIXED
async function getCuratorAccessLevel(userId) {
// FIXED: include policyVersionId in cache key — policy upgrade invalidates all entries
const policyVersionId = await db.curatorPolicies.getCurrentVersionId();
const cacheKey = `curator:access:${userId}:v${policyVersionId}`;
const cached = await redis.get(cacheKey);
if (cached) return cached === '__none__' ? null : cached;
const access = await db.curatorAccess.findOne({
where: {
userId,
status: 'active',
// FIXED: access record must match current policy version
policyVersionId,
},
});
const level = access?.level ?? null;
// FIXED: short TTL (5 min) — reduces bleed window on ad-hoc revocations
await redis.setex(cacheKey, 300, level ?? '__none__');
return level;
}
// FIXED: on policy version bump, old cache keys are automatically orphaned
// (new policyVersionId produces new cache key prefix — old entries expire by TTL)
async function publishCuratorPolicyVersion(newPolicyConfig) {
const newVersion = await db.curatorPolicies.create(newPolicyConfig);
// Optionally: eagerly flush old keys to reduce bleed window to zero
await redis.eval(
`local keys = redis.call('keys', ARGV[1]) for _,k in ipairs(keys) do redis.call('del',k) end return #keys`,
0,
'curator:access:*'
);
return newVersion;
}
SkillAudit detection: The scanner identifies PRIVESC54 patterns using four AST query classes: req.user.curatorLevel reads in authorization middleware without a subsequent db.curatorAccess.findOne() database verify call; db.curatorAccess.upsert() calls that use req.body.level without an allowlist intersection check; router.patch handlers on /featured/config routes with only requireSession and no curator role check; and Redis setex calls using a cache key pattern that does not include a policy version component. Submit your MCP skill registry codebase to SkillAudit for a full audit report.