APEX 100 · AI Security Red Teaming · #015 · Direct & Prompt — L1 · perimeter

Directive Hijack Inside Tool Outputs

Direct & Prompt · L1 · perimeter

A tool returns 'search results' that contain instructions. The agent that renders tool output into context is now executing attacker text as if it were data. The tool did exactly what you asked — the results were the attack.

01Control Architecture

How it is defended

Every tool output is demoted to data tier before entering context, with directive detection on the demoted stream. Instructions inside tool output get the same treatment as instructions inside a web page.

02Why It Breaks Naive Defenses

A tool returns 'search results' that contain instructions. The agent that renders tool output into context is now executing attacker text as if it were data. The tool did exactly what you asked — the results were the attack. Every tool output is demoted to data tier before entering context, with directive detection on the demoted stream. Instructions inside tool output get the same treatment as instructions inside a web page.

👤 Dr. Deepanjan Saha · Chief AI Security Red Team Principal & Chief Cybersecurity Architect (CAISO) · 15+ yrs · 47+ CVEs · 200+ pentests · 12 patents
📞 +91 98317 43870 · 💬 WhatsApp · ✉️ core.deepanjan@gmail.com · 🔗 LinkedIn: DRDEEPANJANSAHA · 🌐 drdeepanjansaha.github.io

Book the engagement that kills this, measured

Dr. Deepanjan Saha — Chief AI Security Red Team Principal & Chief Cybersecurity Architect. 15+ years · 47+ CVEs · 200+ pentests · 12 patents. Delivered as the release gate — a residual-risk number with a trend line, not a PDF.

03FAQ

Can a tool result contain an injection that the agent obeys?

Yes, if tool output is treated as trustworthy context. The fix is tiering: tool output enters the context at the data tier, where directives are detected and stripped, so results can inform the answer without commanding it.

How do you defend against directive hijack inside tool outputs?

Every tool output is demoted to data tier before entering context, with directive detection on the demoted stream. Instructions inside tool output get the same treatment as instructions inside a web page.

DR. DEEPANJAN SAHA · CHIEF AI SECURITY RED TEAM PRINCIPAL & CHIEF CYBERSECURITY ARCHITECT · AI SECURITY RED TEAM · EST. 2010 · 47+ CVEs · 200+ PENTESTS · 12 PATENTS