USENIX Security2025Top-tier venue
PRSA: Prompt Stealing Attacks against Real-World Prompt Services
Yong Yang, Changjiang Li, Qingming Li, Oubo Ma, Haoyu Wang, Zonghui Wang, Yandong Gao, Wenzhi Chen, Shouling Ji
Abstract
Recently, large language models (LLMs) have garnered widespread attention for their exceptional capabilities. Prompts are central to the functionality and performance of LLMs, making them highly valuable assets. The increasing reliance on high-quality prompts has driven significant growth in prompt services. However, this growth also expands the potential for prompt leakage, increasing the risk that attackers could replicate original functionalities, create competing products, and severely infringe on developers' intellectual property. Despite these risks, prompt leakage in real-world prompt services remains underexplored. In this paper, we present PRSA, a practical attack framework designed for prompt stealing. PRSA infers the detailed intent of prompts through very limited input-output analysis and can successfully generate stolen prompts that replicate the original functionality. Extensive evaluations demonstrate PRSA's effectiveness across two main types of real-world prompt services. Specifically, compared to previous works, it improves the attack success rate from 17.8% to 46.1% in prompt marketplaces and from 39% to 52% in LLM application stores, respectively. Notably, in the attack on"Math", one of the most popular educational applications in OpenAI's GPT Store with over 1 million conversations, PRSA uncovered a hidden Easter egg that had not been revealed previously. Besides, our analysis reveals that higher mutual information between a prompt and its output correlates with an increased risk of leakage. This insight guides the design and evaluation of two potential defenses against the security threats posed by PRSA. We have reported these findings to the prompt service vendors, including PromptBase and OpenAI, and actively collaborate with them to implement defensive measures.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext fd9d9f7c-ba05-4a84-9a51-1f602a6ab6d5Cited by top-tier papers11
- Bits Leaked per Query: Information-Theoretic Bounds for Adversarial Attacks on LLMsMasahiro Kaneko, Timothy BaldwinNeurIPS 2025 · 6 citations
- PromptCOS: Towards Content-Only System Prompt Copyright Auditing for LLMsYuchen Yang, Yiming Li, Hongwei Yao, Enhao Huang et al.S&P 2026 · 5 citations
- RepeatLeakage: Leak Prompts from Repeating as Large Language Model Is a Good RepeaterYu Peng, Lijie Zhang, Peizhuo Lv, Kai ChenAAAI 2025 · 3 citations
- Towards Effective Prompt Stealing Attack against Text-to-Image Diffusion ModelsShiqian Zhao, Chong Wang, Yiming Li, Yihao Huang et al.NDSS 2026 · 3 citations
- IntraGuard: Committee-Side Defenses Against Review Outsourcing to Commercial ChatbotsOubo Ma, Ruixiao Lin, Jiahao Chen, Yuan Su et al.CCS 2026 · 2 citations
Builds on10
- Large Language Models as OptimizersChengrun Yang, Xuezhi Wang, Yifeng Lu, Hanxiao Liu et al.ICLR 2024 · 817 citations
- The Reversal Curse: LLMs trained on "A is B" fail to learn "B is A"Lukas Berglund, Meg Tong, Maximilian Kaufmann, Mikita Balesni et al.ICLR 2024 · 462 citations
- Formalizing and Benchmarking Prompt Injection Attacks and DefensesYupei Liu, Yuqi Jia, Runpeng Geng, Jinyuan Jia et al.USENIX Security 2024 · 308 citations
- Large Language Models are Human-Level Prompt EngineersYongchao Zhou, Andrei Ioan Muresanu, Ziwen Han, Keiran Paster et al.ICLR 2023 · 297 citations
- Automatic Prompt Optimization with "Gradient Descent" and Beam SearchReid Pryzant, Dan Iter, Jerry Li, Yin Tat Lee et al.EMNLP 2023 · 137 citations
Related papers
- On the Effectiveness of Prompt Stealing Attacks on In-the-Wild PromptsYicong Tan, Xinyue Shen, Yun Shen, Michael Backes et al.S&P 2025
- PLeak: Prompt Leaking Attacks against Large Language Model ApplicationsBo Hui, Haolin Yuan, Neil Gong, Philippe Burlina et al.CCS 2024 · 28 citations
- Understanding and Mitigating Prompt Leaking Attacks in Real-World LLM-Based ApplicationsYong Yang, Chong Fu, Tong Zhang, Rui Zeng et al.CCS 2026
- "I've Decided to Leak": Probing Internals Behind Prompt Leakage IntentsJianshuo Dong, Yutong Zhang, Liu Yan, Zhenyu Zhong et al.EMNLP 2025 · 1 citation
- Uncovering Prompt Elements: Cloning System Prompts from Behavioral TracesYi Qian, Fei Peng, Hao Wu, Ligeng Chen et al.ASE 2025 · 1 citation
