Prompt Pirates Need a Map: Stealing Seeds helps Stealing Prompts
Mächtle, Felix, Shetty, Ashwath, Sander, Jonas, Loose, Nils, Pirk, Sören, Eisenbarth, Thomas
–arXiv.org Artificial Intelligence
Diffusion models have significantly advanced text-to-image generation, enabling the creation of highly realistic images conditioned on textual prompts and seeds. Given the considerable intellectual and economic value embedded in such prompts, prompt theft poses a critical security and privacy concern. In this paper, we investigate prompt-stealing attacks targeting diffusion models. We reveal that numerical optimization-based prompt recovery methods are fundamentally limited as they do not account for the initial random noise used during image generation. We identify and exploit a noise-generation vulnerability (CWE-339), prevalent in major image-generation frameworks, originating from PyTorch's restriction of seed values to a range of $2^{32}$ when generating the initial random noise on CPUs. Through a large-scale empirical analysis conducted on images shared via the popular platform CivitAI, we demonstrate that approximately 95% of these images' seed values can be effectively brute-forced in 140 minutes per seed using our seed-recovery tool, SeedSnitch. Leveraging the recovered seed, we propose PromptPirate, a genetic algorithm-based optimization method explicitly designed for prompt stealing. PromptPirate surpasses state-of-the-art methods, i.e., PromptStealer, P2HP, and CLIP-Interrogator, achieving an 8-11% improvement in LPIPS similarity. Furthermore, we introduce straightforward and effective countermeasures that render seed stealing, and thus optimization-based prompt stealing, ineffective. We have disclosed our findings responsibly and initiated coordinated mitigation efforts with the developers to address this critical vulnerability.
arXiv.org Artificial Intelligence
Sep-12-2025
- Country:
- Europe
- Germany > Bavaria
- Upper Bavaria > Munich (0.04)
- Switzerland (0.04)
- Germany > Bavaria
- North America > United States
- Arizona > Pima County
- Tucson (0.04)
- California
- Los Angeles County > Long Beach (0.04)
- Orange County > Anaheim (0.04)
- Hawaii > Honolulu County
- Honolulu (0.04)
- Indiana (0.04)
- Louisiana > Orleans Parish
- New Orleans (0.04)
- Maryland > Baltimore (0.04)
- Utah > Salt Lake County
- Salt Lake City (0.04)
- Washington > King County
- Seattle (0.04)
- Arizona > Pima County
- Europe
- Genre:
- Research Report > New Finding (0.87)
- Industry:
- Information Technology > Security & Privacy (1.00)
- Media (1.00)
- Technology: