Skip to main content
Back

Nankai's StegoAttack Hides Harmful Queries in Plain Text, Hitting 95.5% Success Rate

A new steganographic jailbreak hides malicious prompts inside innocent paragraphs, hitting 95.5% success across GPT-5, Gemini-3, DeepSeek-V3.2 and Qwen3-max.

Pro

  • StegoAttack hides harmful queries as fixed-position words inside coherent, benign paragraphs to defeat LLM safety filters.
  • Achieves 95.5% average ASR across GPT-5, Gemini-3, DeepSeek-V3.2 and Qwen3-max, beating eight baselines.
  • Masked Regeneration turns a harmful query into a rewriting task, cutting auxiliary-model refusal rates to near zero.
  • A decrypt-respond-encrypt template also hides the model's answer, evading external detectors like WildGuard.
  • ASR drops under 27% under safety detectors, versus 100% collapse for AutoDAN and DRA baselines.
  • Code released at GenggengSvan/StegoAttack; requires a reasoning-capable target model to execute the pipeline.

A team from Nankai University has published a jailbreak technique that treats the problem of bypassing LLM safety filters as an information-hiding problem. Instead of scrambling text or roleplaying past guardrails, StegoAttack smuggles a harmful query inside a perfectly readable paragraph by placing the malicious words at fixed positions across sentences, and asks the target model to decode, answer, and re-encrypt its response.

The results are unusually strong for a black-box method. The authors evaluate StegoAttack on four state-of-the-art, safety-aligned LLMs, including GPT-5 and Gemini-3, and benchmark it against eight leading jailbreak methods. Averaged across those models, StegoAttack lands a 95.5% attack success rate, and the drop under external safety detectors is under 27 percentage points.

The stealth trade-off nobody had solved

Recent jailbreak research has split into two camps. One camp optimizes for linguistic stealth, making prompts look natural so that perplexity filters and grammar checkers do not flag them. The other pursues semantic stealth, obfuscating the toxic meaning itself through character encoding, ASCII art, or word fragmentation so that safety classifiers cannot recognize the intent.

The paper's core observation is that these two goals fight each other. Existing methods face a fundamental trade-off between semantic stealth (hiding malicious intent) and linguistic stealth (appearing natural), leaving them vulnerable to detection. AutoDAN produces fluent prompts but the malicious intent is still visible to LlamaGuard. Cipher hides the intent by encoding everything, but its output has hundreds of grammar errors per prompt and gets flagged as anomalous text.

Diagram showing stealth capabilities across jailbreak methods including AutoDAN, Cipher and StegoAttack

Hiding queries in plain sight

Steganography, the art of hiding a message inside an innocuous carrier, sidesteps the trade-off entirely. The core insight is to embed a harmful query within a benign, semantically coherent paragraph. This design provides semantic stealth by concealing the existence of malicious content, and ensures linguistic stealth by maintaining the natural fluency of the cover paragraph.

Concretely, a harmful query is split into words w_1, w_2, ..., w_n, and each word is anchored at a fixed position (say, the first word) of consecutive sentences in a cover paragraph. A carrier like "Bomb disposal experts work..." can hide the word "bomb" without ever tripping a classifier scanning for malicious content.

Three-stage pipeline

StegoAttack is not just a clever encoding. It is an end-to-end pipeline with three components:

  • Masked Regeneration Steganography. Rather than asking an auxiliary LLM to hide a harmful query directly (which triggers refusals), the method first builds a scaffold where the malicious words sit at their target positions and the rest of the tokens are random masks. An auxiliary model is then asked to rewrite this gibberish into a coherent paragraph while keeping the anchor words fixed. Because the model sees a rewriting task rather than a harmful instruction, refusal rates drop to near zero.
  • Steganographic In-Context Learning. Malicious question-and-answer demonstrations are themselves hidden inside benign passages and injected as few-shot examples. These serve as a latent blueprint that pushes the target model into an unsafe response pattern without any explicit malicious text appearing in the prompt.
  • Decrypt-respond-encrypt template. The final prompt walks the target through three steps: extract the hidden query from the cover, answer it, then re-embed the answer inside another benign paragraph. That last step matters because it defeats external detectors that scan the model's output.

What the numbers look like

On the AdvBench-50 and Malicious Instruct benchmarks, StegoAttack posts a 100% ASR on Gemini-3, 100% on DeepSeek-V3.2, 99.33% on Qwen3-max, and 82.67% on GPT-5. The strongest baseline against GPT-5, DRA, manages only 2%. Beyond raw success, GPT-4o judges rate the harmfulness of the responses at nearly 5/5 on three of the four models, meaning the outputs are not just refusals slipping through but substantive and dangerous.

Stealth metrics tell the second half of the story. StegoAttack averages 0.80 grammar errors per prompt versus 146 for Cipher and 68 for DRA, and its perplexity of 49.85 is orders of magnitude below GCG's 2,235. Under WildGuard, most baselines see their success rates collapse by 100%. StegoAttack loses only about 26%.

Where it works and where it does not

The technique has a real ceiling: it requires a target model competent enough to actually execute the multi-stage decrypt-respond-encrypt workflow. The authors ran a screening study and found that reasoning-enhanced models handle the pipeline well, while weaker or non-reasoning models struggle. Task quality also degrades as the hidden query gets longer.

Heatmap of decoded relatedness and full relatedness scores across models and question lengths

The authors also flag an uncomfortable implication in their limitations section: as models get smarter at following complex instructions, they get better at executing steganography, which means the attack surface grows with capability rather than shrinking. Safety alignment techniques that focus on surface-level pattern matching are unlikely to keep up.

Availability

The code is on GitHub, and the full paper includes the exact prompt templates, ablations over embedding position, and the LlamaGuard, ShieldLM, and WildGuard evaluation setup. For anyone building red-team pipelines or safety classifiers, it is a useful stress test: any guardrail that assumes malicious intent will appear as recognizable tokens in the input or output will fail against this class of attack.