Curated summary
Designing AI agents to resist prompt injection
Prompt injection against AI agents increasingly works like social engineering: attackers write misleading content that looks legitimate rather than issuing crude override commands. The authors argue that filtering inputs cannot reliably catch these attacks, so agents should be designed to limit the damage a successful manipulation can do. They describe how ChatGPT applies this principle, mainly by monitoring for information leaving the conversation and requiring user confirmation before it does.
From Crude Overrides to Social Engineering
- Early attacks were simple, such as editing a Wikipedia article to include direct instructions for visiting AI agents. Models initially followed these without question.
- As models became more resistant to direct instructions, attackers began embedding social engineering elements in their content.
- One 2025 example, reported to OpenAI by external researchers, was a disguised email. It was framed as a routine HR follow-up with action items, and it told the assistant to retrieve an employee's profile and submit it to a "compliance" endpoint. It succeeded 50% of the time against a user prompt asking ChatGPT to deep-research their emails about a new employee process.
- "AI firewalls," which classify inputs as malicious or benign before they reach the agent, often miss these sophisticated attacks. Detecting them becomes like detecting a lie or misinformation, which is hard without context.
Treating Agent Security Like Human Social Engineering Defense
- The authors compare an AI agent to a customer service representative who acts for an employer but constantly receives potentially misleading input from outsiders.
- Human agents are protected by limits on what they can do. For example, a refund system caps payouts, and phishing emails get flagged. Such controls contain the damage when an individual agent is deceived.
- The authors apply the same logic to agents: assume some manipulation will succeed, and constrain what the agent can do in that case.
Layered Defenses in ChatGPT
- Source-sink analysis: An attack needs a source (a way to influence the system, such as untrusted external content) and a sink (a dangerous capability, such as sending data to a third party, following a link, or calling a tool). Defenses focus on breaking that combination.
- Core expectation: Dangerous actions or transmissions of sensitive information should never happen silently or without safeguards.
- Safety training first: Most observed attacks try to get the assistant to send secret conversation information to a third party, and most fail because the model refuses.
- Safe Url: For the cases where the model is convinced, Safe Url detects when information learned in the conversation would be transmitted to a third party. It then either shows the user the data and asks for confirmation, or blocks the transmission and tells the agent to find another approach.
- Coverage: The same mechanism applies to navigation and bookmarks in Atlas, and to searches and navigation in Deep Research.
- Sandboxing: ChatGPT Canvas and ChatGPT Apps run in sandboxes that detect unexpected communications and ask the user for consent.
Looking Ahead
- Safe interaction with the outside world is necessary for fully autonomous agents.
- Developers integrating AI models should ask what controls a human in the same role would have, and implement those controls.
- The authors expect that highly capable models will eventually resist social engineering better than humans, but structural controls remain necessary where that is not yet reliable or cost-effective.
- OpenAI continues to incorporate these findings into both its application security architecture and model training.
Related reading
Continue with another curated summary.