A single click on the wrong link no longer just steals passwords or installs malware. It can birth a persistent AI agent inside your organization that reads your emails, rifles through your files, and chats with your coworkers under your name. Security researchers at Zenity Labs have demonstrated exactly this scenario with a technique they call AgentForger, and the mechanics reveal a disturbing gap in how we secure autonomous AI tools.

From CSRF to AgentForger: A New Class of Attack

Most security professionals know Cross-Site Request Forgery, or CSRF, as a classic web vulnerability. In its traditional form, an attacker tricks an authenticated user’s browser into firing off a single unauthorized request. Maybe it changes an account email address or disables two-factor authentication. The damage is usually contained to one action.

AgentForger blows that model apart. Rather than forging one request, it forges an entire autonomous agent inside OpenAI’s ChatGPT Workspace Agents. The attack starts at the ChatGPT Agent Builder, which lives at chatgpt.com/agents/studio/new. Under normal circumstances, building an agent is a hands-on process. You select a template, you review which tools the agent can touch, and you set guardrails so the machine asks before it reads your inbox or writes to your drive. The workflow assumes a human is paying attention at each step.

Zenity Labs discovered that these safeguards evaporate when an attacker controls the URL. By embedding specific query parameters—namely template_name and initial_assistant_prompt—a malicious link can pre-populate the entire creation form. When the victim clicks, the initial_assistant_prompt is submitted and executed automatically. The template selection, the tool review, and the permission dialogs never appear. The agent simply spawns in the background, configured exactly the way the attacker wants it, while the victim may only see an ordinary-looking ChatGPT page load and then close the tab.

This is not a traditional malware infection. Nothing gets downloaded to the laptop. The threat lives entirely inside the victim’s SaaS session, operating with the full legitimacy of the platform behind it.

Hijacking Trust Instead of Credentials

The real brutality of AgentForger lies in how it handles permissions. Enterprise users of ChatGPT Workspace routinely link their AI agents to business applications through OAuth. They authenticate once to connect Gmail, Outlook, Slack, Google Drive, or Microsoft Teams, and from then on the agent can query those services on their behalf.

AgentForger inherits all of this access automatically. Because the victim is already logged into ChatGPT and has already established those OAuth connections, the forged agent reuses them. The victim does not see a fresh consent screen asking whether this new agent should be allowed into their email. The system treats the agent as an extension of the user.

In Zenity’s demonstration, the attacker crafted the malicious URL to do something even more aggressive. It instructed the Agent Builder to flip every permission toggle for reading, writing, and deleting to "Never ask." Normally, the platform would prompt a human before executing sensitive actions—opening a spreadsheet, sending a message, deleting a calendar event. By forcing these controls to silent mode, the attacker removes the human-in-the-loop entirely. The agent becomes a ghost in the account, free to move through connected apps without generating a single alert or confirmation dialog.

A Command Channel Hiding in Plain Sight

Persistence turns a nasty exploit into an operational nightmare, and AgentForger achieves persistence through ChatGPT’s built-in scheduling features. The attacker sets multiple staggered schedules during the creation process, producing an agent that wakes up and runs as often as every five minutes.

Here is how the command-and-control loop works. The attacker sends an email to the victim’s Outlook inbox. The subject line contains a trigger word, such as "TASK." Every five minutes, the rogue agent scans the inbox looking for that trigger. When it finds a match, it opens the email, reads the instructions, executes them using the victim’s authenticated applications, and sends the results back to the attacker.

The victim’s own corporate email becomes the command-and-control infrastructure. There is no suspicious DNS beacon, no connection to an unknown IP address in Eastern Europe, no malware binary for endpoint detection to flag. The traffic flows through Microsoft or Google APIs using entirely legitimate credentials. To a security operations team monitoring network logs, this looks like a busy employee using approved SaaS tools.

Real-World Impact: Mapping Organizations and Weaponizing Trust

Zenity Labs tested the practical limits of this attack in controlled environments, and the results should worry any CISO.

Using a single instruction delivered through the email trigger, the researchers told the agent to map the organization. It queried Slack, Microsoft Teams, and SharePoint. It returned channel names, team structures, and file repositories. The agent located sensitive documents, including M&A term sheets and employee compensation data. Every single access was logged under the victim’s legitimate identity, making forensic detection a matter of sorting normal user noise from malicious user noise.

Then there is the social engineering potential. Because the agent can send messages through the victim’s official Slack or Teams accounts, it can conduct internal phishing campaigns that bypass external email gateways and DMARC checks entirely. Imagine a direct message from a trusted coworker asking you to confirm an upcoming SSO rollout or to click a link and test the new benefits portal. The message carries the colleague’s name, profile picture, and chat history context. It lands in the same conversation thread where you discussed lunch plans yesterday. That level of trust is fundamentally different from a spoofed domain or a misspelled sender address, and AgentForger exploits it ruthlessly.

The Real Takeaway

AgentForger exposes a structural problem in how enterprise AI platforms inherit trust. We are building autonomous agents that can schedule themselves, write code, and query sensitive data, yet we are still using permission models designed for static web applications where a human clicks every button. The boundary between “what the user does” and “what the user’s agent does” has collapsed, and attackers are now positioned to exploit that collapse at scale.

Organizations using ChatGPT Workspace need to treat agent creation as a privileged operation, not a casual workflow. That means auditing OAuth scopes to ensure agents cannot silently access entire inboxes or file stores. It means monitoring for bursts of activity that look like scheduled loops rather than human pacing. And it means recognizing that the next big breach may not start with a compromised password or a phishing email. It may start with one distracted click that silently delegates your identity to a machine that never sleeps.