# Under what conditions must an instance treat a taint label as invalidated by capability re-scoping across an MCP server boundary **Date of Record:** 2026 November 29 **Scope:** Applies to agents that propagate data-flow taint labels through MCP tool calls and enforce capability scopes at server boundaries. Does not apply to single-server, single-capability deployments where no re-scoping or cross-server argument marshalling occurs. ## Core Distinction The failure mode is not "tainted data reached a privileged tool." It is subtler: **a taint label was silently dropped during capability-scope re-derivation at an MCP server boundary, so the receiving server treated a tainted argument as clean because the label lived in a field the schema negotiation discarded.** The distinction that matters operationally is between *taint that is carried in-band as a structured field the transport preserves* versus *taint that is carried as a sibling annotation the transport treats as non-semantic metadata*. When an MCP server advertises a capability schema that does not include the taint field, the client's argument serializer drops the annotation to satisfy schema conformance, and the server's policy engine — which correctly checks for taint — sees a clean argument. The taint is not lost in transit; it is lost at the *conformance boundary* where the client prunes fields the server did not declare. This is a boundary condition, not a bug in either component. The client is correct to conform to the declared schema. The server is correct to trust its own schema. The invariant that breaks is the assumption that taint survives round-tripping through a schema that has no slot for it. ## What Was Observed A two-server topology: a `fetch` server (untrusted, returns web content) and a `vault` server (privileged, exposes `write_secret`). The orchestrator taints any argument derived from `fetch` output with a label `{origin: "fetch", trust: "untrusted"}` attached as an extra property on the tool-call arguments object. The `vault` server's declared input schema for `write_secret` was `{type: object, properties: {key: string, value: string}, additionalProperties: false}`. Because `additionalProperties: false` was declared, the orchestrator's serializer — implementing strict schema conformance — **stripped the `__taint` sibling property** before dispatch to pass validation. The `vault` server's policy engine inspected the received arguments for a `__taint` field, found none, and admitted the write. The trace: 1. `fetch` returns `
secret=AKIA...
`; orchestrator extracts `secret=AKIA...`. 2. Orchestrator constructs `write_secret(key="aws", value="AKIA...")` and attaches `__taint={origin:"fetch"}`. 3. Pre-dispatch conformance check validates against `vault`'s schema. `additionalProperties: false` fails on `__taint`. 4. Serializer prunes undeclared properties to pass validation. Dispatch proceeds **without** `__taint`. 5. `vault` policy engine: `if "__taint" in args: deny()`. Field absent → allow. 6. Privileged write of untrusted-origin data succeeds. The taint label was never corrupted, never raced, never dropped by a network layer. It was pruned by a *correct* conformance step against a *correct* schema. The policy engine's check was also correct against its inputs. The failure is emergent from the interaction: the schema is the authority on what fields exist, and the schema did not know about taint. Note the asymmetry that makes this non-obvious: `additionalProperties: true` servers preserve the label and enforce correctly; `additionalProperties: false` servers — the *more* security-conscious choice — silently disable taint enforcement. Tightening the schema loosens the policy. ## Condition of Validity The taint-preserving invariant holds **only** when one of these is true: - The taint label is carried in a field *declared by the server's schema* (in-band, e.g., `_meta` if the protocol reserves it and the server echoes it), OR - The transport carries taint out-of-band (a side channel keyed by call ID) that the server's policy engine consults *independently of the argument object*, OR - The client refuses to dispatch to any server whose schema cannot represent the taint carrier, failing closed. The invariant is **invalid** whenever taint is carried as an undeclared sibling property and the receiving schema declares `additionalProperties: false` (or the serializer otherwise prunes to conform). In that configuration, policy enforcement at the server is structurally unreachable for tainted data. ## Decision Boundary An instance must treat a taint label as invalidated at the moment of capability re-scoping — and refuse the privileged call — when **all** of the following hold: 1. The target server declares a schema with `additionalProperties: false` (or an equivalent closed shape), and 2. The taint carrier is a property not in that schema's `properties`, and 3. No out-of-band taint channel is registered for that server, and 4. The server's policy engine reads taint only from the argument object. If any condition is false, the label survives and normal policy applies. If all four are true, the label is *guaranteed* pruned and the instance must fail closed rather than dispatch — because dispatching produces a call the server will evaluate as clean. The decision boundary is the conjunction, not any single condition; a closed schema alone is fine if taint rides out-of-band, and an undeclared carrier alone is fine if the schema is open. ## Operational Effect The practical consequence: **schema conformance and taint propagation are in tension, and conformance wins by default.** Any orchestrator that validates before dispatch will prune taint on closed schemas unless taint is either declared in the schema or moved out-of-band. The safe architecture is to route taint through a channel the server's policy engine consults independently of the argument object — a call-ID-keyed side table populated by the client and read by the policy engine before argument inspection. The argument object is then free to conform strictly to the schema without carrying policy state, and `additionalProperties: false` becomes a genuine hardening measure rather than a silent policy bypass. The guardrail is a pre-dispatch invariant check: before sending to any server, verify that the taint carrier is representable under the target schema *or* that an out-of-band channel is active. If neither, raise and refuse. This converts a silent allow into an explicit, auditable denial. ```python class TaintCarrierUnrepresentable(RuntimeError): """Raised when a taint label cannot survive schema conformance at a server boundary.""" pass def dispatch_with_taint(server, args, taint, oob_channels): """ server: dict with 'schema' (JSON-schema-like) and 'name' args: dict of tool arguments taint: dict label, e.g. {"origin": "fetch"} oob_channels: set of server names with an active out-of-band taint channel """ schema = server["schema"] closed = schema.get("additionalProperties", True) is False declared = set(schema.get("properties", {}).keys()) # Taint carrier is an undeclared sibling property. carrier = "__taint" carrier_undeclared = carrier not in declared # Condition 1: closed schema prunes undeclared properties. # Condition 2: carrier is not in the schema's properties. # Condition 3: no out-of-band channel registered for this server. if closed and carrier_undeclared and server["name"] not in oob_channels: raise TaintCarrierUnrepresentable( f"Server {server['name']!r} declares additionalProperties:false and " f"has no out-of-band taint channel; label {taint!r} would be pruned " f"before the policy engine sees it. Refusing dispatch (fail closed)." ) if server["name"] in oob_channels: # Policy engine reads taint from the side table, not the args object. return {"server": server["name"], "args": args, "taint_channel": "oob"} # Open schema: carrier survives in-band. return {"server": server["name"], "args": {**args, carrier: taint}, "taint_channel": "inband"} ```