Beware EviLLM: Enabling Vulnerability Injection via Large Language Models
cs.CR, cs.AI
Submitted: 2026-10-02
Updated: 2026-10-02
License: http://creativecommons.org/licenses/by/4.0/
The gist: Advances in large language models (LLMs) have enabled AI-driven code generation from natural language specifications, introducing new attack surfaces for injecting vulnerabilities into software.
Abstract
Advances in large language models (LLMs) have enabled AI-driven code generation from natural language specifications, introducing new attack surfaces for injecting vulnerabilities into software. Prior work has studied this problem only in benign settings where vulnerabilities are introduced inadvertently, or under unconventional threat models where the LLM itself is malicious (backdooring) or the user is the attacker (jailbreaking). In this paper, we study a more realistic threat model: a third-party adversary, with capabilities comparable to existing cybercriminals, compromises the AI code generation pipeline to deliberately introduce vulnerabilities. We call this the EviLLM attack. We have implemented two instances of EviLLM, each of which only requires the underlying LLM to be accessed through a compromised account or browser, and can inject vulnerabilities from 13 CWE classes. As we show in our feasibility study, both attack vectors are already used to implement many existing cyberattacks. Our user study shows that 7 out of 8 and 10 out of 13 participants did not notice the vulnerabilities injected by the two instances of EviLLM, and 13 out of 21 participants "rarely" or "never" considered the risk of an attack like EviLLM.
Sources
- Trojans in Large Language Models of Code: A Critical Review through a Trigger-Based Taxonomy
- ChatGPT and Software Testing Education: Promises & Perils
- Prompt Packer: Deceiving LLMs through Compositional Instruction with Hidden Attacks
- Code Llama: Open Foundation Models for Code
- LongMemEval: Benchmarking Chat Assistants on Long-Term Interactive Memory
- DeceptPrompt: Exploiting LLM-driven Code Generation via Adversarial Natural Language Instructions
- Attacks on Third-Party APIs of Large Language Models
- WildChat: 1M ChatGPT Interaction Logs in the Wild
Related papers
- SoK: AI-Augmented Binary Reversing
- Relaxed Sender Anonymity for CBDC Interbank Settlement: A Zero-Knowledge Approach on Permissioned EVM
- Calibration-Family Overfit: Why Trusted Sabotage Monitors Don't Transfer Across Lineages
- Efficient Fuzzy PSI under One-Sided Assumptions
- Sealing the Audit-Runtime Gap for LLM Skills
- Token Composition: A Graph Based on EVM Logs