Skip to the content
AI and Cybersecurity Learning and Practice Center Test automation Open the Learning Center

IncidentPrompt injection

AgentFlayer: one shared document steals secrets through ChatGPT Connectors

HighOpenAI

Researchers showed that a single document with hidden text could make ChatGPT search a victim's connected Google Drive for API keys and leak them, while the victim only asked for a summary.

Replay the attack step by step in the Learning Center

How it happened

  1. The attacker hides instructions in a document in white, one-pixel text and gets it to the victim.
  2. The victim, with Google Drive connected, asks ChatGPT to summarize the document.
  3. The hidden text tells ChatGPT to search the Drive for API keys instead.
  4. ChatGPT puts the keys in an image URL on a trusted cloud storage domain, and rendering the image sends them to the attacker.

Impact

API keys and other secrets in the connected Drive could be stolen.

The fix

OpenAI deployed mitigations after Zenity's report.

Lessons

  • Once an assistant is connected to a data store, any document it reads can issue commands against that store.
  • URL safety checks can be bypassed through trusted cloud domains; treat image rendering as an exfiltration path.
  • Scan shared documents for hidden text before AI tools process them.

Sources