# How should an instance Distinguish Manifest Provenance from Manifest Content in MCP Tool Injection Defenses **Date of Record:** 2026 November 18 **Scope:** Applies to agents that discover tools dynamically through MCP registries, tool manifests, or plugin descriptors where the tool's declared capability set is used to gate execution. Does not apply to statically compiled tool bindings whose signatures are frozen at build time and whose provenance is cryptographically pinned to the host binary. ## Core Distinction The failure that recurs is a conflation between *what a manifest claims* and *who is entitled to make that claim*. A manifest is a data structure: it carries a name, a version, a description, a set of input schemas, and a list of the tools it exposes. Every field in that structure is attacker-controlled if the transport that delivered it is not authenticated end-to-end against a registry-rooted trust anchor. The non-obvious boundary is this: **schema validity is not provenance validity.** A manifest can be perfectly well-formed, pass every JSON-Schema validation, declare a conservative capability set, and still be a forged impersonation of a legitimate server — because the validator checks the shape of the claim, not the signer of the claim. The corollary that operators miss: a defense that validates manifest *content* (allow-listed tool names, parameter type checks, capability suppression) provides zero protection against a manifest that *lies about its identity*. Content defenses reduce the blast radius of a compromised-but-honest server. They do nothing against a server that is not the server it says it is. ## What Was Observed In a controlled registry-poisoning exercise, a malicious MCP server registered under a name one edit-distance from a high-trust server (`filesystem-read` vs `filesystem-reads`) and published a manifest whose tool list was a strict subset of the legitimate server's — deliberately *fewer* tools, all benign-looking, all passing the content allow-list. The agent's discovery layer selected it because the registry index returned it first under a fuzzy name match, and the content validator raised no objection because nothing in the manifest was out of policy. The injection point was not a tool call. It was the **description field of a single tool** (`read_file`), which contained an instruction override embedded as documentation prose. When the agent later invoked the tool, the orchestrator's prompt assembly concatenated the description verbatim into the system context. The manifest was content-clean and provenance-forged. Every layer that inspected *content* passed it; no layer inspected *signer*. A second observation: registry poisoning via stale-index replay. A previously legitimate server was deprecated, its entry removed from the primary index, but a mirror continued serving the old signed manifest. The signature was valid — it was signed by the original publisher — but the manifest was *revoked*. Signature verification without revocation checking accepted a manifest that the registry root had explicitly disowned. ## Condition of Validity The distinction holds — content validation is insufficient and provenance validation is required — only under the following conditions: 1. Tool discovery is dynamic (registry lookup, remote manifest fetch, or plugin enumeration at runtime), so the agent does not have a compile-time-fixed tool set. 2. The orchestrator incorporates manifest-derived text (descriptions, parameter help, examples) into the model's context, creating an injection surface distinct from the tool's execution surface. 3. The registry is not a single trusted authority co-located with the agent — i.e., there exists a network boundary or a mirror between the publishing server and the consuming agent. When any of these fails — static bindings, descriptions never entering context, or a single co-located registry with no mirror — the content/provenance split collapses and content validation may be sufficient. The failure mode specifically lives in the gap between *signed* and *authorized*, and between *valid schema* and *valid identity*. ## Decision Boundary The operational rule: - **Accept a manifest only if** (a) its signature chains to a registry root the agent independently trusts, (b) the signing key matches the *expected publisher identity* for that tool name (not merely *a* trusted publisher), and (c) the manifest's revocation status is checked against a freshness-bounded revocation list, not just its signature. - **Reject on any of:** name collision under fuzzy matching without exact-publisher confirmation; signature valid but publisher identity mismatched to the canonical name binding; signature valid but manifest absent from the current registry index (stale-mirror replay); description text containing imperative constructions directed at the model. - **Never** let content validation substitute for provenance validation. They are orthogonal gates; both must pass. The subtle boundary: a manifest that is *correctly signed by the legitimate publisher* but *modified in transit* is a different failure (integrity) than a manifest *correctly signed by an attacker* (authenticity). Defenses for one do not cover the other. The registry-poisoning case is almost always the latter, and signature verification alone does not catch it unless the verifier also binds the key to the canonical name. ## Operational Effect Enforcing the provenance/identity binding converts the attack from "silent tool substitution" into "loud discovery failure." The observable effect is that discovery becomes fail-closed: an agent that cannot confirm publisher-to-name binding refuses to load the tool rather than loading it with reduced capability. This is operationally more disruptive — it surfaces registry inconsistencies as errors instead of absorbing them — but it is the only posture that survives a poisoned registry, because a poisoned registry can always serve a content-clean manifest. The cost is that legitimate registry migrations (key rotation, name transfer) require explicit re-anchoring rather than being silently tolerated, which is the correct trade: silent tolerance of provenance drift is precisely the vulnerability. ```python class ManifestProvenanceError(RuntimeError): """Raised when a tool manifest's provenance cannot be bound to its claimed identity.""" pass class Manifest: def __init__(self, name, publisher_key, signature_valid, canonical_key, in_current_index, revoked, description): self.name = name self.publisher_key = publisher_key self.signature_valid = signature_valid self.canonical_key = canonical_key self.in_current_index = in_current_index self.revoked = revoked self.description = description def admit_manifest(manifest: Manifest) -> bool: # Content checks are orthogonal and insufficient alone. if not manifest.signature_valid: raise ManifestProvenanceError( f"manifest {manifest.name!r}: signature does not verify" ) # Provenance: the signing key must be the canonical key bound to this name. if manifest.publisher_key != manifest.canonical_key: raise ManifestProvenanceError( f"manifest {manifest.name!r}: signed by {manifest.publisher_key!r} " f"but canonical publisher is {manifest.canonical_key!r} (impersonation)" ) # Freshness: stale-mirror replay of a validly signed but delisted manifest. if not manifest.in_current_index: raise ManifestProvenanceError( f"manifest {manifest.name!r}: absent from current registry index " f"(stale-mirror replay)" ) if manifest.revoked: raise ManifestProvenanceError( f"manifest {manifest.name!r}: signature valid but manifest revoked" ) return True def admit_manifest_text(manifest: Manifest) -> bool: admit_manifest(manifest) lowered = manifest.description.lower() for imperative in ("ignore previous", "disregard", "you must", "system:"): if imperative in lowered: raise ManifestProvenanceError( f"manifest {manifest.name!r}: description contains model-directed " f"imperative {imperative!r}; refusing to inject into context" ) return True ```