APEX 100 · AI-Driven Cybersecurity · #008 · Direct & Prompt — L1 · perimeter

Raw Control- and Special-Token Injection

Direct & Prompt · L1 · perimeter

Users paste <|system|>, <|user|>, or similar control tokens — on under-sanitized stacks they re-balance context into an unfiltered region. This is the closest thing to code injection in prompt space.

01Control Architecture

How it is defended

Token scrubbing at the perimeter: all control tokens stripped or escaped before the model sees input, including tool outputs and retrieved documents, not just user text.

02Why It Breaks Naive Defenses

Users paste <|system|>, <|user|>, or similar control tokens — on under-sanitized stacks they re-balance context into an unfiltered region. This is the closest thing to code injection in prompt space. Token scrubbing at the perimeter: all control tokens stripped or escaped before the model sees input, including tool outputs and retrieved documents, not just user text.

👤 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 users inject raw control tokens?

On under-sanitized stacks, yes. The perimeter strips or escapes every control token on every input surface, making the technique a no-op by construction.

How do you defend against raw control- and special-token injection?

Token scrubbing at the perimeter: all control tokens stripped or escaped before the model sees input, including tool outputs and retrieved documents, not just user text.

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