Skip to content

WebMCP-Phalanx: Establishing Trust Boundaries for In-Browser LLM Agent Tool CallsWebMCP-Phalanx: Enforcing and Characterizing Trust Boundaries for Browser-Integrated LLM Agents

Paper Tracker· arXiv:2608.24017· Lin-Fa Lee, YI-YU Chang, Kuo-Hui Yeh·Indexed by this site · 2026-10-03· Originally publishedDefenses

Quick read

Defenses

Based on the paper PDF (AI-generated); refer to the original

Phalanx uses browser capability credentials and Q/P dual-agent isolation of the WebMCP tool surface; description injection L3 is 0/80, return-value residue 2/80.

Threat modelThe attacker is a page script of the same origin as the legitimate site (a compromised ad SDK or a poisoned analytics script), can execute arbitrary JavaScript, access the same tool registry, and load before or after legitimate scripts. It holds only the capability credential of tools it registered itself. Browser extensions are out of scope. The goal is to induce calls to malicious tools, exfiltrate data, or hijack control flow.

Questions
The WebMCP draft exposes callable tools from webpages to LLM agents, but execution is under the browser's same-origin policy, with the main program and third-party scripts sharing the same origin. The authors state that this leads to subject attribution forgery, tool lifecycle loss of control, and semantic prompt injection, independent of any particular language model.
Methods
WebMCP-Phalanx separates provenance verification from semantic execution. The browser issues an unforgeable capability handle, and synthesizes Green/Yellow/Red labels from provenance, lifecycle and execution trace. Q, which has no tool rights, checks the description, schema and returned content, and only after passing is it handed to P, which has call rights.
Experiments and results
The authors report that revocation and overwriting drop from 20/20 to 0/20. Description injection is 0/80 under multi-agent adjudication, and return-content injection has a residue of 2/80. Cross-page, clearing only the tool still leaves an attack success rate of 70%, and with the framework added it is 0%. A white-box attacker holding the classifier prompt moves the payload to the tool name, bypassing 15/16.
Limitations and future work
The authors point out that a same-origin script obtains a credential simply by registering, and principal attribution is beyond bearer capability. The polyfill simulates provenance and API completeness. Trust policy and out-of-band confirmation are not empirically evaluated. Runtime observation cannot stop first side effects. The authors believe the white-box bypass on tool names requires a call-timing gate.
Experimental setupWebMCP reference implementation (@mcp-b/global 2.3.2, 2026-06-17 draft) · Attack Success Rate、Task Completion Rate
Benchmarks
WebMCP reference implementation (@mcp-b/global 2.3.2, 2026-06-17 draft)
Metrics
Attack Success RateTask Completion Rate
AI summaryThe researchers propose WebMCP-Phalanx, a two-layer runtime architecture for W3C WebMCP in-browser LLM agent tool calls, to supplement the same-origin policy's deficiencies in tool provenance and lifecycle. The first layer uses browser-native trust anchors, binding each tool to a registered subject via cryptographically protected capability credentials, and propagates provenance labels throughout the tool lifecycle; the second layer separates semantic checking from privileged tool use, with an isolated agent without tool call permissions (Q-LLM) checking tool metadata, outputs, and page content for prompt injection, and only verified content is passed to the privileged agent (P-LLM) for execution; Q-LLM's internal state is invisible to page scripts. Experiments show that the browser-native attribution mechanism reduces revocation and overwrite attack success from 100% to 0%; the dual-agent runtime intercepts all 80 prompt injection attempts embedded in tool descriptions, and limits tool-return attacks to 2 successes out of 80, with task utility statistically indistinguishable from the no-attack baseline.

The researchers propose WebMCP-Phalanx, a two-layer runtime architecture for W3C WebMCP in-browser LLM agent tool calls, to supplement the same-origin policy's deficiencies in tool provenance and lifecycle. The first layer uses browser-native trust anchors, binding each tool to a registered subject via cryptographically protected capability credentials, and propagates provenance labels throughout the tool lifecycle; the second layer separates semantic checking from privileged tool use, with an isolated agent without tool call permissions (Q-LLM) checking tool metadata, outputs, and page content for prompt injection, and only verified content is passed to the privileged agent (P-LLM) for execution; Q-LLM's internal state is invisible to page scripts. Experiments show that the browser-native attribution mechanism reduces revocation and overwrite attack success from 100% to 0%; the dual-agent runtime intercepts all 80 prompt injection attempts embedded in tool descriptions, and limits tool-return attacks to 2 successes out of 80, with task utility statistically indistinguishable from the no-attack baseline.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    WebMCP lacks tool attribution and lifecycle guarantees under SOP; Phalanx uses browser trust anchors plus dual-agent isolation.

    Under SOP, WebMCP lets same-page scripts share a tool registry, yet provides no verifiable principal attribution, lifecycle or semantic boundary.

    • Scenario: The authors state that the W3C WebMCP draft makes web pages expose structured tools to LLM agents, and agents can directly execute page actions. The specification does not draw an explicit trust boundary among same-page parties.
    • Existing shortcomings: The authors state that four classes of weakness are independent of the specific model: the tool list has no origin, and scripts can squat on, revoke or replace; tools persist after an SPA page change; a tool claiming to be read-only can still exfiltrate; a legitimate tool hides instructions in its description or return. Isolated patches cannot eliminate them.
    • Assumption: The authors believe existing multi-LLM defenses assume the system can already distinguish trusted from untrusted content, whereas current WebMCP cannot give an unforgeable label provenance. The authors state that a capability proves continued holding, not identity.
    • Proposal: The authors propose WebMCP-Phalanx: a browser-native layer issues capability credentials and propagates trust labels; a Q-LLM with no tool-call rights checks page-supplied content, and only after passing is it handed to the P-LLM.
    • Threat model:
      • Victim system: An LLM agent interacting with web pages via WebMCP. The page registers tools with the browser, and the agent reads the list, calls, and receives returns via the browser.
      • Attacker: A compromised ad SDK or a poisoned analytics script, as a page script of the same origin as the legitimate site. Browser extensions are in an isolated world and out of scope.
      • Capabilities: Can execute arbitrary JavaScript; because of SOP can access the same registry, can register malicious tools and attempt to revoke existing tools; loading can precede or follow legitimate scripts. Holds only the credentials of tools it registered itself, and cannot present others' credentials.
      • Goal: Disrupt control flow so the agent performs harmful actions or the original task fails, including inducing calls to malicious tools, exfiltrating sensitive data, and hijacking unauthorized operations.
  2. What related research exists?

    The authors place the gap on the assumption that the registry is a priori legitimate, and argue for supplementing label provenance with browser-native credentials.

    WebMCP and Indirect Prompt Injection

    • Multi-source environment: The authors state that after LLMs enter web pages via MCP, the single trusted subject model is split (SERVERS 2025; Jing et al. 2025's MCIP).
    • Indirect prompt injection: The authors categorize related work into visual injection, conversation manipulation, and isolated data fragments, and discuss their extension in multi-source web pages.
    • Tool surface: The authors state that weaponized tool descriptions can hijack task planning (Sneh et al. 2025's ToolTweak; WANG et al.'s TrojanTools), and subsequent operations can also be polluted (Li et al. 2025a). The authors state that without tool ownership verification under flat SOP, agents have no defense at all.

    Model-Inherent Defenses

    • Single-model hardening: The authors discuss structured query isolation StruQ (Chen et al. 2025b), preference optimization SecAlign (Chen et al. 2025c), and runtime masking like AttriGuard (He et al. 2026) and MELON (Zhu et al. 2025a).
    • Authors' criticism: Delegating complex reasoning and strict safety filtering to the same model exacerbates hallucination and reduces task success rates below 45% (authors cite Wang et al.); backend-only semantic validation is insufficient to protect context integrity at the protocol layer (Jing et al. 2025).

    Multi-Agent Privilege Separation

    • Isolation and guardrails: Privtrans (Brumley and Song 2004) performs program privilege separation. IsolateGPT (Wu et al. 2024) and ACE (Li et al. 2025b) provide sandbox isolation. Kim et al. 2025, Wang et al. 2025c, Zhu et al. 2025b, and de Witt et al. 2025 use guardrails to constrain data topology to prevent privilege escalation.
    • Authors' criticism: These defenses assume the tool registry is a priori legitimate. The authors state that under SOP, malicious scripts can forge tool descriptions; after the registry is compromised at the native layer, the tools isolated by the backend are already malicious by design.

    Baselines and Environment

    • Comparison: The experiments do not reproduce the above systems, but use L0 no defense, L1 labels only, L2 rule-based stripping, L3 multi-agent content adjudication, plus a no-attack baseline and lifecycle monitoring only. The environment is the WebMCP reference implementation @mcp-b/global 2.3.2 (2026-06-17 draft). The authors write that the multi-agent and the adopted injection attack baselines use the same language model, without naming the baseline or model.

    The authors position this paper at the browser native layer: issuing unforgeable capability handles, then attaching trust labels to an asymmetric multi-agent runtime. The Discussion names Dual-LLM and CaMeL, stating they assume the system already knows which content is untrusted, but do not address where labels come from or whether adversaries can forge them.

  3. How does the paper address this problem?

    The browser issues unforgeable capabilities and assigns trust levels; Q checks semantics before passing content to P, which has tool rights.

    WebMCP-Phalanx separates provenance verification from semantic execution: the browser native layer first attaches unforgeable trust labels to tools, and downstream dual agents only route based on labels, without judging tool trustworthiness themselves. Figure 1 shows the browser-side pipeline.

    Attack Classification and Pipeline

    • Two types of exploitation: Protocol and state manipulation target the specification, e.g., modifying tool state, or exploiting incomplete cleanup on page navigation so that tools and residual semantics persist. Semantic poisoning hides instructions in structurally valid descriptions, input schemas, or post-execution return content. The two types correspond to the browser layer and the multi-agent layer, respectively.
    • Pipeline: When page scripts call registerTool, the Tool Ownership Authority takes over state; Telemetry and Lifecycle Oracle continuously evaluate; Data Boundary Authority synthesizes immutable trust levels; tools and labels then enter the Multi-Agent Runtime.

    Native Ownership and Telemetry

    • Ownership: Registration, enumeration, and revocation are placed in the browser native layer. The authors state that the registry is therefore not directly accessible to Turing-complete third-party JavaScript. After successful registration, an opaque capability handle is minted; revocation or overwrite must present this credential. Same-origin third parties can only modify tools they registered themselves. Figure 1 note: first-registered tool name occupation remains a structural limitation.
    • Attribution and lifecycle: On tools/list, unforgeable origin labels are attached from isolated state. It can indicate the source but cannot distinguish scripts sharing that source. Tools declare session or navigation. The module intercepts History API pushState, replaceState, and popstate, clearing navigation-scoped tools on SPA logical page changes, aligning lifecycle with the user-visible page rather than persisting until hard refresh.
    • Runtime observation: During execution, asynchronously monitor outbound vectors fetch, sendBeacon, Image.src, and DOM changes seen by an isolated MutationObserver, comparing with static declarations. Deviations downgrade the label to Red, written into the current output and subsequent registry reads. The authors state this is detection and containment, not relying on heavy sandboxes.

    Trust Levels

    • Two-dimensional synthesis: The provenance dimension checks whether a valid capability issued by the native layer is held. The content dimension checks whether declared behavior matches the runtime trajectory.
    • Three levels: Green means provenance is cryptographically verified and execution matches declarations, executable directly. Yellow means provenance is verified, but the declared schema changes the local environment, requiring lightweight semantic verification. Red means no legitimate provenance, or telemetry finds behavioral violations, isolated or explicitly blocked.
    • Veto boundary: The authors state the provenance dimension is designed to have absolute veto over self-reported attributes; but once a same-origin adversary registers successfully, they hold a valid capability, and this veto does not trigger.

    Asymmetric Dual Agents and Confirmation

    • Routing: P has tool call rights, Q does not. Green goes directly to P. Untrusted or suspicious content is forced into Q for semantic evaluation. The authors state adversarial instructions are absorbed by Q, thus not entering P's control flow. Q's internal state is not exposed to page scripts, including same-origin scripts.
    • Two checkpoints: At registration, Q reads static descriptions and input schemas, intercepting static prompt injection targeting planning. After execution, before return content re-enters P's operational memory, Q intercepts and cleans again, because structurally benign tools may still generate malicious payloads during execution.
    • RUI: When classification cannot be deterministic or for highly sensitive operations, the browser asks the user for confirmation via a trusted path. Only Red triggers consent; Green and Yellow are handled autonomously by the dual agents. The authors state consent is the last line, not the primary criterion. The design principle is to separate trusted sources from trusted use.
  4. What experiments did the paper conduct?

    The authors report overwrite and revocation reduced to 0/20; L3 description injection 0/80, return injection residual 2/80.

    Experimental Setup

    • Environment: Real browser; WebMCP reference implementation @mcp-b/global 2.3.2, using the 2026-06-17 draft. The reference implementation is a JavaScript polyfill. The authors state that its permissions are weaker than the native layer, and the defense metrics are a conservative lower bound. Attacks are injected via script, simulating a third-party script.
    • Models: The paper does not give the language model name. The agents in the multi-agent module use the same model, and it is the same as the adopted injection attack baseline. The contribution states a white-box characterization across two model families and three classifier prompt designs; the main text does not give names.
    • Judgment: Attack success means the agent calls a malicious tool and the receiving end receives exfiltrated data. The paper does not write LLM review or human agreement. The authors deliberately do not block detected violations in order to obtain an ASR upper bound; the browser side labels and propagates, and enforcement is on the agent side.
    • Controls: L0 no defense, L1 label only, L2 rule stripping, L3 multi-agent content judgment; also a no-attack baseline and lifecycle monitoring only.
    • Scale: Table 1 has n=80 per cell. Cross-page completion counts are written as 19/20 and 16/20. The ownership experiment is reported over 20 runs (Section 6.1). Table 4 does not report the sample size for each name tier. The paper does not report the number of repetitions or the number of queries.
    • Scenarios: The main text mentions checkout, driver installation, and cross-page transfer residue from Page A to Page B. Except for checkout L0 at 20/20 and driver installation L0 at 10/20, the paper does not state how the 80 runs are divided among scenarios.

    Main Results

    The paper does not state the language model used. According to Table 1, the numbers are attack success counts.

    Swipe horizontally to read the table

    Injection vectorL0 no defenseL1 label onlyL2 rule strippingL3 multi-agent judgment
    Description (at registration)69/8071/8025/800/80
    Returned content (after execution)42/8038/802/802/80
    • Label blind spot: The authors summarize label-only as still letting through 89% of description injections and 48% of return injections, and call it close to no defense. The malicious content of return injection does not yet exist when the label is minted at registration. On description injection, L1 is slightly higher than L0; the authors state this is because the label marks the tool as trusted, giving the agent misleading information.
    • Stripping and reading: The authors state that content-independent deletion and modification can suppress description injection, and after letting an isolated agent read the content, that channel is completely blocked. Returned content can be wholly replaced with a placeholder, so rule stripping almost blocks it, but both mechanisms leave residue. Table 2 attributes L3's return residue to invocation by tool name before carrier execution; for L2, the authors state that 1 of them is likewise, and the other 1 is channel consistent, a term the main text does not explain.
    • Utility: Description-channel task completion goes from 66/80 (L0) to 56/80 (L3). The authors state this is not a defense cost: the no-attack baseline is 61/80, with no statistically significant difference from L3 (p=0.48). L0's higher value comes from malicious tool names that fit the task in the checkout scenario; after the description is deleted the scaffold remains, so the tool name alone carries it. The authors require completion-rate comparisons to be anchored to the no-attack baseline. The abstract states that the utility of the protected runtime has no statistically significant difference from the no-attack baseline; the test written in the main text is the pair above.

    Browser-Layer Revocation, Overwrite, and Forgery

    • What was tested: Whether a third-party script holding its own capability can modify legitimate tools. The authors report that operations on legitimate tools such as checkout deterministically throw InvalidStateError.
    • Results: Overwrite and revocation (V4, V6) drop from 20/20 to 0/20; V5's legitimate response rate rises from 0/20 to 20/20 (Section 6.1). The introduction summarizes revocation and replacement under the evaluated settings as from 100% to 0%. The authors state that credentials withstood all tested forgery attempts, without giving counts.
    • Interpretation: The authors state that ownership integrity holds, but subject attribution is still only partially solved: any same-origin script obtains its own capability once registered, the origin dimension degenerates, and veto cannot be triggered against a same-origin adversary.

    Cross-Page Semantic Residue

    • Setup: Page A's tool places an instruction in returned content that guides a transfer; after navigating to Page B the tool is cleared, and whether the residual semantics still drive a transfer is observed.
    • Results: According to Table 3, no-defense ASR is 80% and completion 95%; no-attack is 0% and 100%; lifecycle monitoring only is 70% and 80%; monitoring plus this paper's framework is 0% and 100%. The main text writes that clearing only reduces completion from 19/20 to 16/20.
    • Interpretation: The authors state that clearing only the tool still leaves pure semantic residue, because the content is already in the conversation history, independent of whether the tool is still present. The countermeasure is to extend the lifecycle of trust labels to content generated by the tool, invalidating residual return labels in the history when the tool is cleared. The completion drop is not clearing harming the task: in these runs the agent accepts the residual audit claim, stops, and asks the user to confirm a fictitious transfer rather than paying. The authors state that after removing the distractor, completion is higher than clearing only.

    Name Relevance and White-Box Adaptation

    • Name tiers: Fixed injection content, varying only the degree of relevance between the name and the task (Table 4). L2's ASR goes from 0% for completely irrelevant and generic, to 25% for common steps, 55% for task domain, and 70% for critical steps; L3 is 0% in all five tiers. The authors state that rule stripping weakens because when the name fits the task the agent calls before content filtering; the multi-agent reads the content and is unaffected by name packaging. The paper does not report n per tier.
    • Scenarios: Checkout is hijacked 20/20 at L0; the authors state the malicious tool has the same function as checkout and can replace the original tool. Driver installation has no such substitution, and the authors state it is the only scenario where the attack often fails without defense (L0 is 10/20, and failed runs still complete the task). The authors state that what determines reachability is substitutability, not just whether the sequence is rigid.
    • White-box: The main evaluation tests fixed, known injections. A white-box adaptive attacker is also built, holding Q's classifier prompt and having end-to-end success feedback. The authors report that it bypasses 15 of 16 description-layer payloads, with a median of 1 rewrite round; the method is not defeating Q's semantic judgment but moving the payload onto a task-fitting tool name. The authors believe a name layer or invocation-timing gate is needed. The abstract states that this motivates deferring invocation until validation of all agent-visible tool metadata is complete.

    Other Ablations and Analyses

    • The authors state that L2's and L3's return residues are disjoint, and the equal proportions are a coincidence; some runs invoke by tool name before carrier execution or in the same round, when there is no returned content to inspect, and Q detects the carrier at 40/40 (Section 5.3).
    • There is also an exfiltration tool whose description is clean and which returns a benign status object, invisible to both content checkpoints. The authors state that content checks intercept the carrier that induces the call, not the induced call itself.
    • The authors write that in four runs, three are name-driven, and the other two are not detection failures; the counts in these two sentences cannot be directly added, and only the original text is recorded here.
    • Table 2: The registration-time label rule always fails against a same-origin adversary, because every successful registrant obtains a capability; the paper points to an appendix table, and the main text does not list that table's numbers. The returned-content label rule always fails, because the label is minted at registration, when the injected content does not yet exist.
    • The authors report that task-fitting malicious names raise utility under attack conditions (p=0.003), without stating which pair of conditions this p-value corresponds to; active attacks may also lower utility. The authors require utility to be compared only with the zero-attack baseline (Section 6.2).
    • The contribution writes that white-box results span two model families and three classifier prompt designs; the experimental section and conclusion do not give per-model-family numbers.
  5. What are some points that can be further explored?

    The authors believe same-origin principal attribution, the polyfill assumptions, and tool-name call timing remain outside the current mechanism.

    Limitations and future directions noted by the authors

    • Principal attribution: The authors state that bearer capability cannot reach principal attribution. A same-origin malicious script obtains the handle under the same conditions. JavaScript has no unforgeable script identity; document.currentScript and stack introspection can be forged by a same-origin adversary. The authors suggest the specification add native script provenance, as well as a declarative trust topology similar to CSP; evaluating its native implementation is out of scope for this paper (Discussion 6.1). A note to Figure 1 states that first-registrant occupation of a tool name remains a structural limitation.
    • polyfill: The reference implementation is a JavaScript polyfill, and two assumptions are simulated rather than native: API surface completeness, and cryptographic script provenance that does not exist in vanilla JavaScript. Provenance-related results stop at the architectural existence assumption, not a cryptographically transferable bound. The authors state that polyfill permissions are weaker than a native implementation, and the defense metrics are a conservative lower bound (Conclusion).
    • confused deputy: capability is a bearer credential. If the registrant leaks the handle, or exposes a function that revokes on its behalf, the ownership guarantee fails (Conclusion).
    • Unevaluated components: The site-declared trust policy, and the out-of-band Request User Interface, as architectural primitives for the specification, are not empirically evaluated (Conclusion).
    • Runtime observation: This is post-execution detection. The first-order side effects of an initial violation cannot be prevented. Within the observation window of asynchronous execute, the monitor may be unable to attribute DOM changes to a specific tool, causing attribution conflicts (Conclusion).
    • Future directions: First, adaptive adversaries. The main evaluation tests fixed, known injections; a white-box attacker bypasses 15 of 16 description-layer payloads, with a median of 1 rewrite round, by moving the payload to the tool name. The authors believe a name layer or call-timing gate is needed. Second, deterministic execution sandboxing: runtime observation is oriented toward detection, containment and disclosure, not prevention; preventing covert behavior inside a tool requires a browser-layer sandbox (Conclusion and Future Work).

    Experimental coverage

    • Experiments are conducted in a real browser, based on @mcp-b/global 2.3.2 and the 2026-06-17 draft; the attacker is a same-page third-party script, and browser extensions are explicitly stated to be out of scope (§3.2, §5.1).
    • The main semantic injection table is two vectors, four defense levels, with n=80 per cell (Table 1). Cross-page completion counts are written as 19/20 and 16/20 (§5.4). Ownership results are reported as 20 runs each for V4, V5, V6 (§6.1).
    • Name relevance is reported in five tiers for the ASR of L2 and L3 (Table 4). Checkout and driver installation give L0's 20/20 and 10/20 (§5.5).
    • The paper does not report the language model names used in the experiments, the sample size of each tier in Table 4, the number of forgery attempts, the number of queries, or the number of repetitions. Success is defined as calling the malicious tool and the receiving end receiving exfiltrated data; the authors state they deliberately do not block detected violations, to obtain an upper bound on ASR (§5.1).
    • The white-box adaptive attacker holds Q's classifier prompt and end-to-end success feedback; the conclusion gives 15/16 and a median of 1 rewrite round (Conclusion). The contribution states this characterization spans two model families and three classifier prompt designs; the main text does not give per-item results. The site-declared trust policy and RUI are stated by the authors to be not empirically evaluated.
  6. Summarize the main content of the paper

    Phalanx binds tool ownership with browser credentials, and Q/P separation blocks description injection, while tool names and return values still have residue.

    WebMCP-Phalanx targets WebMCP agents in the browser: supplementing tool ownership under SOP, and separating semantic checking from execution with tool rights.

    • Problem: Same-page scripts can pre-register, revoke, or replace tools; tools persist after page navigation; structurally valid tools can hide prompt injection in descriptions or returns. The authors believe multi-agent defenses lack an unforgeable "who is untrusted" label.
    • Method: The native layer binds registrants with capability handles, synthesizing provenance, lifecycle, and runtime trajectory into Green, Yellow, Red. Q without call rights performs semantic checks at registration descriptions and post-execution returns; only then does content enter P. Only Red goes to user confirmation.
    • Ownership: In the evaluated setting, revocation and overwrite drop from 20/20 to 0/20; the introduction summarizes as from 100% to 0%. Same-origin scripts can still obtain credentials for tools they registered themselves; subject attribution is only partially solved.
    • Injection and utility: Description injection is 0/80 at L3, 69/80 at L0; return content injection leaves 2/80 at L3 (Table 1). On the description channel, no-attack completion is 61/80, L3 is 56/80 (p=0.48). After cross-page tool clearing only, ASR remains 70%; with the framework, it is 0% (Table 3).
    • Name layer: The closer names match tasks, the weaker rule-based stripping; L3 remains 0% across Table 4 tiers. White-box attackers place instructions on tool names, bypassing 15/16 description-layer payloads. The authors believe call-time gating is needed, and suggest the specification add native script provenance and declarative trust topology. The specification is still in draft; the authors hope these results help W3C incorporate security design before widespread deployment.
Read originalarxiv.org