← Security advisories

Claude MCP skill CORS misconfiguration — skill marketplace listing and storefront endpoints — SA-SKL-CORS49

SA-SKL-CORS49 documents four CORS misconfiguration patterns in MCP skill registry marketplace listing and storefront endpoints. These endpoints control how skills are presented in the marketplace: reading the full listing configuration including unpublished drafts and promotional pricing, publishing draft listings through the approval workflow, querying per-listing conversion analytics, and removing skill listings from the marketplace entirely. Credential-bearing CORS on the listing read endpoint exposes draft copy, unpublished pricing tiers, and promotional discount codes that registry operators have not yet made public. Wildcard ACAO on the publish endpoint lets any page submit unpublished skill drafts for marketplace approval, consuming the publisher's listing quota and injecting attacker-controlled content into the approval pipeline. A timing oracle on the listing analytics endpoint identifies high-conversion listings that represent the most profitable targets for the listing exfiltration attack. And credential-bearing CORS on listing deletion allows any origin to silently remove any skill from the marketplace using the victim admin's session, immediately disrupting active sales and breaking all consumer installations.

SA-SKL-CORS49 findings at a glance
CRITICALCORS49-001 — cors({origin:true,credentials:true}) on GET /api/skills/:id/listing; any origin reads full listing configuration including draft copy, unpublished pricing tiers, and promotional discount codes using victim session
HIGHCORS49-002 — ACAO: * on POST /api/skills/:id/listing/publish; any page publishes unpublished skill drafts consuming publishing quota and triggering marketplace approval workflows with attacker-controlled content; fix: remove wildcard; require session; requireRole('admin'); validate listing completeness before publish
MEDIUMCORS49-003 — ACAO origin reflection on GET /api/skills/:id/listing/analytics emitted before ownership check; timing oracle reveals listing analytics existence across all orgs, enumerating high-conversion listings as CORS49-001 targets
CRITICALCORS49-004 — cors({origin:true,credentials:true}) on DELETE /api/skills/:id/listing; any origin removes any skill from the marketplace using victim admin session, disrupting active sales and breaking consumer installations

CORS49-001 — Credential-bearing CORS on listing endpoint exposes draft copy, unpublished pricing, and promotional discount codes

The marketplace listing endpoint at GET /api/skills/:id/listing returns the complete listing configuration for a skill, including all fields that the publisher has entered but not yet made public. For authenticated admin or publisher sessions, that full record includes draft marketing copy under A/B test, unpublished pricing tiers that the publisher is planning to introduce, and promotional discount codes created for upcoming launches or partner agreements that have not yet been announced. When configured with cors({origin:true,credentials:true}), any page can read this pre-publication data using the victim session.

The practical impact of promotional code exfiltration extends well beyond the codes themselves. Promotional codes in a skill marketplace are typically tied to specific partner agreements — a 60-day free trial for newsletter subscribers, a 30% discount for conference attendees, a co-marketing credit for integration partners. Reading these codes before they launch allows an attacker to redistribute them indiscriminately, exhausting the promotional allocation before the target audience receives them. For a publisher running a launch campaign, promotional code exhaustion means the launch campaign's intended recipients receive no discount, the publisher's conversion metrics for the partner channel are corrupted, and the partner relationship is damaged by an apparent delivery failure.

Unpublished pricing tier data reveals the publisher's strategic roadmap. Knowing which tiers are being prepared — including their feature boundaries, price points, and scheduled go-live dates — gives a competitor intelligence about the publisher's near-term monetization plans before they are announced. Draft marketing copy contains the A/B test variants and positioning hypotheses the publisher is evaluating. Exfiltrating these drafts before publication allows a competitor to preemptively adjust their own positioning or publish similar messaging first.

CORS49-001 fix: Replace cors({origin:true,credentials:true}) with an explicit allowlist of known dashboard origins. Add requireSession before the CORS middleware. For public callers, return only the published listing fields — the subset of copy and pricing that has been explicitly marked as published and live. For authenticated publishers reading their own listing, return the full record. Never return promotional codes in any GET response regardless of session scope; treat them as write-only fields that can only be listed through a separate admin-authenticated endpoint that is never accessible cross-origin.

WRONG
router.get('/skills/:id/listing',
  cors({ origin: true, credentials: true }),
  async (req, res) => {
    // Returns full listing including drafts, unpublished tiers, promo codes
    const listing = await db.getListing(req.params.id, req.session);
    res.json(listing);
  }
);
RIGHT
router.get('/skills/:id/listing',
  requireSession,
  strictCors,
  async (req, res) => {
    const listing = await db.getListing(req.params.id);
    if (!listing) return res.status(404).json({ error: 'not_found' });
    const isOwner = listing.publisherId === req.session.userId;
    if (isOwner) {
      // Full record — but strip promo codes from GET response entirely
      const { promoCodes, ...safeRecord } = listing;
      return res.json(safeRecord);
    }
    // Public callers: only published fields
    return res.json({
      id: listing.id,
      name: listing.name,
      description: listing.publishedDescription,
      pricing: listing.publishedPricing,
      status: listing.status
    });
  }
);

CORS49-002 — Wildcard ACAO on listing publish endpoint allows unauthorized draft publishing and approval pipeline injection

The listing publish endpoint at POST /api/skills/:id/listing/publish submits an unpublished skill listing draft for marketplace approval, entering it into the editorial review queue and consuming one unit from the publisher's monthly publishing quota. With ACAO: *, any page can trigger this publication flow without an authenticated session. If the endpoint reads the listing draft content from a user-controlled field in the request body rather than exclusively from the canonical database record, the attacker can supply attacker-controlled copy, pricing, and feature descriptions — causing marketplace reviewers to evaluate content the legitimate publisher never authored.

Even when the endpoint reads content only from the database, unauthenticated publish triggering allows an attacker to exhaust the target publisher's monthly publishing quota by repeatedly submitting the same draft for review. Each submission creates a new review workflow, occupies a reviewer slot, and decrements the publisher's quota counter. When the publisher attempts to legitimately publish an updated version after addressing reviewer feedback, they discover their quota is exhausted and must wait until the quota resets — delaying their marketplace launch by weeks. For publishers on a time-sensitive launch schedule tied to a conference, product announcement, or marketing campaign, this delay is a direct business disruption.

Approval pipeline injection also enables a subtler attack when the marketplace triggers notifications to the publisher's configured channels on each publish event. Flooding the publish endpoint generates a stream of approval notifications — Slack messages, email alerts, and webhook callbacks — that obscure legitimate approval status changes in the noise. A publisher watching for a legitimate approval confirmation may miss it among dozens of attacker-generated notification events.

CORS49-002 fix: Remove wildcard ACAO: * and require session authentication. Add requireRole('admin') for marketplace-wide publish operations. For publisher-scoped requests, validate listing.publisherId === req.session.userId before accepting the job. Validate listing completeness against the marketplace's required fields schema before submitting for review — reject incomplete drafts with a detailed validation error rather than a queue entry. Apply per-publisher rate limiting on publish submissions to prevent quota exhaustion attacks. Always read listing content from the canonical database record, never from request body parameters.

CORS49-003 — Timing oracle on listing analytics endpoint enumerates high-conversion listings across all orgs

The listing analytics endpoint at GET /api/skills/:id/listing/analytics returns per-skill conversion statistics: how often the listing is viewed, free trial start rates, paid conversion rates, and churn rates for each pricing tier. The endpoint emits the CORS origin reflection header before executing the ownership check that determines whether the requesting session may read analytics for the target listing. This creates a timing differential: requests for listings that have analytics records but belong to a different publisher complete a full analytics aggregation query before hitting the ownership gate, while requests for listings with no analytics exit early. The latency difference is measurable from JavaScript running in an attacker-controlled page.

High-conversion listings are the most commercially valuable targets for CORS49-001's listing configuration exfiltration. Skills with high paid conversion rates represent the most successful products in the marketplace — the integrations that buyers are most willing to pay for and that generate the most recurring revenue for their publishers. Knowing which skills carry high conversion rates, combined with the full listing configuration exfiltration from CORS49-001, gives a competitor detailed intelligence about the most profitable skills' pricing structures, promotional strategies, and copy positioning. This reconnaissance chain — timing oracle via CORS49-003 to identify high-value targets, then CORS49-001 to extract their full configuration — is the most commercially damaging compound attack in the CORS49 family.

CORS49-003 fix: Move the ownership check before CORS header emission. Use a unified WHERE publisherId = req.session.userId AND skillId = req.params.id clause that returns a consistent empty result set for non-owned listings rather than a permission error after a heavier analytics aggregation. Normalize response latency for 403 and 404 paths by adding a constant-time sleep calibrated to the median analytics query duration. Apply the same fix to any listing metadata endpoint that emits CORS headers before executing authorization checks.

CORS49-004 — Credential-bearing CORS on listing deletion disrupts active sales and breaks consumer installations

The listing deletion endpoint at DELETE /api/skills/:id/listing removes the skill's marketplace listing — taking it off sale, removing it from all search and category pages, and invalidating all active consumer installations that were acquired through the marketplace. When configured with cors({origin:true,credentials:true}), any origin can trigger this removal using the victim admin's session. Unlike the index deletion in CORS48-004 which only removes the skill from search while leaving the skill record intact, listing deletion disables the billing relationship: active subscribers stop being charged, their entitlements expire, and any automatic renewal webhooks sent to the publisher cease.

The immediate business impact of an unauthorized listing deletion is the forced cancellation of all active paid subscriptions. Every subscriber who installed the skill through the marketplace receives an entitlement expiry notification, their usage stops counting against billing, and their integrations begin failing as the skill's marketplace-issued credentials are revoked. Recovering from this requires the publisher to re-create the listing, re-submit for marketplace approval, obtain a new listing ID, and ask all affected subscribers to reinstall using the new listing — a process that takes days and results in subscriber churn from users who do not bother to reinstall.

The attack is especially effective when combined with CORS49-003 to identify high-subscription-count listings first, maximizing the number of consumer installations disrupted per deletion operation. An attacker targeting a competitor's most popular skill can use the timing oracle to identify it among thousands of marketplace listings, then execute a single CORS49-004 request to wipe out its entire subscriber base.

CORS49-004 fix: Replace cors({origin:true,credentials:true}) with an explicit allowlist of known admin dashboard origins. Add requireSession and requireRole('admin'). Add an ownership check validating listing.publisherId === req.session.userId. Write a detailed audit log entry including actor, timestamp, skillId, skill name, and active subscription count at time of deletion. Send immediate notification to all active subscribers with an explanation and a link to reinstall when available. For listings with more than a threshold number of active subscriptions, require a secondary confirmation step and notify marketplace platform administrators before executing the deletion.

WRONG
router.delete('/skills/:id/listing',
  cors({ origin: true, credentials: true }),
  async (req, res) => {
    // No ownership check — any admin session removes any listing
    await marketplace.removeListing(req.params.id);
    res.json({ removed: true });
  }
);
RIGHT
router.delete('/skills/:id/listing',
  requireSession,
  strictCors,
  requireRole('admin'),
  async (req, res) => {
    const listing = await db.getListing(req.params.id);
    if (!listing || listing.publisherId !== req.session.userId) {
      return res.status(403).json({ error: 'forbidden' });
    }
    const activeSubscriptions = await billing.countActiveSubscriptions(req.params.id);
    if (activeSubscriptions > HIGH_VALUE_THRESHOLD) {
      return res.status(409).json({
        error: 'confirmation_required',
        activeSubscriptions,
        message: 'Use DELETE /skills/:id/listing/confirm for listings with active subscribers'
      });
    }
    await marketplace.removeListing(req.params.id);
    await auditLog.write({
      event: 'listing_removed',
      skillId: req.params.id,
      skillName: listing.name,
      actor: req.session.userId,
      activeSubscriptions
    });
    await notify.sendListingRemovalAlerts(req.params.id);
    res.json({ removed: true });
  }
);

SkillAudit scans your registry's marketplace listing and storefront router for all four CORS49 patterns, plus the full SA-SKL-CORS series covering credential-bearing CORS, wildcard ACAO, and timing oracle vulnerabilities. Get started free — 3 audits/month on public repos, results in 60 seconds.