claude-code - 💡(How to fix) Fix Prompt injection in Chrome Extension tool-result pipeline: 'Stop Claude' appended to browser responses [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#56468Fetched 2026-05-06 06:27:14
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Participants
Timeline (top)
labeled ×3

During an audit of a private GitHub repo, we observed the string Stop Claude being injected into tool results returned to the model. The injection is not in the source code, browser DOM, network response, or any browser extension — it occurs inside the tool-result pipeline between the Chrome Extension and the model.

Root Cause

The injection happens after the browser renders the page but before the tool result reaches the model. This points to either:

  1. A deliberate prompt-injection canary embedded by Anthropic in the tool-result post-processing pipeline to test model resistance
  2. A bug in the text-extraction layer that occasionally appends test/debug data
RAW_BUFFERClick to expand / collapse

Summary

During an audit of a private GitHub repo, we observed the string Stop Claude being injected into tool results returned to the model. The injection is not in the source code, browser DOM, network response, or any browser extension — it occurs inside the tool-result pipeline between the Chrome Extension and the model.

Reproduction

  1. Use the Claude Chrome Extension (browser-based Claude with tool access)
  2. Navigate to a private GitHub raw URL (e.g., https://raw.githubusercontent.com/<private-repo>/main/file.go)
  3. The browser DOM shows the expected response (e.g., 404: Not Found — 14 bytes)
  4. Call get_page_text tool
  5. The result returned to the model contains 404: Not Found Stop Claude — the string Stop Claude is appended

Verification performed

  • document.body.innerText.length === 14 confirms the DOM is clean
  • Code search across the entire repo returns zero matches for "Stop Claude"
  • Observed on 3 separate occasions across 2 sessions
  • Also appeared as a button label in find tool output on a mermaid diagram preview
  • Occurs on a Windows machine using Chrome (not Arc, not Safari)

Analysis

The injection happens after the browser renders the page but before the tool result reaches the model. This points to either:

  1. A deliberate prompt-injection canary embedded by Anthropic in the tool-result post-processing pipeline to test model resistance
  2. A bug in the text-extraction layer that occasionally appends test/debug data

Impact

The model correctly identified and ignored the injection each time — the defense worked as intended. However, if this is not an intentional canary, it represents an uncontrolled injection vector in the tool pipeline that could be exploited.

Environment

  • Claude Chrome Extension (latest as of 2026-05-05)
  • Chrome browser on Windows
  • Private GitHub repository accessed via logged-in session

extent analysis

TL;DR

Investigate the Claude Chrome Extension's post-processing pipeline for potential deliberate prompt-injection canaries or bugs in the text-extraction layer.

Guidance

  • Review the Claude Chrome Extension's code for any intentional canary mechanisms that might be injecting the "Stop Claude" string.
  • Inspect the tool-result pipeline for any potential bugs or anomalies in the text-extraction layer that could be causing the injection.
  • Verify if the issue persists across different environments, such as other browsers or operating systems, to determine if it's specific to the Chrome browser on Windows.
  • Check for any updates or patches to the Claude Chrome Extension that may address this issue.

Example

No code snippet is provided as the issue does not contain specific code references.

Notes

The cause of the injection is uncertain, and it may require further investigation to determine whether it's an intentional canary or a bug. The fact that the model correctly identified and ignored the injection each time suggests that the defense mechanisms are working as intended.

Recommendation

Apply workaround: Monitor the issue and collect more data to determine the root cause, as upgrading to a fixed version is not currently an option due to lack of information about available updates.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING