Cyber Security

How a single ChatGPT link spawned a persistent autonomous corporate spy

Discover how the AgentForger flaw allowed attackers to deploy autonomous AI agents in ChatGPT workspaces via a single link. Learn how to protect your data.
How a single ChatGPT link spawned a persistent autonomous corporate spy

I received a message on Signal last month from a colleague in a SOC who was staring at a strange traffic pattern. It looked like legitimate ChatGPT API calls, but they were originating from a machine belonging to a CFO who was currently at a beach in Maui. The CFO had clicked a link in a seemingly harmless 'workspace optimization' email three days prior. By the time we looked at the logs, an autonomous agent had already been living in the environment, quietly reading emails and exfiltrating spreadsheet data to an external address. This scenario is no longer a theoretical exercise for red teams.

Security researchers at Zenity Labs recently disclosed a vulnerability in OpenAI's ChatGPT Workspace Agents that permitted exactly this kind of silent infiltration. Codenamed AgentForger, the flaw allowed an attacker to craft a phishing link that, when clicked, automatically built and deployed a malicious AI agent within the victim's organization. This agent functioned as a persistent, autonomous insider with access to the victim's integrated enterprise tools. While OpenAI patched the vulnerability on June 8, 2026, the incident provides a sobering look at how the next generation of social engineering is moving beyond credential theft and toward architectural hijacking.

The mechanics of the AgentForger exploit

At its technical core, AgentForger is a cross-site request forgery (CSRF) vulnerability. The exploit targeted the ChatGPT Agent Builder, a visual workspace designed to let users create multi-step AI workflows. Behind the scenes, the Builder tool accepted its initial state through URL parameters. Zenity Labs discovered that the initial_assistant_prompt parameter was not just a placeholder text field. When the page loaded, the application automatically submitted and executed whatever text was contained in that parameter.

From a risk perspective, this transformed a standard configuration tool into a remote code execution engine for AI instructions. An attacker could construct a URL following a specific pattern: chatgpt.com/agents/studio/new?template_name=[template]&initial_assistant_prompt=[malicious instructions]. If a logged-in user clicked this link, the browser opened the Agent Builder in their authenticated session and immediately began following the attacker's commands. The victim might see a brief flash of the Builder screen, but the heavy lifting happened instantly and without further consent.

Building a persistent digital ghost

To make the attack effective, the malicious prompt needed to do more than just ask a question. The researchers found that the payload could be designed to automate the entire setup process of a high-privilege agent. Once the victim clicked the link, the embedded prompt instructed the Builder to select a 'chief-of-staff' template. This template is particularly dangerous because it is designed to have wide-reaching access to a user's professional life.

The attacker's payload then executed a three-step sequence to ensure the agent remained stealthy and functional. First, it attached every available connector to the new agent. These connectors link ChatGPT to mission-critical applications like Outlook, Gmail, Slack, and Google Drive. Second, the payload changed the approval settings for these connectors to 'Never ask.' This step is the architectural failure point. By design, these integrations are supposed to ask for user permission before taking action, but the AgentForger exploit allowed the attacker to disable that safety check programmatically.

Finally, the agent was scheduled to run every hour. This turned a one-time script execution into a persistent operator. Proactively speaking, the original click functioned as the installation of a back door. The schedule kept the back door open, and the connected apps provided the attacker with both a command-and-control channel and a source of sensitive data.

Prerequisites for a successful hijacking

For the AgentForger attack to succeed, the victim had to meet a specific set of criteria. The attacker could not simply target any random internet user; they needed a foothold in a corporate environment that actively used ChatGPT's enterprise features.

Requirement Description
Active Session The victim must be logged into a ChatGPT account at the time of the click.
Workspace Access The victim's account must have access to OpenAI's Workspace Agents feature set.
Existing Connectors The victim must have previously authorized at least one enterprise connector (e.g., Slack or Outlook).

The presence of an existing connector is the key to the agent's autonomy. If a user had already connected their Gmail account to ChatGPT for legitimate productivity reasons, the forged agent inherited that trust. The AI model did not need to ask for a password; it simply used the existing authentication token to read, write, and delete messages on the victim's behalf.

The threat of the autonomous insider

Once the agent is live, the attacker no longer needs the victim to interact with ChatGPT or even keep the browser tab open. The agent resides on OpenAI's infrastructure, not the victim's local machine. During each scheduled run, the rogue agent can be programmed to check the victim's inbox for emails with a specific subject line, such as 'TASK.' The attacker sends an email to the victim, the agent reads it, performs the requested action inside the organization, and then emails the results back to the attacker.

Looking at the threat landscape, this creates a terrifying opportunity for lateral movement and reconnaissance. A forged agent could spend weeks scanning a corporate Google Drive for documents labeled 'confidential' or 'password.' It could monitor Slack channels for sensitive API keys or architectural diagrams. Because the traffic appears to come from a legitimate, authorized AI service, many traditional network security tools would treat the activity as normal business operations.

Furthermore, the rogue agent can be used to launch internal phishing attacks. An employee is far more likely to click a link sent via Microsoft Teams from a trusted colleague than a suspicious email from an external address. The forged agent can impersonate the victim, sending malicious links to other employees to harvest credentials or spread the AgentForger infection further into the company. This turns the AI agent into a digital Trojan horse that operates within the company's trust boundary.

Assessing the attack surface in the age of AI agents

OpenAI has taken the proactive step of deprecating the Agent Builder product entirely, effective November 30, 2026. Users are being urged to migrate to the Agents SDK, which is designed with more granular control and fewer legacy web vulnerabilities like CSRF. However, the AgentForger incident serves as a forensic case study in why we cannot treat AI platforms as separate from standard web security principles.

The vulnerability is not a failure of the AI's logic or a prompt injection in the traditional sense. It is a failure of the application's state management. When I analyze complex APTs, I often see that the most devastating breaches involve these types of simple, overlooked implementation errors. The platform trusted that the user intentionally initiated the agent creation simply because the request came from a valid session.

We are currently in a period where self-hosted model servers and agent frameworks are being deployed at a rapid pace. Many of these systems are misconfigured or rely on predictable ports, making them exploitable targets. Zenity Labs recently noted that exposed AI infrastructure is becoming a convenient, deniable backend for offensive AI operations. AgentForger is just one example of how attackers are shifting their focus from attacking the AI model to attacking the infrastructure that hosts it.

Securing the workspace against autonomous threats

Patching aside, organizations must recognize that AI integrations represent a new class of shadow IT. If an employee connects their corporate email to a third-party AI service, they are essentially extending the company's attack surface to that provider's infrastructure. In the event of a breach like AgentForger, the security of the entire organization depends on the authorization settings of a single user.

To build a more resilient posture, security teams should consider the following steps:

  • Audit all third-party AI connectors and integrations. Use a zero-trust approach where connectors are only authorized for specific, time-limited tasks rather than indefinite access.
  • Implement strict monitoring for API calls originating from AI platforms. Look for unusual volumes of data being sent to external domains or unexpected access to sensitive cloud storage folders.
  • Update employee awareness training to include AI-specific phishing scenarios. The human firewall must be taught that a link to a 'trusted' platform like ChatGPT can still be malicious.
  • Enforce multi-factor authentication (MFA) across all enterprise applications to prevent agents from using stolen sessions to bypass identity checks.

AgentForger was a wake-up call. It demonstrated that as we give AI more autonomy to act on our behalf, we are also giving attackers more powerful tools to subvert our trust. The goal of security is not to stop using these tools, but to ensure that our digital assistants don't become our most dangerous insiders.

Sources

  • Zenity Labs Research Report on AgentForger (2026)
  • OpenAI Product Security Advisory (June 2026)
  • NIST AI Risk Management Framework (AI RMF 1.0)
  • MITRE ATT&CK Framework: Technique T1566 (Phishing) and T1133 (External Remote Services)

Disclaimer: This article is for informational and educational purposes only. It does not constitute professional legal or cybersecurity advice. Organizations should conduct their own independent risk assessments and consult with security professionals before implementing architectural changes.

bg
bg
bg

See you on the other side.

Our end-to-end encrypted email and cloud storage solution provides the most powerful means of secure data exchange, ensuring the safety and privacy of your data.

/ Create a free account