The LMVD-ID is an internal research identifier, not an official CVE identifier.
Implicit Prompt Code Jailbreak
Large Language Models (LLMs) used for code generation are vulnerable to a jailbreaking attack that leverages implicit malicious prompts. The attack exploits the fact that existing safety mechanisms primarily rely on…
Paper-evaluated models(6)
Claude 3.5 Sonnet, Code Llama 13B Instruct, DeepSeek Coder 7B +3 more
- Claude 3.5 Sonnet
- Code Llama 13B Instruct
- DeepSeek Coder 7B
- DeepSeek V3
- GPT-4
- Qwen Plus
Description
Large Language Models (LLMs) used for code generation are vulnerable to a jailbreaking attack that leverages implicit malicious prompts. The attack exploits the fact that existing safety mechanisms primarily rely on explicit malicious intent within the prompt instructions. By embedding malicious intent implicitly within a benign-appearing commit message accompanying a code request (e.g., in a simulated software evolution scenario), the attacker can bypass the LLM's safety filters and induce the generation of malicious code. The malicious intent is not directly stated in the instruction, but rather hinted at in the context of the commit message and the code snippet.
Examples
See the research paper "Smoke and Mirrors: Jailbreaking LLM-based Code Generation via Implicit Malicious Prompts" for specific examples. The paper includes examples demonstrating the creation of implicit malicious prompts for text-to-code, function-level completion, and block-level completion tasks.
Impact
Successful exploitation allows attackers to generate malicious code, such as malware or code for denial-of-service attacks, bypassing the LLM's built-in safety features. The generated code may then be used to compromise systems or data. The attack's success rate is significantly higher than techniques relying solely on explicitly malicious prompts.
Affected Systems
LLM-based code generation systems using models susceptible to this implicit prompt injection technique. The paper evaluates DeepSeek-V3, GPT-4, Claude-3.5-Sonnet, Gemini-2.0, Qwen-Plus, CodeLlama-13B-Instruct, and DeepSeek-Coder-7B.
Mitigation Steps
- Implement more robust safety mechanisms that analyze not only explicit instructions but also the complete context of the prompt, including any attached information like commit messages.
- Develop techniques to detect and mitigate implicit cues indicating malicious intent.
- Adopt a layered security approach with multiple independent safety checks.
- Regularly update and improve the models' safety training data to include examples of implicit malicious prompts.
- Carefully review and validate all generated code for malicious behavior before deploying it.
Research context and confidence
- Evidence and verification
- Paper-reported; independent reproduction is not documented.
- Primary research source linked.
- Severity
- Not rated by this catalog.
- Source and publication type
- arXiv · Research preprint.
- Peer-review status is not provided by this source.
- Author and publication status
- Author metadata is not stored; see the primary paper.
- Threat model and attacker access
- Black-box model, service, or application access.
- Related deployment categories
- No related deployment category is classified.
- Taxonomy labels only; paper-specific deployment prerequisites are not inferred.
- Affected systems
- LLM-based code generation systems using models susceptible to this implicit prompt injection technique. The paper evaluates DeepSeek-V3, GPT-4, Claude-3.5-Sonnet, Gemini-2.0, Qwen-Plus, CodeLlama-13B-Instruct, and…
Research Paper
Smoke and Mirrors: Jailbreaking LLM-based Code Generation via Implicit Malicious Prompts
Primary source: arXiv. Findings are reported by the cited research and have not been independently verified.
View PaperEvidence
This entry is based on a primary research source. Its findings are paper-reported; independent reproduction and verification are not claimed.
https://arxiv.org/abs/2503.17953Related research
- MDH: Hybrid Jailbreak Detection Strategy
Published August 1, 2025 · prompt-layer, application-layer, injection
- LLM Router Rerouting
Published January 1, 2026 · application-layer, prompt-layer, injection
- Semantic Tool Poisoning
Published December 1, 2025 · application-layer, prompt-layer, injection