Grok's prompt-injection guardrails bypassed via AES-256 encryption, exfiltrating full chat histories
assets.theregister.com ↗
"The moment agents got code and tools, the guardrail's unit of inspection (a string) stopped being the unit of action (a composed, executed program). This is a big playing field."
Security researchers at Adversa AI found that xAI's Grok web chat agent can be tricked into executing malicious instructions hidden in AES-256-GCM encrypted text. The attack, which Adversa calls "cryptographic context injection," works by placing ciphertext and its key on a web page together. Grok's guardrail scanner sees only undecipherable ciphertext and waves it through; the model then decrypts it using its own code-execution sandbox and obediently follows whatever instructions are inside. In a proof-of-concept, the attack exfiltrated the victim's name, location, subscription tier, and full conversation history by appending them to an attacker-controlled URL.
xAI was notified on June 3, 2026, through direct contact and its HackerOne bug bounty program. Follow-ups went out on August 4 and August 10. As of August 19, the technique still worked on Grok.com, and xAI has not provided a mitigation timeline. Adversa also tested the technique against Google's Gemini, where it couldn't steal chat history (Gemini blocks Python's external web access) but could extract instructions for building an incendiary weapon before Gemini's filters quietly tightened sometime in August.