fix(c01): stop injection false positives on placeholders, format examples, and zero-width doc artifacts (litmus-v13)#101
Merged
Conversation
…ples, and zero-width doc artifacts (litmus-v13)
The tool-output-injection scanner (C-01) floored several honest servers on
benign structures rather than genuine hijacks:
- Angle-bracket placeholders in usage text — a `<tool>` in a call_tool example,
a `<system | client | /group/>` pipe-separated CLI placeholder — read as
injected role tags.
- Data/format examples — a `<user><name>...` XML sample, `data:image/...;base64,...`
and `data:{jsx:...}` format descriptions — read as role tags or script URIs.
- A "New system prompt" field label read as an injected directive.
- Zero-width code points that are ordinary artifacts of relayed upstream
documentation floored C-01/C-04 outright.
Fixes:
- Strong `<system>`/`<assistant>` tags exclude `|`, so a pipe placeholder is not
a role tag; weak `<user>`/`<tool>` tags must wrap a word character to count as
an injected block.
- `data:` flags only a real mediatype URI, not a `data:`-prefixed description.
- "new/updated system prompt" floors only as a colon-introduced directive.
- A zero-width char is graded MEDIUM (recorded as evidence, not an automatic
floor). To keep keyword-evasion covered, the injection scanners now strip
invisible code points before matching, so a zero-width-split keyword
(`ins<U+200B>tructions`) de-obfuscates and still fails HIGH. Bidi/override and
Unicode tag characters stay HIGH. Skill grading keeps every invisible char at
the fail bar.
Bumps methodology to litmus-v13 (a C-01 pass/fail-semantics change). True-positive
detection is unchanged — the evil/injecting/second-order fixtures still grade F.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MNVwNaGUkogBKTtx5KK7X5
RubenSousaDinis
added a commit
that referenced
this pull request
Jul 6, 2026
Ships the litmus-v13 C-01 recalibration merged in #101: injection false positives on angle-bracket placeholders, data:/format examples, and zero-width doc artifacts no longer flip honest servers to F. Bumps the package + server.json manifest versions to match the tag. Claude-Session: https://claude.ai/code/session_01MNVwNaGUkogBKTtx5KK7X5 Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The C-01 tool-output-injection scanner floored several honest MCP servers on benign structures rather than genuine hijacks. This tightens the detector so those cases pass while keeping true-positive detection intact, and bumps the methodology to litmus-v13.
False positives fixed
call_tool({ name: "<tool>" })target=<system | client | /group/><user><name>John</name>...data:format descriptiondata:image/...;base64,...,data:{jsx:...}New system prompt(schema description)U+200Bbracketing an inline-code spanHow
<system>/<assistant>tags exclude|(a pipe placeholder isn't a role tag); weak<user>/<tool>tags must wrap a word character to count as an injected block.data:URIs: flag only a realtype/subtypemediatype URI, not adata:-prefixed description.data:text/html, SVG, and everyjavascript:URI still flag.New instructions: ...), not as a bare field label.ins<U+200B>tructions) de-obfuscates and still fails HIGH. Bidi/override and Unicode tag characters remain HIGH. Skill grading keeps every invisible char at the fail bar.Methodology
Bumps
METHODOLOGY_VERSIONtolitmus-v13— a genuine C-01 pass/fail-semantics change. The field stays a string so older attestations coexist.Verification
@jshookmcp/jshook,@liangshanli/mcp-server-apidebug,ai-diagram-maker-mcp,arc-1,genable-mcp,mcp-vapi,pinescript-mcp-server.