LLMs Caught in the Crossfire: Malware Requests and Jailbreak Challenges
Haoyang Li, Huan Gao, Zhiyuan Zhao, Zhiyu Lin, Junyu Gao, Xuelong Li
Abstract
The widespread adoption of Large Language Models (LLMs) has heightened concerns about their security, particularly their vulnerability to jailbreak attacks that leverage crafted prompts to generate malicious outputs. While prior research has been conducted on general security capabilities of LLMs, their specific susceptibility to jailbreak attacks in code generation remains largely unexplored. To fill this gap, we propose MalwareBench, a benchmark dataset containing 3,520 jailbreaking prompts for malicious code-generation, designed to evaluate LLM robustness against such threats. Mal-wareBench is based on 320 manually crafted malicious code generation requirements, covering 11 jailbreak methods and 29 code functionality categories. Experiments show that mainstream LLMs exhibit limited ability to reject malicious code-generation requirements, and the combination of multiple jailbreak methods further reduces the model's security capabilities: specifically, the average rejection rate for malicious content is 60.93%, dropping to 39.92% when combined with jailbreak attack algorithms. Our work highlights that the code security capabilities of LLMs still pose significant challenges.
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.
2 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- GPT-4 Is Too Smart To Be Safe: Stealthy Chat with LLMs via Cipher cites Catastrophic Jailbreak of Open-source LLMs via Exploiting Generation
- GPT-4 Is Too Smart To Be Safe: Stealthy Chat with LLMs via Cipher cites How Johnny Can Persuade LLMs to Jailbreak Them: Rethinking Persuasion to Challenge AI Safety by Humanizing LLMs
- How Johnny Can Persuade LLMs to Jailbreak Them: Rethinking Persuasion to Challenge AI Safety by Humanizing LLMs cites GPT-4 Is Too Smart To Be Safe: Stealthy Chat with LLMs via Cipher
- Casting a SPELL: Sentence Pairing Exploration for LLM Limitation-Breaking cites GPT-4 Is Too Smart To Be Safe: Stealthy Chat with LLMs via Cipher
- Casting a SPELL: Sentence Pairing Exploration for LLM Limitation-Breaking cites How Johnny Can Persuade LLMs to Jailbreak Them: Rethinking Persuasion to Challenge AI Safety by Humanizing LLMs
- Casting a SPELL: Sentence Pairing Exploration for LLM Limitation-Breaking cites AutoDAN: Generating Stealthy Jailbreak Prompts on Aligned Large Language Models
- Catastrophic Jailbreak of Open-source LLMs via Exploiting Generation cites Language Models are Few-Shot Learners
- How Johnny Can Persuade LLMs to Jailbreak Them: Rethinking Persuasion to Challenge AI Safety by Humanizing LLMs cites AutoDAN: Generating Stealthy Jailbreak Prompts on Aligned Large Language Models
- AutoDAN: Generating Stealthy Jailbreak Prompts on Aligned Large Language Models cites GPT-4 Is Too Smart To Be Safe: Stealthy Chat with LLMs via Cipher
Cited by top-tier papers2
- Casting a SPELL: Sentence Pairing Exploration for LLM Limitation-BreakingYifan Huang, Xiaojun Jia, Wenbo Guo, Yuqiang Sun et al.FSE 2026
- MalTotal: Cost-Effective and Language-Agnostic Malicious Code Poisoning Detection for Millions of RepositoriesJian Zhao, Shenao Wang, Qingyang Wu, Yanjie Zhao et al.ISSTA 2026
Builds on10
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- AutoDAN: Generating Stealthy Jailbreak Prompts on Aligned Large Language ModelsXiaogeng Liu, Nan Xu, Muhao Chen, Chaowei XiaoICLR 2024 · 722 citations
- Catastrophic Jailbreak of Open-source LLMs via Exploiting GenerationYangsibo Huang, Samyak Gupta, Mengzhou Xia, Kai Li et al.ICLR 2024 · 481 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
- How Johnny Can Persuade LLMs to Jailbreak Them: Rethinking Persuasion to Challenge AI Safety by Humanizing LLMsYi Zeng, Hongpeng Lin, Jingwen Zhang, Diyi Yang et al.ACL 2024 · 64 citations
Related papers
- RMCBench: Benchmarking Large Language Models' Resistance to Malicious CodeJiachi Chen, Qingyuan Zhong, Yanlin Wang, Kaiwen Ning et al.ASE 2024 · 6 citations
- Don't Listen To Me: Understanding and Exploring Jailbreak Prompts of Large Language ModelsZhiyuan Yu, Xiaogeng Liu, Shunning Liang, Zach Cameron et al.USENIX Security 2024 · 103 citations
- Audio Jailbreak: An Open Comprehensive Benchmark for Jailbreaking Large Audio-Language ModelsZirui Song, Qian Jiang, Mingxuan Cui, Mingzhe Li et al.ACL 2026 · 20 citations
- JALMBench: Benchmarking Jailbreak Vulnerabilities in Audio Language ModelsZifan Peng, Yule Liu, Zhen Sun, Mingchen Li et al.ICLR 2026 · 20 citations
- Knowledge-to-Jailbreak: Investigating Knowledge-driven Jailbreaking Attacks for Large Language ModelsShangqing Tu, Zhuoran Pan, Wenxuan Wang, Zhexin Zhang et al.KDD 2025
