Claude MCP skill privilege escalation — skill revenue share and monetization configuration endpoints (SA-SKL-PRIVESC68)
SA-SKL-PRIVESC68 identifies four privilege escalation vulnerabilities in MCP skill registry skill revenue share and monetization configuration endpoints. PRIVESC68-001 exploits the revenue share payment pipeline's trust in a JWT revenueShareTier claim without a database-side verification step — an attacker who crafts a JWT with revenueShareTier:'premium_partner' receives 90% revenue share on all skill sales instead of the standard 70%, along with reduced transaction fees, priority payment processing, and eligibility for the monthly partner bonus pool, with zero verification that they have met the actual partner agreement criteria including minimum revenue thresholds and content quality requirements. PRIVESC68-002 exploits a missing tier boundary check on the POST /api/registry/revenue/tier/assign endpoint — any standard publisher can assign the premium_partner revenue share tier to their own account, bypassing the partner agreement signing process and minimum revenue threshold verification that the tier is contractually gated behind. PRIVESC68-003 exploits a missing ownership check on the PATCH /api/registry/revenue/config endpoint — any authenticated user can modify the platform's global revenue share percentages and transaction fee structures, affecting the payout calculations for every publisher on the platform. PRIVESC68-004 exploits a cache key construction that includes only publisherId without the revenueConfigVersionId — when an admin revokes a publisher's premium_partner tier, the cached tier entry continues to be used for revenue calculations until the TTL expires, potentially hours after the revocation event.
revenueShareTier claim — craft JWT with revenueShareTier:'premium_partner' grants 90% revenue share instead of standard 70%, reduced transaction fees, and priority payment processing without database-side checkPOST /api/registry/revenue/tier/assign missing tier boundary check — any standard publisher assigns premium_partner revenue share tier to themselves bypassing partner agreement and minimum revenue threshold requirementsPATCH /api/registry/revenue/config missing ownership check — any authenticated user modifies global revenue share percentages and transaction fee structures affecting all publishers on the platformpublisherId without revenueConfigVersionId — cache entries bleed across revenue policy updates; revoked premium_partner tier retained until TTL expiryPRIVESC68-001 — JWT revenueShareTier claim trusted without database verification
The revenue share payment pipeline reads the publisher's tier from the revenueShareTier claim in the authenticated JWT rather than performing a database lookup by publisher ID. The JWT is signed by the registry's authentication service and cannot be forged by external parties — but the claim is populated at login time from the publisher's tier at the moment of login, and the payment pipeline trusts this static snapshot rather than performing a fresh database lookup for each transaction. An attacker who obtains or creates a publisher account, then modifies their JWT payload before signing — which is possible if the token signing key is weakly protected, if there is a JWT algorithm confusion vulnerability, or if the attacker uses a lab account to study the claim format and then forges a token using a compromised signing key — can inject revenueShareTier:'premium_partner' into their JWT. The payment pipeline uses this claim to calculate payouts: premium_partner publishers receive 90% of each sale compared to 70% for standard publishers, pay a 1% transaction fee instead of 3%, receive priority in the payment processing queue, and are eligible for the monthly partner bonus pool that distributes a fixed pool across all premium_partner publishers regardless of individual performance. Even without a signing key compromise, any publisher whose tier was legitimately upgraded to premium_partner and then revoked retains their old JWT until it expires — typically 24 hours — continuing to receive inflated payouts during that window.
// PRIVESC68-001 — VULNERABLE: JWT revenueShareTier claim trusted without DB check
const { verifyJWT } = require('../auth/jwt');
async function calculatePayout(publisherId, saleAmount, token) {
const claims = verifyJWT(token);
// JWT claim used directly — no DB lookup to verify current tier
// attacker crafts JWT with revenueShareTier:'premium_partner'
const tier = claims.revenueShareTier || 'standard';
const shareRate = tier === 'premium_partner' ? 0.90 : 0.70;
const feeRate = tier === 'premium_partner' ? 0.01 : 0.03;
const payout = saleAmount * shareRate * (1 - feeRate);
return { publisherId, tier, payout };
}
Revenue share tier determines how much money the platform pays out per transaction — trusting a JWT claim instead of a database record allows an attacker to inflate their payout rate from 70% to 90%, a 28.6% increase that compounds across every transaction for the JWT lifetime. DB-backed revenue share tier lookup by publisherId ensures the current tier is always authoritative; the JWT carries only the subject identifier; any tier modification takes effect immediately on the next transaction without requiring a re-login.
// PRIVESC68-001 — FIXED: DB-backed revenue share tier lookup; JWT carries only sub
const { verifyJWT } = require('../auth/jwt');
const { db } = require('../db');
const REVENUE_SHARE_RATES = {
standard: { shareRate: 0.70, feeRate: 0.03 },
preferred: { shareRate: 0.80, feeRate: 0.02 },
premium_partner: { shareRate: 0.90, feeRate: 0.01 }
};
async function calculatePayout(publisherId, saleAmount, token) {
const claims = verifyJWT(token);
if (claims.sub !== publisherId) {
throw new Error('Token subject does not match publisher ID');
}
// Always look up current tier from DB — never trust JWT tier claim
const publisher = await db.getPublisher(publisherId);
const tier = publisher.revenueShareTier || 'standard';
const { shareRate, feeRate } = REVENUE_SHARE_RATES[tier] || REVENUE_SHARE_RATES.standard;
const payout = saleAmount * shareRate * (1 - feeRate);
return { publisherId, tier, payout };
}
CVSS score: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N — Base Score 6.5 (HIGH); integrity impact because inflated revenue share payouts represent direct financial loss to the platform on every transaction processed during the attack window.
PRIVESC68-002 — Revenue tier assignment endpoint missing tier boundary check
The POST /api/registry/revenue/tier/assign endpoint allows publishers to request a revenue share tier assignment. The endpoint is intended to allow publishers to request the preferred tier (a self-service upgrade available to publishers who have met an automated revenue threshold) while routing premium_partner tier requests through a manual review queue. However, the endpoint validates that the requesting publisher is assigning the tier to their own account but does not validate that the requested tier is at or below the maximum self-service tier. An attacker who is a standard publisher sends a request to assign revenueShareTier:'premium_partner' to their own account. The endpoint processes this request, writes the new tier to the database, and the publisher's subsequent payout calculations use the 90% revenue share rate, reduced transaction fees, and partner bonus pool eligibility — all without signing a partner agreement, demonstrating minimum revenue thresholds, or passing the content quality review that the premium_partner tier is contractually gated behind.
// PRIVESC68-002 — VULNERABLE: POST /api/registry/revenue/tier/assign missing boundary check
const express = require('express');
const { db } = require('../db');
const { requireSession } = require('../middleware/auth');
const router = express.Router();
router.post('/registry/revenue/tier/assign',
requireSession,
async (req, res) => {
const { publisherId, revenueShareTier } = req.body;
// Checks self-assignment — but no tier boundary check
// attacker sends revenueShareTier:'premium_partner' — no validation
if (publisherId !== req.session.userId) {
return res.status(403).json({ error: 'forbidden' });
}
await db.setPublisherRevenueShareTier(publisherId, revenueShareTier);
res.json({ publisherId, revenueShareTier });
}
);
module.exports = router;
The premium_partner tier is gated behind a contractual partner agreement and minimum revenue threshold that exist specifically to prevent self-assignment — this boundary check must be enforced in the API, not just in the UI flow. REVENUE_SHARE_TIER_ORDER provides an ordinal comparison that rejects self-assignment to any tier above the maximum self-service tier; premium_partner always requires a manual admin review queue entry; an audit log entry records every tier assignment with the assignment method for forensic review.
// PRIVESC68-002 — FIXED: REVENUE_SHARE_TIER_ORDER boundary; premium_partner requires admin; audit log
const express = require('express');
const { db } = require('../db');
const { requireSession } = require('../middleware/auth');
const { auditLog } = require('../audit');
const REVENUE_SHARE_TIER_ORDER = ['standard', 'preferred', 'premium_partner'];
const MAX_SELF_SERVICE_TIER = 'preferred';
const router = express.Router();
router.post('/registry/revenue/tier/assign',
requireSession,
async (req, res) => {
const { publisherId, revenueShareTier } = req.body;
if (publisherId !== req.session.userId) {
return res.status(403).json({ error: 'forbidden' });
}
const requestedOrdinal = REVENUE_SHARE_TIER_ORDER.indexOf(revenueShareTier);
const maxSelfServiceOrdinal = REVENUE_SHARE_TIER_ORDER.indexOf(MAX_SELF_SERVICE_TIER);
if (requestedOrdinal < 0) {
return res.status(400).json({ error: 'invalid tier' });
}
if (requestedOrdinal > maxSelfServiceOrdinal) {
await db.createRevenuePartnerReviewRequest(publisherId, revenueShareTier);
await auditLog.write({ action: 'revenue.tier.review_requested', publisherId, revenueShareTier, at: new Date() });
return res.json({ status: 'review_requested', message: 'premium_partner tier requires partner agreement review' });
}
await db.setPublisherRevenueShareTier(publisherId, revenueShareTier);
await auditLog.write({ action: 'revenue.tier.self_assigned', publisherId, revenueShareTier, at: new Date() });
res.json({ publisherId, revenueShareTier });
}
);
module.exports = router;
CVSS score: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N — Base Score 6.5 (HIGH); integrity impact because self-assignment to premium_partner tier bypasses the contractual and financial threshold requirements that protect the platform's revenue share economics.
PRIVESC68-003 — Global revenue share config endpoint missing ownership check
The PATCH /api/registry/revenue/config endpoint allows modification of the platform's global revenue share configuration, including the revenue share percentages for each tier, the transaction fee rates, the partner bonus pool size, and the payment processing priority queue weights. The endpoint validates that the request is authenticated but does not check that the requesting user holds the revenue_admin role required to modify global financial configuration. Any authenticated publisher — including free-tier accounts — can send a PATCH request to this endpoint and modify the global revenue share percentages. An attacker can reduce the standard publisher revenue share from 70% to 1%, increase transaction fees from 3% to 50%, drain the partner bonus pool to zero, or set all payment processing to the lowest priority queue — changes that affect every payout calculation for every publisher on the platform until an admin notices and reverts the configuration.
// PRIVESC68-003 — VULNERABLE: PATCH /api/registry/revenue/config missing ownership check
const express = require('express');
const { db } = require('../db');
const { requireSession } = require('../middleware/auth');
const router = express.Router();
router.patch('/registry/revenue/config',
requireSession,
async (req, res) => {
// No role check — any authenticated user can modify global revenue share config
await db.updateRevenueConfig(req.body);
res.json({ updated: true });
}
);
module.exports = router;
Global revenue share configuration determines how much money every publisher on the platform receives from every transaction — unauthorized modification is a platform-wide financial integrity incident that affects all publishers simultaneously. The revenue_admin role gate restricts modifications to authorized finance team members; Zod RevenueConfigUpdateSchema with min/max bounds prevents individual fields from being set to values outside the contractually reasonable range; re-authentication before each config change provides an additional barrier against session-hijack attacks; bumping the revenueConfigVersion on every update invalidates the cache for all dependent calculations.
// PRIVESC68-003 — FIXED: revenue_admin role; Zod schema with bounds; reAuthRequired; bump version; audit log
const express = require('express');
const { z } = require('zod');
const { db } = require('../db');
const { requireSession, requireRole, reAuthRequired } = require('../middleware/auth');
const { auditLog } = require('../audit');
const RevenueConfigUpdateSchema = z.object({
standardShareRate: z.number().min(0.50).max(0.80).optional(),
preferredShareRate: z.number().min(0.70).max(0.90).optional(),
premiumPartnerShareRate: z.number().min(0.85).max(0.95).optional(),
standardFeeRate: z.number().min(0.01).max(0.10).optional(),
partnerBonusPoolMonthly: z.number().int().min(0).max(100000).optional()
});
const router = express.Router();
router.patch('/registry/revenue/config',
requireSession,
requireRole('revenue_admin'),
reAuthRequired,
async (req, res) => {
const update = RevenueConfigUpdateSchema.parse(req.body);
const newVersion = await db.updateRevenueConfig(update);
await auditLog.write({
action: 'revenue.config.update',
actorId: req.session.userId,
update,
newConfigVersion: newVersion,
at: new Date()
});
res.json({ updated: true, newConfigVersion: newVersion });
}
);
module.exports = router;
CVSS score: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H — Base Score 8.1 (HIGH); integrity impact because global revenue share modification corrupts payout calculations for all publishers; availability impact because setting fee rates to maximum values or draining the bonus pool disrupts legitimate publisher payments.
PRIVESC68-004 — Revenue share tier cache key missing version ID allows revoked tier to persist
The revenue share payment pipeline caches the publisher's tier using a cache key composed solely of publisherId. When an admin revokes a publisher's premium_partner tier — for example, after discovering that PRIVESC68-002 was exploited to self-assign the tier — the revocation writes the new standard tier to the database but does not invalidate the existing cache entry for that publisher. The cache TTL for revenue share tiers is typically set to one hour to reduce database load during high-traffic payment processing windows. During this TTL window, every payment calculation for the revoked publisher still reads the cached premium_partner tier from cache and applies the 90% revenue share rate, 1% fee rate, and partner bonus pool eligibility — continuing to pay out at the inflated rate for up to one hour after the admin completed the revocation. Because the cache is keyed only by publisher, there is no mechanism to invalidate the specific publisher's cache entry without either flushing the entire cache (which degrades performance for all publishers) or waiting for the TTL to expire.
// PRIVESC68-004 — VULNERABLE: cache key uses publisherId without revenueConfigVersionId
const { cache } = require('../cache');
const { db } = require('../db');
async function getPublisherRevenueShareTier(publisherId) {
const cacheKey = `revenue-tier:${publisherId}`;
const cached = await cache.get(cacheKey);
if (cached) return cached;
const publisher = await db.getPublisher(publisherId);
await cache.set(cacheKey, publisher.revenueShareTier, { ttl: 3600 });
return publisher.revenueShareTier;
}
// Admin revokes premium_partner tier — but cache still returns premium_partner for up to 1 hour:
async function revokeRevenueShareTier(publisherId) {
await db.setPublisherRevenueShareTier(publisherId, 'standard');
// No cache invalidation — revoked tier persists in cache for TTL duration
}
Revenue tier revocation is a time-sensitive admin action — a one-hour window where payouts continue at the revoked rate represents direct financial loss that scales with transaction volume. Including revenueConfigVersionId in the cache key ensures that every revenue config update — including tier revocations — produces cache misses for the affected publisher, forcing a fresh database lookup; the revokeRevenueShareTier() function increments the publisher's revenueConfigVersion in the database, invalidating all cache entries for that publisher atomically with the revocation write.
// PRIVESC68-004 — FIXED: cache key = revenueConfigVersionId:publisherId; revoke increments version
const { cache } = require('../cache');
const { db } = require('../db');
async function getPublisherRevenueShareTier(publisherId) {
const publisher = await db.getPublisherMeta(publisherId); // lightweight meta fetch: id + revenueConfigVersion
const cacheKey = `revenue-tier:${publisher.revenueConfigVersion}:${publisherId}`;
const cached = await cache.get(cacheKey);
if (cached) return cached;
const tier = await db.getPublisherRevenueShareTier(publisherId);
await cache.set(cacheKey, tier, { ttl: 3600 });
return tier;
}
async function revokeRevenueShareTier(publisherId) {
await db.transaction(async tx => {
await tx.setPublisherRevenueShareTier(publisherId, 'standard');
await tx.incrementPublisherRevenueConfigVersion(publisherId);
// Old cache key (old version) will never be read again — new key misses and fetches 'standard'
});
}
CVSS score: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N — Base Score 4.3 (MEDIUM); integrity impact because revoked premium_partner tier continues to generate inflated payouts during the TTL window; severity is medium because exploitation requires a prior tier escalation, making this a post-exploitation persistence mechanism rather than a standalone attack.
SkillAudit checks for all SA-SKL-PRIVESC vulnerability patterns including JWT claim trust without database verification on revenue share endpoints, missing tier boundary checks on self-service tier assignment, unprotected global financial configuration endpoints, and cache key versioning gaps that allow revoked privileges to persist. Get a graded report with line-level code fixes in 60 seconds.
Get a free audit