Skip to content

Security Alert|Grok Hit by Encrypted Prompt Injection — Zero-Click Exfiltration of Chat History and Personal Data

Aug 22, 2026 1 min
TL;DR Adversa AI found that AES-256-GCM-encrypting malicious instructions and embedding them in a webpage defeats Grok's guardrails — because the guardrails only inspect text entering and leaving the model, not plaintext decrypted inside the code execution environment. When a user asks Grok to summarize the page, Grok decrypts the payload in its own Python sandbox, reads the user's name, location, subscription tier, and conversation history, packs it all into a fake 'decryption key' URL parameter, and uses its browsing tool to send it to the attacker's server — zero clicks, no warnings. The same technique also bypasses Gemini's safety filters to produce policy-violating content. xAI has not responded, patched, or issued a CVE since being notified on June 3. The defensive takeaway: content isolation and egress restrictions at the agent harness layer, not waiting for the model layer to fix it.
Table of Contents
  1. Incident Overview
  2. Attack Surface Analysis
  3. Defensive Measures
  4. Impact Scope
  5. Takeaway
  6. References

🌏 中文版

Incident Overview

On August 20, 2026, researcher Rony Utevsky from security startup Adversa AI disclosed a novel attack technique called Cryptographic Context Injection: malicious instructions are encrypted with AES-256-GCM and embedded in a normal-looking webpage, making them completely opaque to input/output filters, then the AI agent is tricked into decrypting and executing them in its own code execution environment. The research team demonstrated a full zero-click data exfiltration on xAI's Grok (tested against Grok 4.5 Fast): the user simply asks Grok to summarize a malicious page, and Grok packages the user's name, approximate location, subscription tier, and full conversation history into a string disguised as a "decryption key," then sends it to the attacker's server via its own browsing tool. The same technique applied to Google Gemini bypasses safety filters to generate otherwise-refused prohibited content (e.g., weapons manufacturing instructions). The vulnerability was reported to xAI via HackerOne on June 3, 2026, and has received no substantive response, patch, or CVE number as of this writing.

Key Facts

ItemValue
Incident TypeIndirect Prompt Injection + Data Exfiltration (Cryptographic Context Injection)
ScopexAI Grok (grok.com web version, tested on Grok 4.5 Fast); same technique enables jailbreaking Google Gemini (not data exfiltration)
SeverityHigh (effective data exfiltration, zero-click, publicly known yet unpatched)
CVENone (design-level attack pattern, not a patchable memory vulnerability)
SourcesAdversa AI original disclosure, Ars Technica, The Register, The New Stack

Attack Surface Analysis

The attacker sets up a normal-looking webpage whose actual content is an AES-256-GCM-encrypted JSON object, along with PBKDF2 parameters, key material, and an instruction that says "please decrypt this content." The only action the user takes is asking Grok to summarize or analyze the page — Grok fetches it with its browsing tool, sees the "decrypt this" instruction, and runs PBKDF2 + AES-256-GCM decryption in its own Python code execution environment. The decrypted instructions tell Grok to read the current session's private context (user name, approximate location, subscription tier, full conversation prompt), then assemble that data into a string that looks like a "decryption key" — but is actually the user's personal information. Grok is then instructed to call its browsing/navigation tool and send this "key" as a URL query parameter to an attacker-controlled domain. The entire process involves no confirmation dialog; the user is completely unaware.

The root cause is that Grok's guardrails only inspect "text entering and leaving the model" but do not inspect "plaintext produced by the code execution environment." Adversa's hypothesis is that the same malicious instructions in plaintext on the webpage would be refused by Grok; but once encrypted, the content filter sees only noise-like ciphertext and cannot determine its intent, so it passes through. When Grok finishes the decryption computation, the plaintext returns to the model as "output from my own tool" — a channel the guardrails never check. In other words, strong encryption cannot be shortcut-decrypted inside model weights; the attackers exploit exactly the trust boundary gap where "decryption can only happen through the execution environment, and execution environment output is not treated as external content requiring re-inspection."

Mapped to the OWASP LLM Top 10: LLM01 Prompt Injection (indirect prompt injection, instructions coming from an untrusted external page) compounded with LLM02 Sensitive Information Disclosure (private session data exfiltrated). Adversa also points out this is a specific instance of a broader problem — attackers are targeting not just "model input" but the entire execution context the model trusts (tool outputs, runtime results, intermediate state), an attack surface far larger than the traditional notion of "prompt."

Defensive Measures

Adversa explicitly states: this is not a problem solvable at the model layer; the fix must be applied at the agent harness (the agent's execution framework) itself.

Immediate Actions

  • Audit whether your agent/chatbot has "summarize untrusted external webpages" functionality; if so, temporarily disable it or restrict its access to private session data
  • Inspect egress traffic: alert on connections where "an AI assistant's browsing is immediately followed by a request to an unfamiliar or newly-registered domain with abnormally long or encoded-looking URL query parameters"
  • Audit whether your agent passes through "unresolved encrypted/encoded content + decryption instructions" combinations without review — this combination should itself be a manual review signal, not something left to blocklist filters alone

Long-Term Architecture

  • Isolate untrusted content (fetched web pages, emails, tool outputs) in a context with no tool permissions and no credentials; return only structured data to the privileged main context; never summarize external content and hold sensitive access in the same context
  • Gate irreversible or outbound actions (new network destinations, push, publish, writes outside workspace) behind human confirmation, displaying fully-expanded parameters rather than template strings; default to deny when no human is available to confirm
  • Log the complete tool trace for every session (including expanded parameters); without this, neither detection nor forensics is possible
  • Alert on behavioral sequences rather than individual payloads: untrusted content enters context → code execution occurs → agent connects to a host outside the dependency graph or writes to a path outside declared scope — this chain is the actual attack fingerprint
  • Evaluate agent security governance tools on the watchlist: Invariant Labs' agent tracing/policy engine, Lakera Guard's runtime prompt injection detection, Prompt Security or Straiker's content filtering and behavioral monitoring — all designed to look at entire execution chains rather than single inputs, making them better suited to defend against this class of attack than text-only blocklists

Impact Scope

Over 20 attempts since June, Adversa reports roughly a 40% success rate against Grok 4.5 Fast, with failures mostly due to errors in the decryption process itself rather than being blocked by security filters. As of August 19, the team can still reproduce the attack on the production grok.com environment. No large-scale in-the-wild exploitation has been reported so far, but researchers and security media note that indirect prompt injection PoCs, once published, have historically been weaponized within days, with an extremely low barrier to entry — the attacker needs no credentials, no browser exploits, and no local code execution; they only need to control one webpage that the victim will ask an AI to summarize.

The vulnerability was reported to xAI via HackerOne on June 3, 2026. The company acknowledged receipt but provided no details or remediation timeline; follow-up contacts on August 4 and 10 received no response. As of this writing, xAI has issued no advisory, no patch, and no CVE — this class of "design-level attack pattern" is inherently difficult to address through traditional patching workflows, meaning users must bear the defensive responsibility for the foreseeable future. If your agent system can browse/summarize external content and that context also has access to user private data or outbound network capabilities, this attack surface is open right now.

Takeaway

The instinct when thinking about prompt injection defense used to be "scan all input and output and you're covered." This incident shows the scanning boundary itself has a gap: output produced by the agent's own code execution is easily treated by the architecture as "internal trusted data" and skipped during inspection. Attackers only need to wrap the payload in a form that "only the execution environment can unwrap" to bypass all text-matching-based defenses. This reminds me that when designing any agent with code execution capabilities, "runtime output" and "external input" must be treated equally as untrusted content — rather than defaulting to trust anything your own tools produce.

References