ACL Findings2026
MultiCodeAttack: Iterative Jailbreak Attacking on LLMs with Multi-Code Prompt Injection
Weifeng Sun, Meng Yan, Zhou Yang, Yuchen Chen, Song Sun, David Lo
Abstract
Large Language Models (LLMs) demonstrate strong generalization capabilities but remain vulnerable to jailbreak attacks that induce restricted text or malicious code generation. Recent structured jailbreaks embed adversarial intent into code-like templates and have demonstrated promising effectiveness. However, existing approaches typically operate within a fixed template design and a single programming language, without considering language diversity or adaptive template evolution, thereby limiting the exploration of cross-language jailbreak behaviors. In this paper, we present MultiCodeAttack, a structured jailbreak framework that systematically explores and optimizes multi-language code templates. Mul-tiCodeAttack maintains a diverse template library across programming languages, dynamically selects languages with higher attack effectiveness via a multi-armed bandit strategy, and evolves templates through semantic-preserving mutation guided by response-aware signals. Extensive experiments on 8 LLMs show that MultiCodeAttack outperforms existing jailbreak baselines, achieving 28.23%-832.59% higher harmful text generation. On malicious code generation across 11 LLMs, Mul-tiCodeAttack produces up to 136.22% more malicious outputs than the baseline methods. Our code is available at https://anonymous. 4open.science/r/MultiCodeAttack/.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
Lineage
- GPT-4 Is Too Smart To Be Safe: Stealthy Chat with LLMs via Cipher cites Principle-Driven Self-Alignment of Language Models from Scratch with Minimal Human Supervision
- Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To! cites Principle-Driven Self-Alignment of Language Models from Scratch with Minimal Human Supervision
- Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To! cites Finetuned Language Models are Zero-Shot Learners
Builds on12
- Finetuned Language Models are Zero-Shot LearnersJason Wei, Maarten Bosma, Vincent Y. Zhao, Kelvin Guu et al.ICLR 2022 · 4,966 citations
- Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To!Xiangyu Qi, Yi Zeng, Tinghao Xie, Pin-Yu Chen et al.ICLR 2024 · 1,104 citations
- Tree of Attacks: Jailbreaking Black-Box LLMs AutomaticallyAnay Mehrotra, Manolis Zampetakis, Paul Kassianik, Blaine Nelson et al.NeurIPS 2024 · 835 citations
- Principle-Driven Self-Alignment of Language Models from Scratch with Minimal Human SupervisionZhiqing Sun, Yikang Shen, Qinhong Zhou, Hongxin Zhang et al.NeurIPS 2023 · 463 citations
- GPT-4 Is Too Smart To Be Safe: Stealthy Chat with LLMs via CipherYouliang Yuan, Wenxiang Jiao, Wenxuan Wang, Jen-tse Huang et al.ICLR 2024 · 441 citations
Related papers
- Stand on The Shoulders of Giants: Building JailExpert from Previous Attack ExperienceXi Wang, Songlei Jian, Shasha Li, Xiaopeng Li et al.EMNLP 2025 · 1 citation
- Efficient LLM-Jailbreaking via Multimodal-LLM JailbreakHaoxuan Ji, Zheng Lin, Zhenxing Niu, Xinbo Gao et al.AAAI 2026 · 4 citations
- From LLMs to MLLMs: Exploring the Landscape of Multimodal JailbreakingSiyuan Wang, Zhuohan Long, Zhihao Fan, Zhongyu WeiEMNLP 2024 · 5 citations
- LLMs Caught in the Crossfire: Malware Requests and Jailbreak ChallengesHaoyang Li, Huan Gao, Zhiyuan Zhao, Zhiyu Lin et al.ACL 2025
- MultiBreak: A Scalable and Diverse Multi-turn Jailbreak Benchmark for Evaluating LLM SafetyJialin Song, Xiaodong Liu, Weiwei Yang, Wuyang Chen et al.ICML 2026 · 5 citations
