Prompt Stealing Attacks Against Large Language Models
Not on the map. Why?
Abstract (arXiv)
The increasing reliance on large language models (LLMs) such as ChatGPT in various fields emphasizes the importance of ``prompt engineering,'' a technology to improve the quality of model outputs. With companies investing significantly in expert prompt engineers and educational resources rising to meet market demand, designing high-quality prompts has become an intriguing challenge. In this paper, we propose a novel attack against LLMs, named prompt stealing attacks. Our proposed prompt stealing attack aims to steal these well-designed prompts based on the generated answers. The prompt stealing attack contains two primary modules: the parameter extractor and the prompt reconstruction. The goal of the parameter extractor is to figure out the properties of the original prompts. We first observe that most prompts fall into one of three categories: direct prompt, role-based prompt, and in-context prompt. Our parameter extractor first tries to distinguish the type of prompts based on the generated answers. Then, it can further predict which role or how many contexts are used based on the types of prompts. Following the parameter extractor, the prompt reconstructor can be used to reconstruct the original prompts based on the generated answers and the extracted features. The final goal of the prompt reconstructor is to generate the reversed prompts, which are similar to the original prompts. Our experimental results show the remarkable performance of our proposed attacks. Our proposed attacks add a new dimension to the study of prompt engineering and call for more attention to the security issues on LLMs.
Key facts. Cited by 39 papers in the map (data through 7 Oct 2026). Builds on 45 of its 51 references that are in the map. First posted on arXiv 20 Feb 2024.
Builds on
45 of 51 references.
References · 45
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,456
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2021High-Resolution Image Synthesis with Latent Diffusion Modelscited by 18,694
- 2023GPT-4 Technical Reportcited by 18,132
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,049
- 2022Hierarchical Text-Conditional Image Generation with CLIP Latentscited by 6,539
- 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,601
- 2022BLIP: Bootstrapping Language-Image Pre-training for Unified Vision-Language Understanding and Generationcited by 4,310
33 more
- 2017Deep reinforcement learning from human preferencescited by 3,846
- 2023Generative Agents: Interactive Simulacra of Human Behaviorcited by 3,500
- 2023Tree of Thoughts: Deliberate Problem Solving with Large Language Modelscited by 3,155
- 2020Learning to summarize from human feedbackcited by 2,562
- 2016Membership Inference Attacks against Machine Learning Modelscited by 2,221
- 2022Red Teaming Language Models with Language Modelscited by 983
- 2022STaR: Bootstrapping Reasoning With Reasoningcited by 895
- 2019DialoGPT: Large-Scale Generative Pre-training for Conversational Response Generationcited by 842
- 2023DetectGPT: Zero-Shot Machine-Generated Text Detection using Probability Curvaturecited by 705
- 2023Instruction Tuning with GPT-4cited by 676
- 2020Recipes for building an open-domain chatbotcited by 593
- 2021ClipCap: CLIP Prefix for Image Captioningcited by 557
- 2018Exploiting Unintended Feature Leakage in Collaborative Learningcited by 509
- 2023Jailbreaking ChatGPT via Prompt Engineering: An Empirical Studycited by 478
- 2023How Close is ChatGPT to Human Experts? Comparison Corpus, Evaluation, and Detectioncited by 472
- 2023Toxicity in ChatGPT: Analyzing Persona-assigned Language Modelscited by 356
- 2023Multi-step Jailbreaking Privacy Attacks on ChatGPTcited by 320
- 2023Exploiting Programmatic Behavior of LLMs: Dual-Use Through Standard Security Attackscited by 268
- 2021Adversarial GLUE: A Multi-Task Benchmark for Robustness Evaluation of Language Modelscited by 227
- 2019Queens are Powerful too: Mitigating Gender Bias in Dialogue Generationcited by 152
- 2023ChatCAD: Interactive Computer-Aided Diagnosis on Medical Image using Large Language Modelscited by 116
- 2023An Analysis of the Automatic Bug Fixing Performance of ChatGPTcited by 108
- 2023MGTBench: Benchmarking Machine-Generated Text Detectioncited by 90
- 2021Anticipating Safety Issues in E2E Conversational AI: Framework and Toolingcited by 77
- 2019Overlearning Reveals Sensitive Attributescited by 74
- 2023Leveraging Large Language Models to Power Chatbots for Collecting User Self-Reported Datacited by 48
- 2023Prompt Stealing Attacks Against Text-to-Image Generation Modelscited by 48
- 2019The Dialogue Dodecathlon: Open-Domain Knowledge and Image Grounded Conversational Agentscited by 45
- 2023In ChatGPT We Trust? Measuring and Characterizing the Reliability of ChatGPTcited by 35
- 2022Why So Toxic? Measuring and Triggering Toxic Behavior in Open-Domain Chatbotscited by 31
- 2023Generating Synthetic Documents for Cross-Encoder Re-Rankers: A Comparative Study of ChatGPT and Human Expertscited by 6
- 2023The Role of AI in Human-AI Creative Writing for Hong Kong Secondary Studentscited by 5
- 2023Simulating H.P. Lovecraft horror literature with the ChatGPT large language modelcited by 3
Built on by
Citing papers per year: 2024: 17; 2025: 16; 2026: 6.
39 papers.
Sort:
By area:
- 2025Large Language Model Agent: A Survey on Methodology, Applications and Challengescited by 194
- 2025A Comprehensive Survey in LLM(-Agent) Full Stack Safety: Data, Training and Deploymentcited by 110
- 2024Navigating the Risks: A Survey of Security, Privacy, and Ethics Threats in LLM-Based Agentscited by 63
- 2024Bag of Tricks: Benchmarking of Jailbreak Attacks on LLMscited by 47
- 2024JAILJUDGE: A Comprehensive Jailbreak Judge Benchmark with Multi-Agent Enhanced Explanation Evaluation Frameworkcited by 44
- 2024Extracting Prompts by Inverting LLM Outputscited by 40
- 2024Unleashing Worms and Extracting Data: Escalating the Outcome of Attacks against RAG-based Inference in Scale and Severity Using Jailbreakingcited by 30
- 2024Large Model Based Agents: State-of-the-Art, Cooperation Paradigms, Security and Privacy, and Future Trendscited by 26
- 2024LLM-based Multi-Agent Systems: Techniques and Business Perspectivescited by 22
- 2025ASIDE: Architectural Separation of Instructions and Data in Language Modelscited by 21
- 2025ControlNET: A Firewall for RAG-based LLM Systemcited by 11
- 2024PRSA: Prompt Stealing Attacks against Real-World Prompt Servicescited by 9
27 more
- 2024Iteratively Prompting Multimodal LLMs to Reproduce Natural and AI-Generated Imagescited by 9
- 2024Why Are My Prompts Leaked? Unraveling Prompt Extraction Threats in Customized Large Language Modelscited by 8
- 2025IP Leakage Attacks Targeting LLM-Based Multi-Agent Systemscited by 8
- 2024SOS! Soft Prompt Attack Against Open-Source Large Language Modelscited by 7
- 2024A Jailbroken GenAI Model Can Cause Substantial Harm: GenAI-powered Applications are Vulnerable to PromptWarescited by 6
- 2025Beyond Data Privacy: New Privacy Risks for Large Language Modelscited by 6
- 2024Systematic Categorization, Construction and Evaluation of New Attacks against Multi-modal Mobile GUI Agentscited by 5
- 2024Reconstruction of Differentially Private Text Sanitization via Large Language Modelscited by 4
- 2024A Survey on Privacy Attacks Against Digital Twin Systems in AI-Roboticscited by 3
- 2025Has My System Prompt Been Used? Large Language Model Prompt Membership Inferencecited by 3
- 2026Just Ask: Curious Code Agents Reveal System Prompts in Frontier LLMscited by 3
- 2025StyleRec: A Benchmark Dataset for Prompt Recovery in Writing Style Transformationcited by 2
- 2025Helping Large Language Models Protect Themselves: An Enhanced Filtering and Summarization Systemcited by 2
- 2025GPT, But Backwards: Exactly Inverting Language Model Outputscited by 2
- 2025Towards Effective Prompt Stealing Attack against Text-to-Image Diffusion Modelscited by 2
- 2026Federation over Text: Insight Sharing for Multi-Agent Reasoningcited by 2
- 2024Confidential Prompting: Privacy-preserving LLM Inference on Cloudcited by 1
- 2024Mitigating Adversarial Attacks in LLMs through Defensive Suffix Generationcited by 1
- 2025Layer-Wise Perturbations via Sparse Autoencoders for Adversarial Text Generationcited by 1
- 2025Bits Leaked per Query: Information-Theoretic Bounds on Adversarial Attacks against LLMscited by 1
- 2025Convergence dynamics of Agent-to-Agent Interactions with Misaligned objectivescited by 1
- 2025Data-Free Model-Related Attacks: Unleashing the Potential of Generative AIcited by 0
- 2025A global log for medical AIcited by 0
- 2026BadSNN: Backdoor Attacks on Spiking Neural Networks via Adversarial Spiking Neuroncited by 0
- 2026Evaluation and Hardening of LLM System Instructions Against Extraction via Encoding Attackscited by 0
- 2026Can a Single Message Paralyze the AI Infrastructure? The Rise of AbO-DDoS Attacks through Targeted Mobius Injectioncited by 0
- 2026Daydreaming: Stealing Hidden Agent Skills through Black-Box Task Interactioncited by 0
- 2026Daydreaming: Stealing Hidden Agent Skills through Black-Box Task Interaction27 Aug 2026
- 2026Can a Single Message Paralyze the AI Infrastructure? The Rise of AbO-DDoS Attacks through Targeted Mobius Injection12 May 2026
- 2026Federation over Text: Insight Sharing for Multi-Agent Reasoning18 Apr 2026
- 2026Evaluation and Hardening of LLM System Instructions Against Extraction via Encoding Attacks1 Apr 2026
- 2026BadSNN: Backdoor Attacks on Spiking Neural Networks via Adversarial Spiking Neuron6 Feb 2026
- 2026Just Ask: Curious Code Agents Reveal System Prompts in Frontier LLMs29 Jan 2026
- 2025Convergence dynamics of Agent-to-Agent Interactions with Misaligned objectives11 Nov 2025
- 2025Bits Leaked per Query: Information-Theoretic Bounds on Adversarial Attacks against LLMs19 Oct 2025
- 2025A global log for medical AI5 Oct 2025
- 2025Beyond Data Privacy: New Privacy Risks for Large Language Models16 Sep 2025
- 2025Layer-Wise Perturbations via Sparse Autoencoders for Adversarial Text Generation14 Aug 2025
- 2025Towards Effective Prompt Stealing Attack against Text-to-Image Diffusion Models9 Aug 2025
27 more
- 2025GPT, But Backwards: Exactly Inverting Language Model Outputs2 Jul 2025
- 2025IP Leakage Attacks Targeting LLM-Based Multi-Agent Systems18 May 2025
- 2025Helping Large Language Models Protect Themselves: An Enhanced Filtering and Summarization System2 May 2025
- 2025A Comprehensive Survey in LLM(-Agent) Full Stack Safety: Data, Training and Deployment22 Apr 2025
- 2025ControlNET: A Firewall for RAG-based LLM System13 Apr 2025
- 2025StyleRec: A Benchmark Dataset for Prompt Recovery in Writing Style Transformation6 Apr 2025
- 2025Large Language Model Agent: A Survey on Methodology, Applications and Challenges27 Mar 2025
- 2025ASIDE: Architectural Separation of Instructions and Data in Language Models13 Mar 2025
- 2025Has My System Prompt Been Used? Large Language Model Prompt Membership Inference14 Feb 2025
- 2025Data-Free Model-Related Attacks: Unleashing the Potential of Generative AI28 Jan 2025
- 2024Mitigating Adversarial Attacks in LLMs through Defensive Suffix Generation18 Dec 2024
- 2024LLM-based Multi-Agent Systems: Techniques and Business Perspectives21 Nov 2024
- 2024Navigating the Risks: A Survey of Security, Privacy, and Ethics Threats in LLM-Based Agents14 Nov 2024
- 2024Reconstruction of Differentially Private Text Sanitization via Large Language Models16 Oct 2024
- 2024JAILJUDGE: A Comprehensive Jailbreak Judge Benchmark with Multi-Agent Enhanced Explanation Evaluation Framework11 Oct 2024
- 2024Confidential Prompting: Privacy-preserving LLM Inference on Cloud27 Sep 2024
- 2024Large Model Based Agents: State-of-the-Art, Cooperation Paradigms, Security and Privacy, and Future Trends22 Sep 2024
- 2024Unleashing Worms and Extracting Data: Escalating the Outcome of Attacks against RAG-based Inference in Scale and Severity Using Jailbreaking12 Sep 2024
- 2024A Jailbroken GenAI Model Can Cause Substantial Harm: GenAI-powered Applications are Vulnerable to PromptWares9 Aug 2024
- 2024Why Are My Prompts Leaked? Unraveling Prompt Extraction Threats in Customized Large Language Models5 Aug 2024
- 2024Systematic Categorization, Construction and Evaluation of New Attacks against Multi-modal Mobile GUI Agents12 Jul 2024
- 2024SOS! Soft Prompt Attack Against Open-Source Large Language Models3 Jul 2024
- 2024A Survey on Privacy Attacks Against Digital Twin Systems in AI-Robotics27 Jun 2024
- 2024Bag of Tricks: Benchmarking of Jailbreak Attacks on LLMs13 Jun 2024
- 2024Extracting Prompts by Inverting LLM Outputs23 May 2024
- 2024Iteratively Prompting Multimodal LLMs to Reproduce Natural and AI-Generated Images21 Apr 2024
- 2024PRSA: Prompt Stealing Attacks against Real-World Prompt Services29 Feb 2024
- 2024Bag of Tricks: Benchmarking of Jailbreak Attacks on LLMscited by 47
- 2024Unleashing Worms and Extracting Data: Escalating the Outcome of Attacks against RAG-based Inference in Scale and Severity Using Jailbreakingcited by 30
- 2025ASIDE: Architectural Separation of Instructions and Data in Language Modelscited by 21
- 2024SOS! Soft Prompt Attack Against Open-Source Large Language Modelscited by 7
- 2024A Jailbroken GenAI Model Can Cause Substantial Harm: GenAI-powered Applications are Vulnerable to PromptWarescited by 6
- 2025Has My System Prompt Been Used? Large Language Model Prompt Membership Inferencecited by 3
- 2025Helping Large Language Models Protect Themselves: An Enhanced Filtering and Summarization Systemcited by 2
- 2025GPT, But Backwards: Exactly Inverting Language Model Outputscited by 2
- 2025Layer-Wise Perturbations via Sparse Autoencoders for Adversarial Text Generationcited by 1
- 2025Bits Leaked per Query: Information-Theoretic Bounds on Adversarial Attacks against LLMscited by 1
- 2025Bits Leaked per Query: Information-Theoretic Bounds on Adversarial Attacks against LLMs19 Oct 2025
- 2025Layer-Wise Perturbations via Sparse Autoencoders for Adversarial Text Generation14 Aug 2025
- 2025GPT, But Backwards: Exactly Inverting Language Model Outputs2 Jul 2025
- 2025Helping Large Language Models Protect Themselves: An Enhanced Filtering and Summarization System2 May 2025
- 2025ASIDE: Architectural Separation of Instructions and Data in Language Models13 Mar 2025
- 2025Has My System Prompt Been Used? Large Language Model Prompt Membership Inference14 Feb 2025
- 2024Unleashing Worms and Extracting Data: Escalating the Outcome of Attacks against RAG-based Inference in Scale and Severity Using Jailbreaking12 Sep 2024
- 2024A Jailbroken GenAI Model Can Cause Substantial Harm: GenAI-powered Applications are Vulnerable to PromptWares9 Aug 2024
- 2024SOS! Soft Prompt Attack Against Open-Source Large Language Models3 Jul 2024
- 2024Bag of Tricks: Benchmarking of Jailbreak Attacks on LLMs13 Jun 2024
- 2025Large Language Model Agent: A Survey on Methodology, Applications and Challengescited by 194
- 2024Navigating the Risks: A Survey of Security, Privacy, and Ethics Threats in LLM-Based Agentscited by 63
- 2024JAILJUDGE: A Comprehensive Jailbreak Judge Benchmark with Multi-Agent Enhanced Explanation Evaluation Frameworkcited by 44
- 2024LLM-based Multi-Agent Systems: Techniques and Business Perspectivescited by 22
- 2025IP Leakage Attacks Targeting LLM-Based Multi-Agent Systemscited by 8
- 2024Systematic Categorization, Construction and Evaluation of New Attacks against Multi-modal Mobile GUI Agentscited by 5
- 2026Just Ask: Curious Code Agents Reveal System Prompts in Frontier LLMscited by 3
- 2025Convergence dynamics of Agent-to-Agent Interactions with Misaligned objectivescited by 1
- 2026Evaluation and Hardening of LLM System Instructions Against Extraction via Encoding Attackscited by 0
- 2026Evaluation and Hardening of LLM System Instructions Against Extraction via Encoding Attacks1 Apr 2026
- 2026Just Ask: Curious Code Agents Reveal System Prompts in Frontier LLMs29 Jan 2026
- 2025Convergence dynamics of Agent-to-Agent Interactions with Misaligned objectives11 Nov 2025
- 2025IP Leakage Attacks Targeting LLM-Based Multi-Agent Systems18 May 2025
- 2025Large Language Model Agent: A Survey on Methodology, Applications and Challenges27 Mar 2025
- 2024LLM-based Multi-Agent Systems: Techniques and Business Perspectives21 Nov 2024
- 2024Navigating the Risks: A Survey of Security, Privacy, and Ethics Threats in LLM-Based Agents14 Nov 2024
- 2024JAILJUDGE: A Comprehensive Jailbreak Judge Benchmark with Multi-Agent Enhanced Explanation Evaluation Framework11 Oct 2024
- 2024Systematic Categorization, Construction and Evaluation of New Attacks against Multi-modal Mobile GUI Agents12 Jul 2024
- 2025ControlNET: A Firewall for RAG-based LLM Systemcited by 11
- 2025ControlNET: A Firewall for RAG-based LLM System13 Apr 2025
- 2024Extracting Prompts by Inverting LLM Outputscited by 40
- 2024Large Model Based Agents: State-of-the-Art, Cooperation Paradigms, Security and Privacy, and Future Trendscited by 26
- 2024PRSA: Prompt Stealing Attacks against Real-World Prompt Servicescited by 9
- 2024Why Are My Prompts Leaked? Unraveling Prompt Extraction Threats in Customized Large Language Modelscited by 8
- 2025Beyond Data Privacy: New Privacy Risks for Large Language Modelscited by 6
- 2024Reconstruction of Differentially Private Text Sanitization via Large Language Modelscited by 4
- 2024A Survey on Privacy Attacks Against Digital Twin Systems in AI-Roboticscited by 3
- 2025StyleRec: A Benchmark Dataset for Prompt Recovery in Writing Style Transformationcited by 2
- 2024Confidential Prompting: Privacy-preserving LLM Inference on Cloudcited by 1
- 2024Mitigating Adversarial Attacks in LLMs through Defensive Suffix Generationcited by 1
- 2025Data-Free Model-Related Attacks: Unleashing the Potential of Generative AIcited by 0
- 2025A global log for medical AIcited by 0
12 most cited of 15 All 15 (JSON)
- 2026Daydreaming: Stealing Hidden Agent Skills through Black-Box Task Interaction27 Aug 2026
- 2026Can a Single Message Paralyze the AI Infrastructure? The Rise of AbO-DDoS Attacks through Targeted Mobius Injection12 May 2026
- 2026BadSNN: Backdoor Attacks on Spiking Neural Networks via Adversarial Spiking Neuron6 Feb 2026
- 2025A global log for medical AI5 Oct 2025
- 2025Beyond Data Privacy: New Privacy Risks for Large Language Models16 Sep 2025
- 2025StyleRec: A Benchmark Dataset for Prompt Recovery in Writing Style Transformation6 Apr 2025
- 2025Data-Free Model-Related Attacks: Unleashing the Potential of Generative AI28 Jan 2025
- 2024Mitigating Adversarial Attacks in LLMs through Defensive Suffix Generation18 Dec 2024
- 2024Reconstruction of Differentially Private Text Sanitization via Large Language Models16 Oct 2024
- 2024Confidential Prompting: Privacy-preserving LLM Inference on Cloud27 Sep 2024
- 2024Large Model Based Agents: State-of-the-Art, Cooperation Paradigms, Security and Privacy, and Future Trends22 Sep 2024
- 2024Why Are My Prompts Leaked? Unraveling Prompt Extraction Threats in Customized Large Language Models5 Aug 2024
12 newest of 15 All 15 (JSON)