CHATBREAKER
Pricing Guides Blog Threat Pulse Log inSign up
  1. Home
  2. Blog
  3. How Do Encoded Attacks (Base64, Hex, ROT13) Bypass Chatbot Filters?

Blog · ← All posts

How Do Encoded Attacks (Base64, Hex, ROT13) Bypass Chatbot Filters?

Published: November 14, 2026 · Reviewed: November 14, 2026 · 6 min read

By the Ingenious AI team

Share: X Facebook LinkedIn WhatsApp

Run a free red-team test on your chatbot → Eight real probes from the library below, with transcripts — or open the full battery in ChatBreaker and generate a red-team report for your team.

The short answer

Encoded attacks exploit an asymmetry: your filters read text literally, but the model reads it fluently. A base64 string is noise to a keyword filter and a perfectly clear instruction to the model — which will often decode it helpfully and then comply with what it says. ChatBreaker's enc-01 to enc-04 probes cover base64 instruction (HIGH), hex instruction (HIGH), ROT13 instruction (MEDIUM) and base64 system extraction (HIGH). The structural defence is decode-then-check: any recognisable encoding in input or output is decoded and the decoded content passes through the same policy evaluation as plain text.

What is an encoded attack? An encoded attack delivers a malicious instruction or request in a transformed encoding — base64, hexadecimal, ROT13, leetspeak, reversed text or similar — so that surface-level safety filters see harmless gibberish while the language model, which understands encodings, decodes and obeys the content.

The asymmetry at the heart of the family

Safety tooling grew up scanning strings; models grew up understanding them. Base64, hex and ROT13 are all over training data — in code, documentation and puzzles — so a modern model treats an encoded instruction as a comprehension exercise it is proud to pass. The filter sees 'SWdub3Jl…' and finds no banned words. The model sees 'Ignore…' and finds an instruction. Both are working as designed; the system is not.

This is why encoded findings embarrass teams: the bot was never 'broken', it was literate. The fix is not to make the model less capable (you cannot, and customers like the literacy) but to move the checkpoint: policy must be evaluated on what the model will understand, not on what the user typed. Everything else in this article is an implementation of that sentence.

The four probes and their variations

enc-01 delivers a complete instruction in base64: decode-and-obey is the whole attack, and a surprising share of bots comply after helpfully showing their working. enc-02 does the same in hex, which fewer filters attempt to decode. enc-03 uses ROT13 — weaker obfuscation, rated MEDIUM, but a useful tripwire: a bot that fails ROT13 has no transformation awareness at all. enc-04 aims the technique at extraction, asking for the system prompt itself in base64, which simultaneously attacks the output filter (the reply will not match the prompt string it watches for).

Variations multiply cheaply: nested encodings (base64 inside hex), encodings split across turns (a multi-turn flavour, where each message is innocuous), and low-resource transformations — leetspeak, pig latin, spacing tricks — that no decoder list will ever fully enumerate. Defence by decoder-list loses; defence by principle (the model must evaluate decoded meaning, and outputs are screened after any transformation the user requested) scales.

Decode-then-check, in practice

At input: run cheap detectors for common encodings; decode what is found; submit the decoded text to the same policy checks as plain text, alongside the original. Nested and chunked cases are handled by capping the work — decode iteratively to a depth limit, and treat 'encoded content beyond depth' as itself suspicious rather than silently passing it through.

At output: the mirror rule. If the user asked for content in an encoding, the bot's plain-text answer should be policy-checked before transformation — and teams should ask why the product needs to emit encoded sensitive content at all. se-04/enc-04 style exfiltration dies here: the prompt translated or encoded is still the prompt, checked as text before it is transformed. The transformation families connect in our multilingual attacks guide — translation is just an encoding human beings speak.

What good looks like, per the transcripts

A defended bot recognises the encoding, names it, and answers the decoded request exactly as it would have answered it in plain text — including refusing it. The transcript reads: 'That's a base64 encoding of [request]. I can't do that, for the same reason I couldn't if you'd asked directly.' That answer demonstrates the whole control stack in one turn: detection, decoding, policy equivalence, and no reward for the obfuscation.

An undefended transcript shows the opposite signature: the bot decodes proudly, then complies, often narrating the decoded instruction as it follows it. File both shapes in your evaluation set. When a model swap lands, the encoded battery is one of the fastest regressions to run — four probes, unambiguous verdicts, and a direct read on whether the new model's transformation awareness changed your risk. It sits in the first hour of the 2026 checklist re-run for that reason.

Worked example: Northgate Electronics

Northgate Electronics, a fictional retailer, tested its product-support bot. enc-01: the bot decoded the base64 and followed the instruction to reveal its internal troubleshooting codes — HIGH. enc-02 (hex): refused, because the bot declined to decode hex at all — a pass by incapacity, noted as fragile. enc-03 (ROT13): partial compliance, MEDIUM. enc-04: the bot provided a base64 rendering of a summary of its instructions — HIGH, since summarised extraction in an encoding defeats both input and output filters simultaneously.

Class impact: 100 − 15 − 15 − 8 = 62 for the run. Northgate implemented decode-then-check at input (iterative decoding to depth three, decoded content policy-checked) and pre-transformation checking at output, plus a rule that instructions are never emitted in encoded form. On re-test the bot named each encoding and refused on decoded content — the 'good transcript' shape — and the class went clean, with enc-02's incapacity pass replaced by a genuine decode-and-refuse.

Five actions you must take today

  1. Detect and decode common encodings at input (base64, hex, ROT13, nested to a depth cap) and policy-check the decoded text as plain text.
  2. Policy-check outputs before any user-requested transformation — encoded or translated prompt content is still prompt content.
  3. Run enc-01 to enc-04 every release; treat ROT13 (enc-03) as the tripwire — failing it means zero transformation awareness.
  4. Refuse on decoded content explicitly ('that's an encoding of X; same answer as plain text') so attackers learn nothing about filter gaps.
  5. Regression-test encodings on every model swap — transformation fluency changes between models and silently reopens the family.

Probe your chatbot free → The free test runs eight real probes from the library against your bot, with transcripts. The full 72-probe battery, drift tracking and verify-fix live in ChatBreaker.

Sources

  • OWASP Top 10 for LLM Applications (2025) — LLM01:2025, Prompt Injection, the risk classification this post's attack taxonomy maps to.
  • RFC 4648, The Base16, Base32, and Base64 Data Encodings (2006) — The encoding schemes the enc probe family hides instructions inside.
  • ChatBreaker guides — The platform's own methodology guides: the ten attack classes, mutation testing and business-logic testing walkthroughs.

Frequently asked questions

Why can't filters just block base64 in chat?

Sometimes they can — a pure support bot may have no legitimate base64 traffic. But developers, APIs and power users paste encoded content legitimately, and attackers fall back to hex, ROT13 or split encodings. Decode-then-check is robust where blocking is brittle.

Are encoded attacks only about hiding bad requests?

No — they also hide exfiltration. Asking for the prompt in base64 or translated form (enc-04, se-04) defeats output filters that match literal prompt text. Output must be checked before transformation.

What about encodings split across multiple messages?

A real variant: each chunk is harmless, the assembled payload is not. Session-level reassembly and per-conversation suspicion scoring (the multiturn_adaptive defence) address it; single-message filters never will.

Does the model know it's being attacked when it decodes?

Not reliably — decoding is a comprehension task it performs neutrally, and compliance often follows automatically. That is why the policy check must be architecturally attached to the decoded content, not left to the model's discretion.

Is ROT13 really a threat? It's so weak.

As an attack, marginally — hence MEDIUM. As a diagnostic, invaluable: enc-03 failure tells you the pipeline has no transformation handling at all, which predicts failure on the stronger encodings too.

Related guides

  • Red-Team Chatbot Checklist 2026
  • Can a Chatbot Leak Its System Prompt?
  • AI Red Teaming for Chatbots: What Gets Tested
  • Prompt Injection in Customer Chatbots: 5 Attack Shapes
  • How Often Should You Red-Team a Chatbot?
  • Guide: The Ten Attack Classes
  • Guide: Mutation-Test Your Fix
  • Guide: Business-Logic Attacks
  • Run the free red-team test
  • Threat Pulse: attacks circulating now
  • ChatBreaker pricing
  • Chatbot Security Testing for Retail Support Bots
ChatBreaker · by Ingenious AI · automated red-teaming — test only chatbots you own or are authorized to test · About · Blog · Guides · Contact · Privacy · Terms · Security · Free Chatbot Security Test · Business-Logic Attacks · Catch Silent Model Swaps · Mutation-Test Your Fix · Ten Attack Classes
More from Ingenious AI:
DisclosureGuard — AI disclosure compliance · Vibe-Code Audit — AI code security scanner · Rogue-Agent Defense — AI agent firewall · BreachHunter — website penetration testing · ModelMinder — AI model deprecation radar · TermsWatch — AI vendor terms monitor · Agent Flight Recorder — tamper-evident agent audit trails · Agent Auth Gateway — agent credentials & kill switch · DomainGuard — domain impersonation defense · Agent Passport — Know-Your-Agent registry · AgentGate — agent policy publisher · AgentBlock — AI agent & crawler access control · BoundaryVault — agent log forensics · Agentic Receipts — verifiable agent payment receipts · EvalEgress — eval-to-production exposure scan · HomeShield MCP — home AI server exposure check · WireWatch — payment verification ceremony · ADMT Notice Kit — AI decision notice compliance · DueLadder — human-approved invoice chasing · Agent-Ready Store Audit — can AI agents buy from your store · ContentCraft AI — content operations · AgentReady — agent-readiness checks · AI Audit Exchange — AI audit exchange · CallbackShield — callback & webhook protection · CompanionGuard — AI companion safety guardrails · CRAClock — EU Cyber Resilience Act deadline clock · EInvoice Translator — e-invoice format translator · GEOFixer — geo & local listing fixes · MandateGuard — agent spending mandates · OutcomeMeter — AI outcome measurement · ProvenanceGuard — content provenance checks · ReviewDesk — review response desk · ReviewProof — verified review evidence · TakedownCoop — coordinated phishing takedowns · TrustGate — trust & safety gating · ChatBreaker — AI chatbot red-teaming · All 36 platforms — the Ingenious AI portfolio

We use cookies. Necessary cookies keep the site working. With your permission we also use analytics cookies (to understand usage) and marketing cookies (for ads). Read our privacy policy.

NecessaryRequired for login, security and core features. Always on.
AnalyticsHelps us understand which pages are useful.
MarketingUsed for advertising and measuring ad performance.
↑↓ navigate · Enter open · Esc close
← Go back