Lune

CCS2026顶会

Understanding and Mitigating Prompt Leaking Attacks in Real-World LLM-Based Applications

Yong Yang, Chong Fu, Tong Zhang, Rui Zeng, Qingming Li, Tianyu Du, Zonghui Wang, Shouling Ji, Wenzhi Chen

摘要

Large language model (LLM)-based applications rely on system prompts to encode their core logic and developer-defined constraints, making them a critical form of intellectual property. However, these prompts are highly vulnerable to prompt leaking attacks. While the feasibility of such attacks has been demonstrated in controlled settings, a significant gap exists in understanding their prevalence, underlying mechanisms, and practical defenses within real-world deployments. In this paper, we bridge this gap by providing a systematic investigation into the landscape of prompt leaking in real-world LLMbased applications. Our study unfolds in three key aspects. First, we conduct a large-scale measurement of 1,200 applications across six major commercial platforms, revealing that over 80% of deployments leak system prompts under realistic adversarial queries, often exposing sensitive information like third-party API keys. Besides, our evaluation of existing defenses shows that they fail to prevent leakage without degrading usability. Second, to understand the root cause of these failures, we perform an attention-level mechanistic analysis and uncover a fundamental phenomenon we term attention drift, where query-key alignment bias and softmax amplification cause the LLMs to progressively ignore defensive constraints. Finally, guided by these insights, we propose AREA, a practical defense that re-anchors the LLM's attention via an optimizable soft prompt. Extensive experiments and real-world case studies demonstrate that AREA matches the leakage resistance of state-of-the-art defenses while improving average usability by over 33% and reducing optimization overhead by nearly 3×. The real-world significance of our work is further underscored by our responsible disclosure to affected vendors, two of whom have officially classified these leaks as medium-severity vulnerabilities.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

可以从这些问题问起

Lune 可以查阅

全文 · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • The Attacker Moves Second: Stronger Adaptive Attacks Bypass Defenses Against LLM Jailbreaks and Prompt Injections 引用了 Formalizing and Benchmarking Prompt Injection Attacks and Defenses
  • PLeak: Prompt Leaking Attacks against Large Language Model Applications 引用了 Formalizing and Benchmarking Prompt Injection Attacks and Defenses
  • Optimization-based Prompt Injection Attack to LLM-as-a-Judge 引用了 PLeak: Prompt Leaking Attacks against Large Language Model Applications
  • Optimization-based Prompt Injection Attack to LLM-as-a-Judge 引用了 Formalizing and Benchmarking Prompt Injection Attacks and Defenses
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

它引用的 Paper14

  1. Retrieval-Augmented Generation for Knowledge-Intensive NLP TasksPatrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni 等NeurIPS 2020 · 19,162 次引用
  2. Formalizing and Benchmarking Prompt Injection Attacks and DefensesYupei Liu, Yuqi Jia, Runpeng Geng, Jinyuan Jia 等USENIX Security 2024 · 308 次引用
  3. The Attacker Moves Second: Stronger Adaptive Attacks Bypass Defenses Against LLM Jailbreaks and Prompt InjectionsMilad Nasr, Nicholas Carlini, Chawin Sitawarin, Sander V. Schulhoff 等USENIX Security 2026 · 134 次引用
  4. Optimization-based Prompt Injection Attack to LLM-as-a-JudgeJiawen Shi, Zenghui Yuan, Yinuo Liu, Yue Huang 等CCS 2024 · 33 次引用
  5. PLeak: Prompt Leaking Attacks against Large Language Model ApplicationsBo Hui, Haolin Yuan, Neil Gong, Philippe Burlina 等CCS 2024 · 28 次引用

相关 Paper

  1. PromptKeeper: Safeguarding System Prompts for LLMsZhifeng Jiang, Zhihua Jin, Guoliang HeEMNLP Findings 2025 · 4 次引用
  2. PRSA: Prompt Stealing Attacks against Real-World Prompt ServicesYong Yang, Changjiang Li, Qingming Li, Oubo Ma 等USENIX Security 2025
  3. ProxyPrompt: Securing System Prompts against Prompt Extraction AttacksZhixiong Zhuang, Maria-Irina Nicolae, Hui-Po Wang, Mario FritzACL Findings 2026 · 1 次引用
  4. Proxy Barrier: A Hidden Repeater Layer Defense Against System Prompt Leakage and JailbreakingPedro Schindler Freire Brasil Ribeiro, Iago Alves Brito, Rafael Teixeira Sousa, Fernanda Bufon Färber 等EMNLP Findings 2025
  5. Defenses Against Prompt Attacks Learn Surface HeuristicsShawn Li, Chenxiao Yu, Zhiyu Ni, Hao Li 等ACL 2026 · 8 次引用
黄昏的海面,两侧是细线勾勒的悬崖