Mind Mapping Prompt Injection: Visual Prompt Injection Attacks in Modern Large Language Models
Abstract
:1. Introduction
- Introduction of a mind map image-based prompt injection attack with a high success rate, targeting multimodal LLMs equipped with robust security measures.
- Development of a mind map image generator to facilitate the creation of a malicious mind map for use in the proposed attack method.
- Design of a specialized prompt tailored for mind map image-based prompt injection attacks.
2. Related Work
2.1. Pure Text-Based Prompt Injection
2.2. Multimodal-Based Prompt Injection
2.3. Encoding-Based Prompt Injection
2.4. Masked-Based Prompt Injection
3. Proposed Approach
3.1. Entire Structure
3.2. Mind Map Image-Based Prompt Injection Attack
- Step 1: The malicious user input is provided to the mind map image generator.
- Step 2: The mind map image generator creates a text-based markdown file embedding the malicious user input.
- Step 3: A mind map image is generated from the markdown file.
- Step 4: The resulting mind map image is submitted to the LLM, along with an instructional prompt to execute a jailbreak attack.
3.2.1. Step 1: Input Malicious Instruction
3.2.2. Step 2: Generate Markdown
- Completed sections: These contain legitimate instructions unrelated to the attack. Each follows the main-topic–subtopic–explain format and serves as a reference for structuring the incomplete section. The contents of these sections are already created.
- Incomplete section: This section contains malicious user input integrated as a subtopic but lacks lower-level content, such as an “explain” node. As a result, its structure is limited to a central topic and its subtopics.
3.2.3. Step 3. Generating the Mind Map Image
3.2.4. Step 4: Inputting the Prompt
4. Performance Evaluation
4.1. Experimental Environment
4.2. Helpful Rate
4.3. Attack Success Rate
4.4. Failure Case Analysis
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
Appendix A
Appendix A.1. Markdown Structure
Appendix A.2. Mind Map Structure
Appendix A.3. Text Prompt with Instructions
Appendix A.4. Mind Map Prompt Injection Output
Appendix B
Appendix B.1. Markdown
- Main topic: The highest level, appearing only once per document, defining the overarching topic. Each line starting with “#” is treated as the top node.
- Subtopic: A secondary node under the main topic, representing a subcategory or specific subject. It can introduce additional subtopics or explanations.
- Explain: The lowest-level node providing detailed explanations for the corresponding subtopic. If an explanation is extensive, multiple nodes may exist under the same subtopic.
Appendix B.2. Mind Map
- The central image represents the main topic.
- The main branches extend from the central image and encapsulate key concepts using keywords or images.
- Sub-branches expand upon the main branches, providing additional explanations.
- Detailed branches offer further elaboration on the sub-branch content.
References
- Las Vegas Cybertruck Explosion Suspect Used ChatGPT to Plan Attack: Police. Available online: https://6abc.com/post/las-vegas-news-tesla-cybertruck-explosion-suspect-matthew-livelsberger-used-chatgpt-attack-trump-tower-hotel-police-say/15773080/ (accessed on 30 January 2025).
- Shenoy, N.; Mbaziira, A.V. An Extended Review: LLM Prompt Engineering in Cyber Defense. In Proceedings of the 2024 International Conference on Electrical, Computer and Energy Technologies, Sydney, Australia, 25–27 July 2024; pp. 1–6. [Google Scholar]
- Hines, K.; Lopez, G.; Hall, M.; Zarfati, F.; Zunger, Y.; Kiciman, E. Defending against indirect prompt injection attacks with spotlighting. arXiv 2024, arXiv:2403.14720. [Google Scholar]
- IBM—What Is a Prompt Injection Attack? Available online: https://www.ibm.com/think/topics/prompt-injection (accessed on 30 January 2025).
- Chen, S.; Piet, J.; Sitawarin, C.; Wagner, D. Struq: Defending against prompt injection with structured queries. arXiv 2024, arXiv:2402.06363. [Google Scholar]
- Wallace, E.; Xiao, K.Y.; Leike, R.H.; Weng, L.; Heidecke, J.; Beutel, A. The instruction hierarchy: Training llms to prioritize privileged instructions. arXiv 2024, arXiv:2404.13208. [Google Scholar]
- Christiano, P.F.; Leike, J.; Brown, T.; Martic, M.; Legg, S.; Amodei, D. Deep reinforcement learning from human preferences. arXiv 2017, arXiv:1706.03741. [Google Scholar]
- Adversarial Prompting in LLMs. Available online: https://www.promptingguide.ai/risks/adversarial (accessed on 10 February 2025).
- Prompt Guard. Available online: https://www.llama.com/docs/model-cards-and-prompt-formats/prompt-guard/ (accessed on 3 March 2025).
- Mind Mapping: Scientific Research and Studies. Available online: https://b701d59276e9340c5b4d-ba88e5c92710a8d62fc2e3a3b5f53bbb.ssl.cf2.rackcdn.com/docs/Mind%20Mapping%20Evidence%20Report.pdf?uncri=10492&uncrt=0 (accessed on 3 March 2025).
- Liu, Y.; Deng, G.; Li, Y.; Wang, K.; Wang, Z.; Wang, X.; Zhang, T.; Liu, Y.; Wang, H.; Zheng, Y.; et al. Prompt Injection attack against LLM-integrated Applications. arXiv 2023, arXiv:2306.05499. [Google Scholar]
- Zhang, C.; Jin, M.; Yu, Q.; Liu, C.; Xue, H.; Jin, X. Goal-guided generative prompt injection attack on large language models. arXiv 2024, arXiv:2404.07234. [Google Scholar]
- Chen, Y.; Li, H.; Sui, Y.; He, Y.; Liu, Y.; Song, Y.; Hooi, B. Can Indirect Prompt Injection Attacks Be Detected and Removed? arXiv 2025, arXiv:2502.16580. [Google Scholar]
- Yao, Y.; Duan, J.; Xu, K.; Cai, Y.; Sun, Z.; Zhang, Y. A survey on large language model (llm) security and privacy: The good, the bad, and the ugly. High-Confid. Comput. 2024, 4, 100211. [Google Scholar]
- Liu, F.; Lin, K.; Li, L.; Wang, J.; Yacoob, Y.; Wang, L. Mitigating hallucination in large multi-modal models via robust instruction tuning. arXiv 2023, arXiv:2306.14565. [Google Scholar]
- Multi-Modal Prompt Injection Attacks Using Images. Available online: https://www.cobalt.io/blog/multi-modal-prompt-injection-attacks-using-images (accessed on 5 March 2025).
- Kimura, S.; Tanaka, R.; Miyawaki, S.; Suzuki, J.; Sakaguchi, K. Empirical analysis of large vision-language models against goal hijacking via visual prompt injection. arXiv 2024, arXiv:2408.03554. [Google Scholar]
- Multimodal Neurons in Artificial Neural Networks. Available online: https://distill.pub/2021/multimodal-neurons/ (accessed on 6 March 2025).
- Ye, M.; Rong, X.; Huang, W.; Du, B.; Yu, N.; Tao, D. A Survey of Safety on Large Vision-Language Models: Attacks, Defenses and Evaluations. arXiv 2025, arXiv:2502.14881. [Google Scholar]
- Code. Available online: https://en.wikipedia.org/wiki/Code (accessed on 14 March 2025).
- Base64. Available online: https://en.wikipedia.org/wiki/Base64 (accessed on 8 January 2025).
- Leetspeak. Available online: https://en.wikipedia.org/wiki/Leet (accessed on 8 January 2025).
- Yuan, Y.; Jiao, W.; Wang, W.; Huang, J.T.; He, P.; Shi, S.; Tu, Z. Gpt-4 is too smart to be safe: Stealthy chat with llms via cipher. arXiv 2023, arXiv:2308.06463. [Google Scholar]
- Jiang, F.; Xu, Z.; Niu, L.; Xiang, Z.; Ramasubramanian, B.; Li, B.; Poovendran, R. ArtPrompt: ASCII Art-based Jailbreak Attacks against Aligned LLMs. arXiv 2024, arXiv:2402.11753. [Google Scholar]
- Rossi, S.; Michel, A.M.; Mukkamala, R.R.; Thatcher, J.B. An early categorization of prompt injection attacks on large language models. arXiv 2024, arXiv:2402.00898. [Google Scholar]
- Clusmann, J.; Ferber, D.; Wiest, I.C.; Schneider, C.V.; Brinker, T.J.; Foersch, S.; Truhn, D.; Kather, J.N. Prompt injection attacks on vision language models in oncology. Nat. Commun. 2025, 16, 1239. [Google Scholar] [CrossRef] [PubMed]
- Hurst, A.; Lerer, A.; Goucher, A.P.; Perelman, A.; Ramesh, A.; Clark, A.; Ostrow, A.J.; Welihinda, A.; Hayes, A.; Radford, A. GPT-4v system card. arXiv 2024, arXiv:2410.21276. [Google Scholar]
- The Dangers of Adding AI Everywhere: Prompt Injection Attacks on Applications That Use LLMs. Available online: https://www.invicti.com/white-papers/prompt-injection-attacks-on-llm-applications-ebook/ (accessed on 4 March 2025).
- Introducing Gemini: Our Largest and Most Capable AI Model. Available online: https://blog.google/technology/ai/google-gemini-ai/ (accessed on 3 March 2025).
- Introducing ChatGPT. Available online: https://openai.com/index/chatgpt/ (accessed on 3 March 2025).
- Grok 3 Beta—The Age of Reasoning Agents. Available online: https://x.ai/news/grok-3 (accessed on 2 May 2025).
- ArtPrompt: ASCII Art-Based Jailbreak Attacks Against Aligned LLMs. Available online: https://github.com/uw-nsl/ArtPrompt/blob/main/dataset/harmful_behaviors_custom.csv (accessed on 8 January 2025).
- Red-Teaming Large Language Models Using Chain of Utterances for Safety-Alignment. Available online: https://github.com/declare-lab/red-instruct/blob/main/harmful_questions/harmfulqa.json (accessed on 29 April 2025).
- Open AI Usage Policies. Available online: https://openai.com/policies/usage-policies/ (accessed on 10 February 2025).
- Bethany, E.; Bethany, M.; Flores, J.A.N.; Jha, S.K.; Najafirad, P. Jailbreaking Large Language Models with Symbolic Mathematics. arXiv 2024, arXiv:2409.11445. [Google Scholar]
- Kwon, H.; Pak, W. Text-based prompt injection attack using mathematical functions in modern large language models. Electronics 2024, 13, 5008. [Google Scholar] [CrossRef]
- Mind Map Image Generator. Available online: https://github.com/pla2n/Mind-map-Image-Generator (accessed on 2 May 2025).
- Sustainable Authorship in Plain Text Using Pandoc and Markdown. Available online: https://programminghistorian.org/en/lessons/sustainable-authorship-in-plain-text-using-pandoc-and-markdown (accessed on 20 February 2025).
- Markdown. Available online: https://en.wikipedia.org/wiki/Markdown (accessed on 20 February 2025).
- Mind Map. Available online: https://en.wikipedia.org/wiki/Mind_map (accessed on 28 February 2025).
- Farrand, P.; Hussain, F.; Hennessy, E. The efficacy of the ‘mind map’ study technique. Med. Educ. 2002, 36, 426–431. [Google Scholar] [CrossRef] [PubMed]
- Hay, D.; Kinchin, I.; Lygo-Baker, S. Making learning visible: The role of concept mapping in higher education. Stud. High. Educ. 2008, 33, 295–311. [Google Scholar] [CrossRef]
Metric | Pure Text-Based Prompt Injection [25] | Multimodal-Based Prompt Injection [26] | Encoding-Based Prompt Injection [23] | Masked-Based Prompt Injection [24] |
---|---|---|---|---|
Input form | Text | Multimodal | Text | Text |
Types of prompt injections | Direct | Indirect | Direct | Direct |
Difficulty | Very easy | Hard | Easy | Normal |
Attack success rate | Low | High | Low–middle | Middle |
HPR | Pure Text | Visual | Base64 | Leetspeak | ArtPrompt | Proposed |
---|---|---|---|---|---|---|
GPT-4o | 0 | 0.05 | 0.15 | 0.1 | 0.35 | 1 |
Gemini | 0 | 0 | 0.05 | 0 | 0.6 | 1 |
Grok3 | 0.05 | 0.05 | 0.05 | 0.2 | 0.6 | 1 |
HPR | Pure Text | Visual | Base64 | Leetspeak | ArtPrompt | Proposed |
---|---|---|---|---|---|---|
GPT-4o | 0.087 | 0 | 0.391 | 0.13 | 0.609 | 1 |
Gemini | 0 | 0.087 | 0.13 | 0.043 | 0.435 | 1 |
Grok3 | 0.043 | 0 | 0 | 0.261 | 0.348 | 1 |
ASR | Pure Text | Visual | Base64 | Leetspeak | ArtPrompt | Proposed |
---|---|---|---|---|---|---|
GPT-4o | 0 | 0 | 0.15 | 0.1 | 0.25 | 0.9 |
Gemini | 0 | 0 | 0.05 | 0 | 0.15 | 0.9 |
Grok3 | 0.05 | 0.05 | 0.05 | 0.2 | 0.3 | 0.9 |
ASR | Pure Text | Visual | Base64 | Leetspeak | ArtPrompt | Proposed |
---|---|---|---|---|---|---|
GPT-4o | 0.087 | 0 | 0.304 | 0.087 | 0.087 | 1 |
Gemini | 0 | 0 | 0.13 | 0 | 0.043 | 1 |
Grok3 | 0.043 | 0 | 0 | 0.174 | 0 | 1 |
Attack Data Category | Model | Pure Text | Visual | Base64 | Leetspeak | ArtPrompt | Proposed | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
j | m | r | j | m | r | j | m | r | j | m | r | j | m | r | j | m | r | ||
Government (3) | GPT-4o | 0 | 0 | 3 | 0 | 0 | 3 | 0 | 0 | 3 | 0 | 0 | 3 | 0 | 0 | 3 | 3 | 0 | 0 |
Gemini | 0 | 0 | 3 | 0 | 0 | 3 | 0 | 0 | 3 | 0 | 0 | 3 | 1 | 1 | 1 | 3 | 0 | 0 | |
Grok3 | 0 | 0 | 3 | 0 | 0 | 3 | 0 | 0 | 3 | 0 | 0 | 3 | 2 | 0 | 1 | 3 | 0 | 0 | |
Hacking (4) | GPT-4o | 0 | 0 | 4 | 0 | 0 | 4 | 0 | 0 | 4 | 0 | 0 | 4 | 0 | 0 | 4 | 4 | 0 | 0 |
Gemini | 0 | 0 | 4 | 0 | 0 | 4 | 0 | 0 | 4 | 0 | 0 | 4 | 1 | 1 | 2 | 4 | 0 | 0 | |
Grok3 | 0 | 0 | 4 | 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 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 |
Gemini | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | |
Grok3 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | |
Total | 1 | 0 | 80 | 3 | 0 | 78 | 7 | 0 | 74 | 8 | 0 | 73 | 19 | 30 | 30 | 72 | 9 | 0 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Lee, S.; Kim, J.; Pak, W. Mind Mapping Prompt Injection: Visual Prompt Injection Attacks in Modern Large Language Models. Electronics 2025, 14, 1907. https://doi.org/10.3390/electronics14101907
Lee S, Kim J, Pak W. Mind Mapping Prompt Injection: Visual Prompt Injection Attacks in Modern Large Language Models. Electronics. 2025; 14(10):1907. https://doi.org/10.3390/electronics14101907
Chicago/Turabian StyleLee, Seyong, Jaebeom Kim, and Wooguil Pak. 2025. "Mind Mapping Prompt Injection: Visual Prompt Injection Attacks in Modern Large Language Models" Electronics 14, no. 10: 1907. https://doi.org/10.3390/electronics14101907
APA StyleLee, S., Kim, J., & Pak, W. (2025). Mind Mapping Prompt Injection: Visual Prompt Injection Attacks in Modern Large Language Models. Electronics, 14(10), 1907. https://doi.org/10.3390/electronics14101907