Lune

USENIX Security2024Top-tier venue

Prompt Stealing Attacks Against Text-to-Image Generation Models

Xinyue Shen, Yiting Qu, Michael Backes, Yang Zhang

Abstract

Text-to-Image generation models have revolutionized the artwork design process and enabled anyone to create high-quality images by entering text descriptions called prompts. Creating a high-quality prompt that consists of a subject and several modifiers can be time-consuming and costly. In consequence, a trend of trading high-quality prompts on specialized marketplaces has emerged. In this paper, we perform the first study on understanding the threat of a novel attack, namely prompt stealing attack, which aims to steal prompts from generated images by text-to-image generation models. Successful prompt stealing attacks directly violate the intellectual property of prompt engineers and jeopardize the business model of prompt marketplaces. We first perform a systematic analysis on a dataset collected by ourselves and show that a successful prompt stealing attack should consider a prompt's subject as well as its modifiers. Based on this observation, we propose a simple yet effective prompt stealing attack, PromptStealer. It consists of two modules: a subject generator trained to infer the subject and a modifier detector for identifying the modifiers within the generated image. Experimental results demonstrate that PromptStealer is superior over three baseline methods, both quantitatively and qualitatively. We also make some initial attempts to defend PromptStealer. In general, our study uncovers a new attack vector within the ecosystem established by the popular text-to-image generation models. We hope our results can contribute to understanding and mitigating this emerging threat.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

16 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • JailbreakDiffBench: A Comprehensive Benchmark for Jailbreaking Diffusion Models cites High-Resolution Image Synthesis with Latent Diffusion Models
  • JailbreakDiffBench: A Comprehensive Benchmark for Jailbreaking Diffusion Models cites Unsafe Diffusion: On the Generation of Unsafe Images and Hateful Memes From Text-To-Image Models
  • Capability-aware Prompt Reformulation Learning for Text-to-Image Generation cites High-Resolution Image Synthesis with Latent Diffusion Models
  • Capability-aware Prompt Reformulation Learning for Text-to-Image Generation cites Learning Transferable Visual Models From Natural Language Supervision
  • BLIP: Bootstrapping Language-Image Pre-training for Unified Vision-Language Understanding and Generation cites Learning Transferable Visual Models From Natural Language Supervision
  • PromptCOS: Towards Content-Only System Prompt Copyright Auditing for LLMs cites PromptCARE: Prompt Copyright Protection by Watermark Injection and Verification
  • Unsafe Diffusion: On the Generation of Unsafe Images and Hateful Memes From Text-To-Image Models cites High-Resolution Image Synthesis with Latent Diffusion Models
  • Unsafe Diffusion: On the Generation of Unsafe Images and Hateful Memes From Text-To-Image Models cites BLIP: Bootstrapping Language-Image Pre-training for Unified Vision-Language Understanding and Generation
  • Unsafe Diffusion: On the Generation of Unsafe Images and Hateful Memes From Text-To-Image Models cites Learning Transferable Visual Models From Natural Language Supervision
  • Photorealistic Text-to-Image Diffusion Models with Deep Language Understanding cites High-Resolution Image Synthesis with Latent Diffusion Models
  • Photorealistic Text-to-Image Diffusion Models with Deep Language Understanding cites Learning Transferable Visual Models From Natural Language Supervision
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers16

  1. Unsafe Diffusion: On the Generation of Unsafe Images and Hateful Memes From Text-To-Image ModelsYiting Qu, Xinyue Shen, Xinlei He, Michael Backes et al.CCS 2023 · 48 citations
  2. PromptCARE: Prompt Copyright Protection by Watermark Injection and VerificationHongwei Yao, Jian Lou, Zhan Qin, Kui RenS&P 2024 · 43 citations
  3. JailbreakDiffBench: A Comprehensive Benchmark for Jailbreaking Diffusion ModelsXiaolong Jin, Zixuan Weng, Hanxi Guo, Chenlong Yin et al.ICCV 2025 · 13 citations
  4. Capability-aware Prompt Reformulation Learning for Text-to-Image GenerationJingtao Zhan, Qingyao Ai, Yiqun Liu, Jia Chen et al.SIGIR 2024 · 7 citations
  5. PromptCOS: Towards Content-Only System Prompt Copyright Auditing for LLMsYuchen Yang, Yiming Li, Hongwei Yao, Enhao Huang et al.S&P 2026 · 5 citations

Builds on24

  1. Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh et al.ICML 2021 · 47,906 citations
  2. High-Resolution Image Synthesis with Latent Diffusion ModelsRobin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser et al.CVPR 2022 · 13,123 citations
  3. Towards Evaluating the Robustness of Neural NetworksNicholas Carlini, David A. WagnerS&P 2017 · 9,786 citations
  4. Photorealistic Text-to-Image Diffusion Models with Deep Language UnderstandingChitwan Saharia, William Chan, Saurabh Saxena, Lala Li et al.NeurIPS 2022 · 8,965 citations
  5. BLIP: Bootstrapping Language-Image Pre-training for Unified Vision-Language Understanding and GenerationJunnan Li, Dongxu Li, Caiming Xiong, Steven C. H. HoiICML 2022 · 6,549 citations

Related papers

  1. Towards Effective Prompt Stealing Attack against Text-to-Image Diffusion ModelsShiqian Zhao, Chong Wang, Yiming Li, Yihao Huang et al.NDSS 2026 · 3 citations
  2. PROMPTMINER: Black-Box Prompt Stealing against Text-to-Image Generative Models via Reinforcement Learning and VLM-Guided OptimizationMingzhe Li, Renhao 'Norman' Zhang, Zhiyang Wen, Siqi Pan et al.CVPR 2026
  3. The Prompt Stealing Fallacy: Rethinking Metrics, Attacks, and DefensesZehang Deng, Haoyang Li, Wanlun Ma, Ruoxi Sun et al.USENIX Security 2026
  4. On the Effectiveness of Prompt Stealing Attacks on In-the-Wild PromptsYicong Tan, Xinyue Shen, Yun Shen, Michael Backes et al.S&P 2025
  5. AudioStealer: Extracting Audio Prompts via Shapley Value-Guided Query SearchYingbin Jin, Xingjian Du, Hanjun Luo, Zihao Wang et al.ACL Findings 2026
Dusk over the sea between two cliffs drawn in fine vertical lines