mlsanityData to 14 Oct 2026

TrojLLM: A Black-box Trojan Prompt Attack on Large Language Models

arXiv 2306.06815 ↗First posted 12 Jun 2023cs.CR cs.AI cs.CLcited by 31

Not on the map. Why?

Abstract (arXiv)

Large Language Models (LLMs) are progressively being utilized as machine learning services and interface tools for various applications. However, the security implications of LLMs, particularly in relation to adversarial and Trojan attacks, remain insufficiently examined. In this paper, we propose TrojLLM, an automatic and black-box framework to effectively generate universal and stealthy triggers. When these triggers are incorporated into the input data, the LLMs' outputs can be maliciously manipulated. Moreover, the framework also supports embedding Trojans within discrete prompts, enhancing the overall effectiveness and precision of the triggers' attacks. Specifically, we propose a trigger discovery algorithm for generating universal triggers for various inputs by querying victim LLM-based APIs using few-shot data samples. Furthermore, we introduce a novel progressive Trojan poisoning algorithm designed to generate poisoned prompts that retain efficacy and transferability across a diverse range of models. Our experiments and results demonstrate TrojLLM's capacity to effectively insert Trojans into text prompts in real-world black-box LLM APIs including GPT-3.5 and GPT-4, while maintaining exceptional performance on clean test sets. Our work sheds light on the potential security risks in current models and offers a potential defensive approach. The source code of TrojLLM is available at https://github.com/UCF-ML-Research/TrojLLM.

Key facts. Cited by 31 papers in the map (data through 14 Oct 2026). Builds on 32 of its 46 references that are in the map. First posted on arXiv 12 Jun 2023.

Builds on

32 of 46 references.

References · 32

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  2. 2020Language Models are Few-Shot Learnerscited by 32,419
  3. 2021Prefix-Tuning: Optimizing Continuous Prompts for Generationcited by 3,915
  4. 2015Character-level Convolutional Networks for Text Classificationcited by 2,330
  5. 2021Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processingcited by 2,234
  6. 2020DeBERTa: Decoding-enhanced BERT with Disentangled Attentioncited by 2,181
  7. 2019Language Models as Knowledge Bases?cited by 1,936
  8. 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,392
  9. 2020Making Pre-trained Language Models Better Few-shot Learnerscited by 1,256
  10. 2021Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivitycited by 1,135
  11. 2017BadNets: Identifying Vulnerabilities in the Machine Learning Model Supply Chaincited by 1,106
  12. 2019How Can We Know What Language Models Know?cited by 959
20 more
  1. 2019Universal Adversarial Triggers for Attacking and Analyzing NLPcited by 722
  2. 2018Fine-Pruning: Defending Against Backdooring Attacks on Deep Neural Networkscited by 580
  3. 2022RLPrompt: Optimizing Discrete Text Prompts with Reinforcement Learningcited by 366
  4. 2020Weight Poisoning Attacks on Pre-trained Modelscited by 341
  5. 2021Neural Attention Distillation: Erasing Backdoor Triggers from Deep Neural Networkscited by 324
  6. 2021Hidden Killer: Invisible Textual Backdoor Attacks with Syntactic Triggercited by 222
  7. 2020Reformulating Unsupervised Style Transfer as Paraphrase Generationcited by 183
  8. 2021Differentiable Prompt Makes Pre-trained Language Models Better Few-shot Learnerscited by 115
  9. 2021Turn the Combination Lock: Learnable Textual Backdoor Attacks via Word Substitutioncited by 89
  10. 2021Prompt Waywardness: The Curious Case of Discretized Interpretation of Continuous Promptscited by 64
  11. 2022BadPrompt: Backdoor Attacks on Continuous Promptscited by 63
  12. 2021Compression, Transduction, and Creation: A Unified Framework for Evaluating Natural Language Generationcited by 60
  13. 2017Shakespearizing Modern Language Using Copy-Enriched Sequence-to-Sequence Modelscited by 57
  14. 2022Exploring the Universal Vulnerability of Prompt-based Learning Paradigmcited by 57
  15. 2022TrojViT: Trojan Insertion in Vision Transformerscited by 31
  16. 2023TrojText: Test-time Invisible Textual Trojan Insertioncited by 28
  17. 2022PromptAttack: Prompt-based Attack for Language Models via Gradient Searchcited by 15
  18. 2023SSL-Cleanse: Trojan Detection and Mitigation in Self-Supervised Learningcited by 11
  19. 2022ESTAS: Effective and Stable Trojan Attacks in Self-supervised Encoders with One Target Unlabelled Samplecited by 9
  20. 2022Audit and Improve Robustness of Private Neural Networks on Encrypted Datacited by 4

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2023: 1; 2024: 10; 2025: 12; 2026: 8.

31 papers.

Sort:

By area:

  1. 2024BadRAG: Identifying Vulnerabilities in Retrieval Augmented Generation of Large Language Modelscited by 86
  2. 2024TrojanRAG: Retrieval-Augmented Generation Can Be Backdoor Driver in Large Language Modelscited by 67
  3. 2025Commercial LLM Agents Are Already Vulnerable to Simple Yet Dangerous Attackscited by 49
  4. 2023Backdoor Attacks and Countermeasures in Natural Language Processing Models: A Comprehensive Security Reviewcited by 39
  5. 2024A Survey of Recent Backdoor Attacks and Defenses in Large Language Modelscited by 36
  6. 2025Red Teaming the Mind of the Machine: A Systematic Evaluation of Prompt Injection and Jailbreak Vulnerabilities in LLMscited by 34
  7. 2024CROW: Eliminating Backdoors from Large Language Models via Internal Consistency Regularizationcited by 33
  8. 2025Towards Trustworthy Retrieval Augmented Generation for Large Language Models: A Surveycited by 30
  9. 2024ConfusedPilot: Confused Deputy Risks in RAG-based LLMscited by 22
  10. 2025A Survey of Attacks on Large Language Modelscited by 15
  11. 2024Stealthy Jailbreak Attacks on Large Language Models via Benign Data Mirroringcited by 12
  12. 2026A Systematic Survey of Security Threats and Defenses in LLM-Based AI Agents: A Layered Attack Surface Frameworkcited by 11
19 more
  1. 2025CipherPrune: Efficient and Scalable Private Transformer Inferencecited by 10
  2. 2025Position: LLM Watermarking Should Align Stakeholders' Incentives for Practical Adoptioncited by 7
  3. 2026Purifying Generative LLMs from Backdoors without Prior Knowledge or Clean Referencecited by 7
  4. 2024Adversarial Vulnerabilities in Large Language Models for Time Series Forecastingcited by 6
  5. 2024Neutralizing Backdoors through Information Conflicts for Large Language Modelscited by 5
  6. 2025TFHE-Coder: Evaluating LLM-agentic Fully Homomorphic Encryption Code Generationcited by 4
  7. 2025Adversarial Attacks against Neural Ranking Models via In-Context Learningcited by 4
  8. 2024Mitigating Adversarial Attacks in LLMs through Defensive Suffix Generationcited by 1
  9. 2025Large Language Models Can Verbatim Reproduce Long Malicious Sequencescited by 1
  10. 2025Boosting Adversarial Transferability via Commonality-Oriented Gradient Optimizationcited by 1
  11. 2025Stealthy Dual-Trigger Backdoors: Attacking Prompt Tuning in LM-Empowered Graph Foundation Modelscited by 1
  12. 2024Shortcuts Arising from Contrast: Effective and Covert Clean-Label Attacks in Prompt-Based Learningcited by 0
  13. 2025Breaking to Build: A Threat Model of Prompt-Based Attacks for Securing LLMscited by 0
  14. 2026Towards Unveiling Vulnerabilities of Large Reasoning Models in Machine Unlearningcited by 0
  15. 2026REALM: A Unified Red-Teaming Benchmark for Physical-World VLMscited by 0
  16. 2026Distill to Detect: Exposing Stealth Biases in LLMs through Cartridge Distillationcited by 0
  17. 2026Backdoor Containment via Expert Quarantine and Shutdown in LLMscited by 0
  18. 2026Backdoor Purification for LoRA-Tuned LLMs via Null-Space Projectioncited by 0
  19. 2026Cancerous Backdoor Attack: Gradual Activation via Invisible Tokens and A Stage Controllercited by 0