Observatory research catalog · ATO.T6236E94A · High severity

LLM Jailbreak: CodeChameleon (published research family)

CodeChameleon (Lv et al., 2024) hides restricted requests using custom reversible encodings or pseudocode/Python decryption routines provided directly inside the prompt. Capable coding and reasoning models execute the embedded decoding logic internally before intent-matching safety filters recognize the true request.

Technique dossier overview

Category
Prompt and context integrity
Severity
High
Attack surface
LLM / Prompt Layer
Platforms
Generative AI
Tactics
Defense Evasion, Privilege Escalation
Aliases
CodeChameleon
Catalog entry modified
Earliest cited research
· CodeChameleon: Personalized Encryption Framework for Jailbreaking Large Language Models · arXiv (author preprint; peer-review status not inferred)

Open ATO.T6236E94A in Interactive Technique Workbench

How the mechanism works

  1. An adversary encodes a restricted query using a custom mapping (binary trees, string reversals, custom ciphers, or Python dictionary lookups).
  2. The prompt provides the model with an explicit decryption function or pseudocode specification and instructs it to decode and fulfill the hidden task silently.
  3. Input safety classifiers see only harmless code structures and opaque arrays, while the target LLM reconstructs and answers the underlying query.

Detection & telemetry signals

Architectural defensive countermeasures

Framework crosswalk (OWASP LLM Top 10 & NIST AI RMF)

OWASP LLM Top 10 (2025)
OWASP rationale
Programmatic cipher smuggling bypasses ingress filters as obfuscated Prompt Injection (LLM01) and risks unsafe decoded output generation (LLM05).
NIST AI RMF functions
NIST AI RMF guidance
Benchmark reasoning models against ciphered/code-wrapped intent obfuscation under MEASURE, and enforce strong output-side inspection and validation under MANAGE.

Mapped defensive controls

Related technique records

Documented incidents & exercises (2)

Source citation records

Common questions

What is LLM Jailbreak: CodeChameleon (published research family) (ATO.T6236E94A)?
CodeChameleon (Lv et al., 2024) hides restricted requests using custom reversible encodings or pseudocode/Python decryption routines provided directly inside the prompt. Capable coding and reasoning models execute the embedded decoding logic internally before intent-matching safety filters recognize the true request.
How do you mitigate LLM Jailbreak: CodeChameleon (published research family)?
MITRE ATLAS maps 5 mitigations to ATO.T6236E94A: Validate AI Model, Generative AI Guardrails, Generative AI Guidelines, Generative AI Model Alignment, and Input and Output Validation for AI Agent Components. Rely strongly on semantic output classifiers (`AML.M0020`) and downstream output validation (`AML.M0033`), since plaintext intent only materializes inside model reasoning or final output.