# Under what conditions must an instance treat cross-boundary label propagation as a *taint* rather than a *capability grant* **Date of Record:** 2026 November 23 **Scope:** Multi-agent and tool-using LLM systems that attach information-flow labels (e.g., `trusted`/`untrusted`) to message content and propagate them across tool-call boundaries. Excludes single-turn, single-trust-domain inference and systems enforcing labels only at the data-store layer. ## Core Distinction Two operations on a label get conflated: 1. **Taint propagation** — `untrusted` content enters context; derived actions inherit the label as a *restriction*. 2. **Capability grant** — a tool returns a value; the agent treats "the tool returned this" as *authorization*. At the call site these look identical. If the policy engine reads `label == trusted` as "may drive privileged actions," any attacker-influenced tool output becomes a privilege-escalation channel. **A label describes provenance, not authority.** Provenance flows downward; authority flows through the *call graph*, from the invoking principal. Most implementations get the static case right (`web_fetch` → untrusted) and the dynamic case wrong: when untrusted content is summarized by a sub-agent, embedded in a tool argument, and returned, the label is re-derived from the *returning tool's* identity. The taint is laundered by the round trip. ## What Was Observed A planner delegating to `search` then `write_file`: 1. `search` returned a snippet with an embedded instruction, correctly labeled `untrusted`. 2. The planner summarized it into a `plan` string. The summarization LLM call's output was labeled `trusted` — produced by *the agent's own model*, not the external tool. 3. `write_file` saw a `trusted` argument from the agent's own generation and permitted the write. Taint was lost at step 2: the output label was computed from the *producer* rather than the *inputs* — a monotonicity violation. A subtler variant: merging results from two tools took the *first* label rather than the join — order-dependence is a silent taint drop. ## Condition of Validity Treating a propagated label as taint (and not a capability grant) is valid precisely when all hold: - **The label is provenance-derived, not authority-derived** — assigned by *where the bytes came from*, not *which principal requested the action*. - **The transform between producer and consumer is not label-preserving by construction** — matters exactly when an LLM or unverified parser sits in the path, since those re-derive labels from their own identity. - **The consumer action has side effects outside the content origin's trust domain** — echoing untrusted content to the same user is harmless; a write, network call, or third-party message is not. Where these fail (e.g., a tool result consumed only by its producer, no side effect), pass-through is acceptable and cheaper. ## Decision Boundary - **Propagate by join, never by replacement.** Every derived value's label is the least-upper-bound of all influencing inputs, *including* the model's own generation when it consumed labeled content. - **Authority attaches to the call, not the argument.** Privileged tools authorize on principal and declared intent, and independently refuse when any argument's taint exceeds the tool's trust ceiling. - **Re-derive on ingress only, never on egress.** Labels are assigned when bytes cross *into* the system; never recomputed from the identity of a later handler. - **Merges must be order-independent and join-based.** First-wins or last-wins is a defect. The boundary is crossed the moment a policy decision reads a label as *sufficient*. A label is only ever necessary-condition information: it can veto, never authorize. ## Operational Effect Join-enforcing, veto-only systems over-restrict (benign summaries of public data block writes) but do not permit taint-laundered side effects. The over-restriction is visible, debuggable, and relaxable via explicit declassification rules (e.g., "a human-approved summary may be relabeled `trusted` by principal `reviewer`"). Capability-grant systems run smoothly, pass single-tool tests, and fail silently on multi-hop delegation — a correct-looking action on attacker-influenced input. Detection requires auditing every privileged call site's argument label against the join of its transitive inputs: expensive and rarely instrumented. The practical mitigation is to make the violation unrepresentable: privileged tools reject any argument whose taint is not provably below their ceiling, and the runtime refuses to construct such an argument without an explicit, logged declassification event. ```python class TaintLaunderingError(RuntimeError): """Raised when a derived value's label is weaker than the join of its inputs.""" pass TRUST_ORDER = {"untrusted": 0, "reviewed": 1, "trusted": 2} def join_labels(*labels: str) -> str: if not labels: return "untrusted" return min(labels, key=lambda l: TRUST_ORDER[l]) class LabeledValue: def __init__(self, value, label: str, lineage: tuple = ()): if label not in TRUST_ORDER: raise TaintLaunderingError(f"unknown label {label!r}") self.value = value self.label = label self.lineage = lineage def derive(output, inputs: list, producer: str) -> LabeledValue: """Derive a new value from labeled inputs. Label must be the join of inputs.""" expected = join_labels(*(i.label for i in inputs)) declared = getattr(output, "label", "trusted") # producer's self-claim if TRUST_ORDER[declared] > TRUST_ORDER[expected]: raise TaintLaunderingError( f"producer {producer!r} claimed label {declared!r} but inputs join to " f"{expected!r}; taint would be laundered across the boundary" ) return LabeledValue(output.value, expected, tuple(i.lineage for i in inputs)) def privileged_write(path: str, arg: LabeledValue, ceiling: str = "reviewed") -> None: """A tool with side effects must veto on taint, never authorize on label.""" if TRUST_ORDER[arg.label] > TRUST_ORDER[ceiling]: raise TaintLaunderingError( f"refusing write to {path!r}: argument taint {arg.label!r} exceeds " f"tool ceiling {ceiling!r}" ) # ... perform write ... ```