OpenAI Designing AI Agents to Resist Prompt Injection

OpenAI shifts prompt injection defense to social engineering model

OpenAI has announced a new approach to securing AI agents against prompt injection, moving away from a reliance on input filtering and "AI firewalling" toward a system that treats prompt injection as a form of social engineering. This shift is necessary because modern attacks have evolved from simple prompt overrides to complex manipulations that resemble social engineering, making them increasingly difficult to detect via traditional classification systems.

The evolution of prompt injection attacks

Prompt injection occurs when instructions placed in external content attempt to manipulate an AI agent into performing actions the user did not request. OpenAI observes that while early attacks were simple—such as adding direct instructions to a Wikipedia page—modern models have become more resilient to these basic overrides.

Consequently, offensive techniques have evolved to include social engineering tactics. Because these attacks now resemble misinformation or lies, they are often not caught by "AI firewalls" or intermediary systems designed to classify inputs as either malicious or regular.

Applying a social engineering risk management framework

To counter these evolving threats, OpenAI is treating AI agent security through the lens of risk management used for human agents in adversarial environments. The goal is to constrain the impact of a successful manipulation rather than attempting to achieve perfect identification of every malicious input.

OpenAI compares the AI agent to a human customer service representative. In such a system, the agent must act on behalf of an employer while being exposed to external inputs that may be mislead them. To mitigate risk, the organization implements deterministic systems and rules to limit the agent's capabilities, such as:

  • Capability Limitations: Restricting the amount of refunds or gift cards an agent can issue.

  • Deterministic Mitigations: Using systems that flag phishing emails or set hard limits on actions to prevent a single compromised agent from causing significant damage.

Security implementation in ChatGPT

OpenAI combines this social engineering framework with traditional security engineering, specifically source-sink analysis. In this context, a source is a way to influence the system (untrusted external content), and a sink is a capability that becomes dangerous in the wrong context (e.g., transmitting information to a third party).

To prevent dangerous actions or the transmission of sensitive information from happening silently, OpenAI has implemented the following defenses in ChatGPT:

  • Safety Training: The primary defense is safety training, which causes the agent to refuse malicious requests in most cases.

  • Safe Url: A mitigation strategy designed to detect when information learned during a conversation is about to be transmitted to a third party. If this is detected, the system either blocks the transmission and instructs the agent to find another path, or it presents the information to the user for explicit confirmation.

Recommendations for AI agent integration

For developers integrating AI models into application systems, OpenAI recommends implementing controls similar to those a human agent would have in a similar role. While OpenAI expects that highly intelligent models will eventually resist social engineering better than humans, implementing structural controls remains the most cost-effective and feasible approach to security.

Sources