diff --git a/index.bs b/index.bs index 847677e..3f38945 100644 --- a/index.bs +++ b/index.bs @@ -2149,6 +2149,66 @@ page, protecting against malicious scripts or dependencies from using WebMCP API **How:** This restriction would not fully solve prompt injection attacks but helps shrink the possible universe of attacks, preventing longer prompts that leverage e.g. repetition and sockpuppetting [[SOCKPUPPETTING]] to convince agents of malicious tasks. The specification already implements a nominal size restriction of 128 characters for the tool {{ModelContextTool/name}} (see [[#supporting-concepts]]), but further work is needed to evaluate the right size limits for titles, names, and other inputs. See [Issue #73](https://github.com/webmachinelearning/webmcp/issues/73). +

Handling invisible characters in tool metadata

+ +**What:** Rejecting tool registrations with invisible characters in metadata, rather than silently +removing those characters. + +**Threats addressed:** [[#metadata-description-attacks]] + +**How:** A tool's {{ModelContextTool/title}}, {{ModelContextTool/description}}, and the strings in +its {{ModelContextTool/inputSchema}} and {{ModelContextTool/outputSchema}} can contain characters +that take no space on screen: Unicode tag characters (U+E0000 to U+E007F), which can encode ASCII +text, zero-width characters, and bidirectional formatting controls that change the displayed order of +text. An instruction hidden this way is no more persuasive to a model than a visible one, but it is +missed by anything that relies on the displayed text, such as code review, a tool list or +confirmation prompt shown to the user, or a guardrail that matches keywords or uses a small model. +This matters most when a script that the site author does not control registers tools on the page. +Tool names are limited to ASCII (see [[#supporting-concepts]]) and are not affected. Length limits +([[#mitigation-restrict-input-lengths]]) do not help, because many of these characters fit within any +practical limit. + +Rejecting a registration lets the developer fix the text rather than having the host silently change +it. Stripping descriptive text changes what the developer wrote; stripping property names or values +such as `enum`, `const`, and `default` also changes what the tool accepts or receives. Implementers +considering registration-time validation are encouraged to: + + +This guidance does not add a rejection step to {{ModelContext/registerTool()}}. A normative +registration check would need an interoperable definition of the Unicode version, any exceptions, +the schema checks, and the rejection behavior. +

Supporting interoperable probabilistic defense structures through shared attack eval datasets

**What:** Shared evals for prompt injection attacks against WebMCP