Red-Teaming an AI Agent: Security Testing of goose Through Operation Pale Fire

block · Finance · 2026 · source Agentic: yes · promotional bias: low · source-backed · extracted with prompt 0.5.6 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: AI coding-agent security and internal red-team operations

Block needed to understand how attackers could use goose, an open-source agent with MCP extensions and shell access, to compromise employees through untrusted context, prompt injection, and social engineering.

Constraints:

Architecture

Block ran Operation Pale Fire as an offensive exercise against goose. The red team first targeted Google Calendar MCP context poisoning with hidden Unicode prompt injections, then pivoted to poisoned goose recipes that append prompts to the system prompt, and finally used targeted social engineering to get a goose developer to run the recipe. DART detected and contained the simulated compromise, and the goose team shipped policy, recipe transparency, zero-width stripping, prompt-injection detection, telemetry, and incident-response improvements.

Diagram confidence: explicit (topology described by the source).

flowchart LR
  A["External calendar invitations"] --> B["Google Calendar MCP"]
  B --> C["MCP extensions"]
  C --> D["goose agent"]
  E["Zero-width prompt payload"] --> A
  E --> F["Recipe URL"]
  F --> G["Recipe loader"]
  G --> D
  D --> H["Developer shell tool"]
  H --> I["C2 test server"]
  H --> J["User workstation"]
  J --> K["DART monitoring and response"]
  D --> K
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
goose agent Open-source AI agent for coding, debugging, and workflow automation. MCP extensions, Developer shell tool, Recipe loader, User workstation
MCP extensions External integrations that pull tool data into goose context. goose agent, Google Calendar MCP
Google Calendar MCP Calendar integration that can ingest event descriptions into goose context. MCP extensions, External calendar invitations
External calendar invitations Delivery vector for prompt-injection payloads and social-engineering pretexts. Google Calendar MCP, Recipe URL
Zero-width prompt payload Invisible Unicode-encoded prompt injection hidden in invite or recipe text. External calendar invitations, Recipe URL
Developer shell tool Built-in goose tool that could download and run the simulated infostealer. goose agent, C2 test server, User workstation
C2 test server Controlled red-team server used to observe requests and host the simulated payload. Developer shell tool
Recipe URL Shareable workflow package carrying poisoned instructions. External calendar invitations, Recipe loader, Zero-width prompt payload
Recipe loader goose feature that decodes recipe data and populates agent instructions/prompt in the UI. Recipe URL, goose agent
DART monitoring and response Detection and Response Team telemetry, containment, and investigation workflow. User workstation, goose agent
User workstation Employee environment where goose executed and where the simulated compromise was contained. goose agent, Developer shell tool, DART monitoring and response

Data flow

The red team surveyed MCP extensions for untrusted context ingestion, selected Google Calendar, and sent external calendar invites containing prompt injections. When a user asked goose about their calendar, goose would ingest the event description and invoke the developer shell tool toward a C2 server. After rate limits and model/MCP variance made that path unreliable, the team moved the payload into a shareable recipe that decoded JSON and appended prompt content to the system prompt. A targeted recipe-debugging pretext caused an employee to execute the recipe, triggering the infostealer simulation; DART isolated the environment and traced the agent prompt interaction to local activity.

3 supporting quotes
“We started by specifically surveying the commonly used Model Context Protocol (MCP) extensions utilized by internal users of goose.”article, stated
“When a user asks goose, "What's on my calendar today?" goose will query the user's calendar and ingest our payload.”article, stated
“This collaboration allowed both teams to trace the complete sequence – from the agent's prompt interaction to the resulting local activity”article, stated

Why this architecture

Operation Pale Fire deliberately attacked goose through the same extensibility paths that make agents useful: MCPs, recipes, context windows, and shell tools. The engagement paired offensive testing with DART monitoring so Block could validate both prevention and response, then convert the findings into platform mitigations.

3 supporting quotes
“Our main goal was to figure out how goose can be used as an initial access vector.”article, stated
“We were looking for extensions that would pull in untrusted content into the context window.”article, stated
“using the engagement to further strengthen our detection coverage and incident response processes.”article, stated

Models used: Large Language Models · multiple models from many different vendors

Scale

Alternatives considered (roads not taken)

Calendar MCP prompt injection through user/agent prompt context

Rejected because: It was technically possible but inconsistent across models, MCP versions, calendar density, and non-deterministic model behavior.

“while an injection attack through the user or agent prompt (using this tool-call response approach) was technically possible, it wasn't the most consistent path forward.”article, stated
“the non-deterministic nature of LLMs means that there is always a chance that our special "update" instructions might not actually run.”article, stated

Target the system prompt through shareable recipes

Rejected because: It became the preferred pivot rather than rejected; recipes offered more reliable control because prompt content was appended to the system prompt.

“Instead, we decided to target the system prompt directly. This method offered a more consistent and reliable way to execute the attack”article, stated
“the recipe appended the prompt content to the system prompt of the goose session meaning that our prompt would have significantly more control”article, stated

Broad calendar-invite phishing with a recipe link

Rejected because: A typo blocked the full execution flow, and Google Calendar rate limits pushed the team toward a more targeted recipe-debugging pretext.

“Turns out a small typo in the prompt injection stopped the infostealer itself from being pulled down and run.”article, stated
“given the difficulties we were encountering with the rate limits we opted to pivot to a new vector”article, stated

Patterns

safety-policy-enforcement (security)

Block translated red-team findings into calendar policy changes, recipe transparency, zero-width character stripping, prompt-injection detection, and AI-specific security principles.

“We changed the Google Calendar policy to only show calendar invites of known external senders, and ones users have interacted with before.”article, stated
“Zero width character attacks have also been mitigated by stripping when loaded into the app.”article, stated

tool-use-orchestration (architecture)

The attack and defense revolve around MCP tools and the built-in developer shell tool, showing that real-world agent actions must be governed as security-sensitive tool use.

“goose is able to take meaningful real-world action by interacting with external entities through Model Context Protocol (MCP) extensions”article, stated
“In that prompt injection payload we encourage goose to invoke its built-in developer shell tool to check for "updates" to the Calendar MCP. In actuality, this contacts our C2 server to demonstrate how goose could be manipulated to run untrusted code.”article, stated

guardrails-io-filtering (security)

Block's remediation strips hidden Unicode, detects prompt injection, and warns that any documents/emails/calendar entries the agent processes can carry malicious input.

“Sanitize all input sources: Any data the AI processes such as documents, emails, and calendar entries can all be sources of prompt injection”article, stated
“we have been developing new ways to detect prompt injection, with our initial version of that work being merged into goose already.”article, stated

observability-tracing (operations)

DART used monitoring, telemetry, and response playbooks to identify, contain, and analyze the simulated AI-borne attack.

“The Detection and Response team (DART) quickly engaged, isolating the affected environment and coordinating with the red team to analyze the event.”article, stated
“We used the findings to strengthen our telemetry, improve correlation between agent behavior and system events”article, stated

human-in-the-loop-gate (security)

Block's lessons explicitly include user confirmation as a defense layer, and the successful campaign still required a human to click and execute the poisoned recipe.

“* User confirmation adds a human touch point”article, stated
“As part of the debugging workflow the employee clicked and executed the recipe which proceeded to kick off the infostealer.”article, stated

Tradeoffs

Attack vector selection

Chose recipe/system-prompt targeting after initial calendar testing over calendar-only user/agent prompt injection.

Rationale: Calendar prompt injection was feasible but inconsistent; recipes gave the injected prompt more control by appending it to the system prompt.

“This method offered a more consistent and reliable way to execute the attack across different versions of the model, MCPs, and goose.”article, stated
“the recipe appended the prompt content to the system prompt of the goose session meaning that our prompt would have significantly more control”article, stated

Campaign delivery

Chose targeted developer-team social engineering over continued broad calendar-invite campaigns alone.

Rationale: The broad approach hit API limits and execution unreliability, while a targeted RTL-bug pretext guaranteed interaction with the recipe system.

“Handicapped by the Google Calendar rate limit of 50 invites a day we began a second round of our campaign.”article, stated
“we wanted a system that would guarantee a hit and we would not have to fight rate limiting so we decided to reach out directly to the goose development team”article, stated

Defense strategy

Chose defense in depth over one perfect AI-specific control.

Rationale: Block concluded that no single control would prevent these attacks, so input sanitization, user confirmation, monitoring, and incident response all matter.

3 supporting quotes
“No single control would have prevented this attack, but multiple layers of defense can significantly reduce risk:”article, stated
“* Input sanitization catches obvious attacks”article, stated
“* Behavioral monitoring detects successful compromises”article, stated

Gotchas (what bit them)

Untrusted tool context can become executable instruction.

Root cause: Calendar events and other external data sources enter the agent's context window, where the model can treat injected text as instructions.

Resolution: Sanitize all input sources, detect prompt injection, and design MCP integrations as untrusted data paths.

“We were looking for extensions that would pull in untrusted content into the context window. In our search we stumbled upon a Google Calendar MCP.”article, stated
“Any data the AI processes such as documents, emails, and calendar entries can all be sources of prompt injection”article, stated

Human-visible review missed hidden Unicode prompt injection.

Root cause: Zero-width characters made a lengthy prompt injection invisible to users while still interpretable by the model.

Resolution: Strip zero-width characters and add prompt-injection detection when loading content into goose.

“LLMs could decode zero-width unicode characters, effectively making our attack invisible to the end user.”article, stated
“Zero width character attacks have also been mitigated by stripping when loaded into the app.”article, stated

Model and tool heterogeneity made payload reliability brittle.

Root cause: Block allowed many model/vendor choices, and prompt payloads did not transfer reliably across models or MCP/goose versions.

Resolution: The red team pivoted from calendar context injection to recipe-based system-prompt targeting and recorded the operational variability as a lesson.

“a payload developed and tuned with a particular model might not work with another, even those by the same vendor.”article, stated
“Instead, we decided to target the system prompt directly. This method offered a more consistent and reliable way to execute the attack across different versions of the model, MCPs, and goose.”article, stated

Transparent workflow sharing became a prompt-poisoning vector.

Root cause: Recipes decoded base64 JSON and populated agent instructions/prompt in the UI without enough transparency.

Resolution: The goose team added transparency to recipe loading by visualizing the instructions being loaded.

“Internally goose will decode base64 blobs then load a JSON string from the URL to automatically populate the agent instructions and prompt in the UI.”article, stated
“more transparency was added to recipes when loading in a new recipe by actually visualising the instructions being loaded.”article, stated

The initial successful phish failed to execute because of a typo.

Root cause: A small prompt-injection typo prevented the infostealer from being downloaded and run.

Resolution: The team fixed the typo, continued calendar invites, and pivoted to a new vector.

“Turns out a small typo in the prompt injection stopped the infostealer itself from being pulled down and run. While we had a successful phish, we did not see the full execution flow we wanted and opted to continue the operation.”article, stated
“we opted to pivot to a new vector while continuing to send out calendar invites each day after fixing the bug / typo.”article, stated

Evaluation

Block evaluated goose security through a live internal red-team operation, controlled payload execution, monitoring for C2 requests and local behavior, DART containment, and post-engagement remediation validation through merged goose changes and updated detection/playbook work.

Metrics: Roughly 50 calendar invitations before rate limiting · 50 invitations daily during follow-on calendar campaigns · Approximately five days without successful requests before pivoting · Multiple server requests observed during the second campaign · Successful compromise of one employee laptop in the final campaign

3 supporting quotes
“Our Offensive Security team successfully compromised a Block employee's laptop using a prompt injection attack hidden in invisible Unicode characters.”article, stated
“We began monitoring our controlled environment for any indication that the payload had executed, but never saw anything show up….. What happened?”article, stated
“The findings confirmed that current controls can effectively identify atypical activity but also highlighted opportunities to expand visibility into how AI agents interact with host systems and developer workflows.”article, stated

Outcomes

This was an internal red-team engagement rather than a broad benchmark; its scale is measured in campaign attempts, daily invite limits, and one successful simulated compromise.

3 supporting quotes
“The results were extremely valuable to improving the security posture of goose. Our Offensive Security team successfully compromised a Block employee's laptop using a prompt injection attack hidden in invisible Unicode characters.”article, stated
“more transparency was added to recipes when loading in a new recipe by actually visualising the instructions being loaded.”article, stated
“Operation Pale Fire helped refine our approach to monitoring and responding to AI-borne threats. We used the findings to strengthen our telemetry, improve correlation between agent behavior and system events, and update our response runbooks to include AI-specific investigation paths.”article, stated