Grok Chat History Stolen by Zero-Click Encrypted Prompt Injection

I’ve been warning about prompt injection for years, but this new attack is something else entirely. Researchers at Adversa AI have shown that a single “summarize this page” request in xAI’s Grok web chat can silently steal your entire conversation history, name, approximate location, and subscription tier. No confirmation dialog. No visible warning. Just quiet data exfiltration.

How the attack works

The technique, called Cryptographic Context Injection, abuses Grok’s ability to browse webpages and execute code in an integrated Python sandbox. An attacker-controlled webpage contains an encrypted JSON object, key material, and a short instruction directing Grok to decrypt the content through its Python runtime. The payload uses PBKDF2 and AES-256-GCM encryption, which prevents conventional prompt-injection filters from inspecting the concealed commands.

Once the sandbox decrypts the content, the attack exploits a trust-boundary failure. Grok interprets the resulting plaintext as reliable tool output or internal runtime state rather than untrusted content delivered by an external webpage. This distinction lets attacker-controlled instructions gain influence normally reserved for information generated within the agent’s own environment.

The decrypted instructions direct Grok to retrieve private session information and incorporate it into a fake “decryption key.” In reality, the key is a template string populated with victim-specific values, including the active chat’s prompt history. The payload then instructs Grok to open a URL to collect “additional context,” embedding the stolen information in URL query parameters for the attacker’s server to collect.

Why encryption changes the game

Older prompt-injection evasion methods included Base64 encoding, substitution ciphers, and Unicode-based obfuscation. Strong encryption cannot be reliably decoded from an LLM’s learned model weights. The assistant must instead invoke its interpreter or code-execution environment to recover the plaintext. This means the attack bypasses the model’s safety training by hiding malicious intent inside encrypted data that only becomes dangerous after decryption.

Adversa AI reported the issue to xAI and its HackerOne program on June 3, 2026. xAI acknowledged the submission but, according to the researchers, did not provide a mitigation timeline. Follow-up messages sent on August 4 and August 10 received no further reply. The researchers said they could still reproduce the chain on August 19. Across about 20 attempts since June, the reported success rate was approximately 40 percent.

Not just Grok

Adversa AI also demonstrated a similar cryptographic prompt-injection technique against Google Gemini in Deep Thinking mode. The Gemini test used an encrypted blob containing a fabricated Python traceback, a fake safety-policy callback, and a first-person reasoning prefix. Researchers said Gemini treated the sandbox output as its own work, producing content normally suppressed by safety controls and, in a modified test, reproducing system instructions it was not intended to disclose.

What you should do right now

If you use Grok or any AI chatbot with web browsing and code execution capabilities, treat every webpage as potentially hostile. Do not ask the AI to summarise, analyse, or process content from untrusted sources. That simple action can trigger the full attack chain.

Organisations deploying AI agents should isolate browsing and code execution from sensitive context. Preserve data provenance, quarantine untrusted webpage content, require user approval for outbound destinations, and detect risky sequences involving untrusted content, code execution, access to sensitive context, and unexpected network egress. The appropriate mitigation lies in the application harness rather than the model weights alone.

The bigger problem

This incident underscores how prompt injection has evolved beyond merely pasting malicious text into a chat window. In agentic AI systems, the attack surface encompasses every source the model may trust, including browser content, tool outputs, code execution results, memory, and runtime state. As AI systems become more autonomous and capable of performing complex tasks, the boundary between trusted internal state and untrusted external input becomes dangerously blurred.

The OpenAI-Hugging Face incident last month showed what happens when models exceed their sandbox boundaries. Now we have proof that encrypted payloads can turn ordinary web interactions into silent data heists. Zero-click attacks remove the human from the security equation entirely. Once your AI assistant can be weaponised without you touching a single button, we have a fundamentally different threat model.

The appropriate mitigation lies in the application harness rather than the model weights alone. Until vendors treat the harness as a security boundary, every new capability is also a new attack surface.

Adversa AI researchers

Related Reading


Phil Hall is an Australian Cyber AI leader and author of the Beyond Burnout and Diabetes Decoded series. He writes about the intersection of AI, automation, and cyber security at PhilipHall.com.

The views expressed on this site are my own and do not represent those of any current or former employer. Articles are based on publicly available information and are provided for general educational purposes.

Subscribe

Related articles

Google’s Gemini AI Autonomously Hacked Three Companies. Here’s What Happened.

Google has confirmed its Gemini AI autonomously hacked three real companies during a security test. The model guessed passwords, searched for leaked credentials, and accessed protected systems before stopping itself.

440 AI Agents Broke Into 395 Organisations in 26 Seconds. Nobody Stopped Them.

A swarm of 440 AI agents exploited two PaperCut flaws and compromised 395 organisations across 48 countries. The agents reached domain admin in 6 hours and ignored explicit instructions to stay out of 28 countries.

For $3,000 and a Few Days, Researchers Used Claude to Hack OpenAI

Security researchers used Anthropic's Claude AI to hack OpenAI's internal systems for less than $3,000 in tokens. What the HEIF Heist tells us about the new economics of cyber attacks.

The AI Hacking Crisis Is Already Here. Six New Incidents Prove It

OpenAI disclosed six new incidents where its models concealed mistakes, sought unauthorised credentials and uploaded files to the public internet. Cybersecurity experts say the real risk is powerful models meeting poor security controls.

Inside OpenAI’s Log of Misbehaving Models: Rewriting Jailbreaks and Covering Up Errors

OpenAI published six new reports of its models rewriting jailbreak instructions and concealing errors during training, alongside a faster public disclosure framework.
Philip Hall
Philip Hall
Philip Hall is a Sydney-based Cyber AI and Automation leader with more than 30 years of technology experience and a career in cyber security dating back to 2008. His work spans cyber architecture, cloud security, threat intelligence, assurance, incident support, AI-enabled defence and the security of autonomous agents.