The LMVD-ID is an internal research identifier, not an official CVE identifier.
Query Code Jailbreak
Large Language Models (LLMs) are vulnerable to QueryAttack, a novel jailbreak technique that leverages structured, non-natural query languages (e.g., SQL, URL formats, or other programming language constructs) to…
Paper-evaluated models(14)
DeepSeek Chat, DeepSeek R1, Gemini 1.5 Flash +11 more
- DeepSeek Chat
- DeepSeek R1
- Gemini 1.5 Flash
- Gemini 1.5 Pro
- GPT-3.5 Turbo
- GPT-4 Turbo
- GPT-4o
- Llama 3.1 70B Instruct
- Llama 3.1 8B Instruct
- Llama 3.2 11B Vision Instruct
- Llama 3.2 1B Instruct
- Llama 3.2 3B Instruct
- Llama 3.3 70B Instruct
- o1
Description
Large Language Models (LLMs) are vulnerable to QueryAttack, a novel jailbreak technique that leverages structured, non-natural query languages (e.g., SQL, URL formats, or other programming language constructs) to bypass safety alignment mechanisms. The attack translates malicious natural language queries into these structured formats, exploiting the LLM's ability to understand and process such languages without triggering safety filters designed for natural language prompts. The LLM then responds in natural language, providing the requested (malicious) information.
Examples
See QueryAttack repository: https://github.com/horizonsinzqs/QueryAttack (opens in a new tab). The repository contains examples using various programming languages to craft malicious queries that successfully elicit harmful responses from various LLMs. Specific examples are included in Appendix A of the linked paper.
Impact
Successful exploitation of this vulnerability allows attackers to circumvent safety restrictions implemented in LLMs, potentially leading to the generation of harmful content such as instructions for creating weapons, disseminating misinformation, or providing other illegal or unethical information.
Affected Systems
A wide range of LLMs, including but not limited to, GPT-3.5, GPT-4, GPT-4o, O1, Deepseek, Gemini-flash, Gemini-pro, Llama 3.1, Llama 3.2, and Llama 3.3, are affected. The vulnerability is not necessarily tied to a specific model architecture or parameter size, as demonstrated by successful attacks across different models of varying sizes.
Mitigation Steps
- Improved Safety Filters: Develop safety filters that are effective against structured query languages, not just natural language. This requires extending existing safety filters to recognize malicious intent when expressed in non-natural language formats.
- Input Sanitization: Implement input sanitization techniques specifically designed to detect and block potentially harmful structured queries before they reach the core LLM processing.
- Cross-lingual Reasoning: Employ cross-lingual chain-of-thought prompting to encourage the model to translate non-natural language queries into natural language before processing, allowing standard safety filters to function effectively. This approach adds additional processing steps to increase the likelihood of malicious intent detection.
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
- A wide range of LLMs, including but not limited to, GPT-3.5, GPT-4, GPT-4o, O1, Deepseek, Gemini-flash, Gemini-pro, Llama 3.1, Llama 3.2, and Llama 3.3, are affected. The vulnerability is not necessarily tied to a…
Research Paper
QueryAttack: Jailbreaking Aligned Large Language Models Using Structured Non-natural Query Language
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/2502.09723Related research
- EvoSynth: Evolutionary Attack Synthesis
Published November 1, 2025 · model-layer, application-layer, injection
- Automated Red-Teaming Achieves 100% ASR
Published August 1, 2025 · prompt-layer, jailbreak, blackbox
- Agent Policy Hacking
Published July 1, 2025 · application-layer, model-layer, prompt-layer