Casting a SPELL: Sentence Pairing Exploration for LLM Limitation-breaking
On the map: LLM safety and security → Jailbreaking
Abstract (arXiv)
Large language models (LLMs) have revolutionized software development through AI-assisted coding tools, enabling developers with limited programming expertise to create sophisticated applications. However, this accessibility extends to malicious actors who may exploit these powerful tools to generate harmful software. Existing jailbreaking research primarily focuses on general attack scenarios against LLMs, with limited exploration of malicious code generation as a jailbreak target. To address this gap, we propose SPELL, a comprehensive testing framework specifically designed to evaluate the weakness of security alignment in malicious code generation. Our framework employs a time-division selection strategy that systematically constructs jailbreaking prompts by intelligently combining sentences from a prior knowledge dataset, balancing exploration of novel attack patterns with exploitation of successful techniques. Extensive evaluation across three advanced code models (GPT-4.1, Claude-3.5, and Qwen2.5-Coder) demonstrates SPELL's effectiveness, achieving attack success rates of 83.75%, 19.38%, and 68.12% respectively across eight malicious code categories. The generated prompts successfully produce malicious code in real-world AI development tools such as Cursor, with outputs confirmed as malicious by state-of-the-art detection systems at rates exceeding 73%. These findings reveal significant security gaps in current LLM implementations and provide valuable insights for improving AI safety alignment in code generation applications.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Placed in Jailbreaking, one of 12 directions in LLM safety and security. Builds on 41 of its 60 references that are in the map. First posted on arXiv 24 Dec 2025.
Builds on
41 of 60 references.
Closest ancestors · 17
Same direction, newest first
- 2025OmniSafeBench-MM: A Unified Benchmark and Toolbox for Multimodal Jailbreak Attack-Defense Evaluation6 Dec
- 2025LLMs Caught in the Crossfire: Malware Requests and Jailbreak Challenges9 Jun
- 2025Breaking the Ceiling: Exploring the Potential of Jailbreak Attacks through Expanding Strategy Space27 May
- 2024When LLM Meets DRL: Advancing Jailbreaking Efficiency via DRL-guided Search13 Jun
- 2024Making Them Ask and Answer: Jailbreaking Large Language Models in Few Queries via Disguise and Reconstruction28 Feb
- 2024Foot In The Door: Understanding Large Language Model Jailbreaking via Cognitive Psychology24 Feb
- 2024A Comprehensive Study of Jailbreak Attack versus Defense for Large Language Models21 Feb
- 2024How Johnny Can Persuade LLMs to Jailbreak Them: Rethinking Persuasion to Challenge AI Safety by Humanizing LLMs12 Jan
- 2023Cognitive Overload: Jailbreaking Large Language Models with Overloaded Logical Thinking16 Nov
- 2023A Wolf in Sheep's Clothing: Generalized Nested Jailbreak Prompts can Fool Large Language Models Easily14 Nov
- 2023Jailbreaking Black Box Large Language Models in Twenty Queries12 Oct
- 2023Jailbreak and Guard Aligned Language Models with Only Few In-Context Demonstrations10 Oct
5 more
- 2023Open Sesame! Universal Black Box Jailbreaking of Large Language Models4 Sep
- 2023GPT-4 Is Too Smart To Be Safe: Stealthy Chat with LLMs via Cipher12 Aug
- 2023"Do Anything Now": Characterizing and Evaluating In-The-Wild Jailbreak Prompts on Large Language Models7 Aug
- 2023Universal and Transferable Adversarial Attacks on Aligned Language Models27 Jul
- 2023Jailbreaking ChatGPT via Prompt Engineering: An Empirical Study23 May
Other references · 24
- 2023GPT-4 Technical Reportcited by 18,396
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
- 2021TruthfulQA: Measuring How Models Mimic Human Falsehoodscited by 2,975
- 2023Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injectioncited by 1,443
- 2020RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language Modelscited by 1,255
- 2022Ignore Previous Prompt: Attack Techniques For Language Modelscited by 832
- 2023Prompt Injection attack against LLM-integrated Applicationscited by 605
- 2023Toxicity in ChatGPT: Analyzing Persona-assigned Language Modelscited by 360
- 2021Recursively Summarizing Books with Human Feedbackcited by 290
- 2024ArtPrompt: ASCII Art-based Jailbreak Attacks against Aligned LLMscited by 216
- 2024Rainbow Teaming: Open-Ended Generation of Diverse Adversarial Promptscited by 205
- 2023Automatically Auditing Large Language Models via Discrete Optimizationcited by 191
12 more
- 2021Challenges in Detoxifying Language Modelscited by 169
- 2024DiT4Edit: Diffusion Transformer for Image Editingcited by 101
- 2024RedCode: Risky Code Execution and Generation Benchmark for Code Agentscited by 90
- 2024CodeAttack: Revealing Safety Generalization Challenges of Large Language Models via Code Completioncited by 76
- 2023From Prompt Injections to SQL Injection Attacks: How Protected is Your LLM-Integrated Web Application?cited by 55
- 2025EEdit: Rethinking the Spatial and Temporal Redundancy for Efficient Image Editingcited by 45
- 2025LitBench: A Benchmark and Dataset for Reliable Evaluation of Creative Writingcited by 42
- 2023NOTABLE: Transferable Backdoor Attacks Against Prompt-based NLP Modelscited by 37
- 2024Sandwich attack: Multi-language Mixture Adaptive Attack on LLMscited by 20
- 2023An Empirical Study of Malicious Code In PyPI Ecosystemcited by 19
- 2024Small Language Models can Outperform Humans in Short Creative Writing: A Study Comparing SLMs with Humans and LLMscited by 17
- 2025Follow-Your-Instruction: A Comprehensive MLLM Agent for World Data Synthesiscited by 10
Built on by
Citing papers per year: 2026: 1.
1 paper.
Similar, not cited
Close in wording, no citation either way
- 2025A Domain-Based Taxonomy of Jailbreak Vulnerabilities in Large Language Models
- 2025Formalization Driven LLM Prompt Jailbreaking via Reinforcement Learning
- 2024Jailbreaking and Mitigation of Vulnerabilities in Large Language Models
- 2025PandaGuard: Systematic Evaluation of LLM Safety against Jailbreaking Attacks
- 2026The Art of the Jailbreak: Formulating Jailbreak Attacks for LLM Security Beyond Binary Scoring
- 2025Align to Misalign: Automatic LLM Jailbreak with Meta-Optimized LLM Judges
- 2024Defending against Jailbreak through Early Exit Generation of Large Language Models
- 2025Forewarned is Forearmed: Pre-Synthesizing Jailbreak-like Instructions to Enhance LLM Safety Guardrail to Potential Attacks