The Trojan Knowledge: Bypassing Commercial LLM Guardrails via Harmless Prompt Weaving and Adaptive Tree Search

Rongzhe Wei, Peizhi Niu, Xinjie Shen, Tony Tu, Yifan Li, Ruihan Wu, Eli Chien, Pin-Yu Chen, Olgica Milenkovic, Pan Li

TL;DR

Current large language model (LLM) guardrails are highly effective at blocking prompts with obvious malicious intent, but they suffer from a fundamental blind spot: the interconnected nature of the model's own internal knowledge. This paper introduces the Correlated Knowledge Attack Agent (CKA-Agent), a framework that bypasses safety guardrails by adaptively weaving together sequences of entirely benign sub-queries to reconstruct harmful information. By treating the target LLM as a knowledge oracle and using an adaptive tree search, CKA-Agent consistently achieves over a 95% success rate against top commercial models like Gemini 2.5 and Claude-Haiku-4.5.

What Problem Does This Paper Address?

Most state-of-the-art jailbreak methods operate within a prompt-optimization paradigm. Whether they use genetic algorithms, reinforcement learning, or persona-based roleplay, they ultimately attempt to find a single, complex prompt that tricks the model into compliance. Because these optimized prompts still contain malicious semantic signals, modern, layered guardrails easily intercept them.

An alternative approach is decomposition, where a harmful objective is split into smaller, safer pieces. However, existing decomposition methods are static and brittle: they require the attacker to possess deep domain expertise to map out the sub-queries beforehand. If the target LLM refuses even a single sub-query, the entire attack chain collapses.

The authors address this gap by identifying a deeper vulnerability: an LLM's internal knowledge base is a highly interconnected web of facts. A restricted topic (e.g., synthesizing a dangerous compound) is inherently linked to numerous benign sub-facts (e.g., standard industrial chemical processes). CKA-Agent exploits this by dynamically and adaptively exploring these connections, using the target model's own feedback to guide the attack.

Methods

CKA-Agent reformulates jailbreaking as an adaptive, tree-structured exploration of the target LLM's knowledge base. Instead of following a rigid plan, it treats the target model as an environment that responds to locally innocuous queries.

The framework consists of four core components:

  1. Dynamic Decomposer (Attack Agent): Powered by an open-source LLM (Qwen3-32B-abliterated), this module analyzes the conversation history and generates the next set of benign sub-queries. It can dynamically choose to dive deeper down a single path or branch out into multiple parallel queries if it encounters ambiguity.
  2. Adaptive Tree Search: The framework utilizes an exploration strategy inspired by Monte Carlo Tree Search (MCTS). It applies the Upper Confidence Bound for Trees (UCT) policy for global node selection to find the most promising frontier, followed by a Depth-First Search (DFS) expansion. If a specific reasoning path is blocked by a refusal, the agent backtracks and adaptively reroutes to an alternative path.
  3. Hybrid Evaluator (Node Critic): This component scores each interaction based on an Introspection Score (logical coherence and goal relevance) and a Target Feedback Score (information gain vs. refusal penalties) to prioritize high-value branches.
  4. Synthesizer: Once the agent determines that enough fragmented "piece knowledge" has been collected along a path, the synthesizer aggregates these benign responses into a comprehensive final output that fulfills the original harmful objective.

The structural differences between this approach and traditional methods are illustrated in the authors' taxonomy:

Figure 3: Taxonomy of Attack Paradigms under the DAG Approach. (i) POA seeks the direct edge (v0, vans) but is blocked by guardrails detecting harmful intent. (ii) DA has a decompose plan that is limited to the decomposer’s own knowledge, and static and non-adaptive sub-queries may be refused (e.g., missing v2), as static plans cannot adapt to targeted feedback. (iii) CKA-Agent CKA-Agent treats the DAG as a dynamic environment, progressively “unrolling” the graph structure based on real-time feedback rather than adhering to a fixed plan.

Datasets

The authors evaluated CKA-Agent on a comprehensive testbed of 288 high-stakes harmful prompts curated from two widely recognized safety benchmarks:

  • HarmBench: Subsets requiring substantial domain knowledge and multi-step reasoning, specifically Chemical & Biological Weapons/Drugs, Illegal Activities, and Cybercrime & Unauthorized Intrusion (126 behaviors).
  • StrongREJECT: High-quality, factually verifiable forbidden prompts covering Illegal Goods and Services, Non-violent Crimes, and Violence (162 prompts).

Key Insights and Ideas

  • The Target LLM as a Knowledge Oracle: Attackers do not need prior domain expertise to execute complex attacks. Because the target LLM's internal knowledge is correlated, the attacker can use the model's own benign responses to bridge their expertise gap, effectively turning the target model into an oracle for its own destruction.
  • The Failure of "Perfect Memory" Defenses: To test the limits of current alignment, the authors evaluated a setup called CKA-Agent-Branch, where the target model is provided with the full conversation history of the branch (simulating a context-aware defense). Even with perfect memory—and even when explicitly primed with warnings to look out for distributed malicious intent (CKA-Agent-Primed)—the models still failed to detect the latent harmful objective.
  • Atomic vs. Distributed Intent: Current alignment techniques excel at detecting atomic harmful intent (single prompts containing malicious keywords). However, they lack the long-range contextual reasoning required to aggregate semantic signals and infer malicious intent when it is distributed across multiple turns.

Key Results

  • Exceptional Success Rates: CKA-Agent consistently achieved over 95% Full Success rates across all evaluated state-of-the-art commercial models, including Gemini 2.5 Flash, Gemini 2.5 Pro, GPT-oss-120B, and Claude-Haiku-4.5.
  • Resilience Against Advanced Alignment: On highly secure models like Claude-Haiku-4.5, prompt-optimization methods plummeted to near 0% success due to strict safety filters. CKA-Agent maintained a 96% success rate on HarmBench and a 96.9% success rate on StrongREJECT against the same model.
  • High Efficiency: Compared to other multi-turn or tree-search optimization methods, CKA-Agent demonstrated a superior cost-performance ratio, achieving its high success rates with significantly fewer API calls and tokens due to its optimized, simulation-free tree search.

Limitations and Future Work

  • Assumption of Decomposability: The framework relies on the assumption that a harmful target response can be reconstructed from safer, correlated facts. This strategy may fail against "atomic" secrets that lack benign logical neighbors, such as specific private cryptographic keys.
  • Dependence on Attacker Capability: The framework currently requires a capable open-source LLM to act as the planning agent. The minimum reasoning threshold required for an attacker agent to successfully execute this tree search remains an open question.
  • Future Defense Directions: The authors emphasize that prompt-level and representation-level defenses (like Circuit Breakers) remain inadequate for multi-turn scenarios. Future work must focus on developing context-aware guardrails capable of analyzing the semantic trajectory of an entire conversation to detect distributed intent.

Summary updated

Abstract

Large language models (LLMs) remain vulnerable to jailbreak attacks that bypass safety guardrails to elicit harmful outputs. Existing approaches overwhelmingly operate within the prompt-optimization paradigm: whether through traditional algorithmic search or recent agent-based workflows, the resulting prompts typically retain malicious semantic signals that modern guardrails are primed to detect. In contrast, we identify a deeper, largely overlooked vulnerability stemming from the highly interconnected nature of an LLM's internal knowledge. This structure allows harmful objectives to be realized by weaving together sequences of benign sub-queries, each of which individually evades detection. To exploit this loophole, we introduce the Correlated Knowledge Attack Agent (CKA-Agent), a dynamic framework that reframes jailbreaking as an adaptive, tree-structured exploration of the target model's knowledge base. The CKA-Agent issues locally innocuous queries, uses model responses to guide exploration across multiple paths, and ultimately assembles the aggregated information to achieve the original harmful objective. Evaluated across state-of-the-art commercial LLMs (Gemini2.5-Flash/Pro, GPT-oss-120B, Claude-Haiku-4.5), CKA-Agent consistently achieves over 95% success rates even against strong guardrails, underscoring the severity of this vulnerability and the urgent need for defenses against such knowledge-decomposition attacks. Our codes are available at https://github.com/Graph-COM/CKA-Agent.
BibTeX
@inproceedings{wei2026trojan,
  author = {Rongzhe Wei and Peizhi Niu and Xinjie Shen and Tony Tu and Yifan Li and Ruihan Wu and Eli Chien and Pin-Yu Chen and Olgica Milenkovic and Pan Li},
  title = {{The Trojan Knowledge: Bypassing Commercial LLM Guardrails via Harmless Prompt Weaving and Adaptive Tree Search}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=IlJeOnKW0K},
}
Figure