Privacy-Preserving Prompt Injection Detection for Smart Cloud-Deployed Large Language Models

Large Language Models (LLMs) have recently gained popularity for tasks like text generation and automated reasoning, often hosted on cloud servers to handle large-scale user interactions. Yet this setup faces a critical challenge, prompt injection attacks, where adversaries craft malicious text to bypass an LLM’s safety constraints and policy filters. Attackers constantly evolve new injection tactics, rendering static defenses ineffective. While service providers may wish to store user inputs for security audits, this practice poses serious privacy and data-protection risks. User prompts can contain personal or confidential information subject to strict regulatory requirements. To address these conflicting demands of security monitoring and user privacy, we propose a privacy-preserving prompt injection detection scheme via hash and embedding-based auditing for smart cloud-deployed LLMs. Our approach segments each user prompt into smaller chunks and stores only non-invertible representations of them—cryptographic hashes for exact matches and vector embeddings for near-match detection. This enables robust identification of both verbatim and paraphrased threats without retaining any plaintext data. Furthermore, newly discovered injection patterns can trigger retrospective audits on previously stored chunks, greatly enhancing attack traceability. We also introduce an optional blockchain-based logging mechanism for tamper-proof event records. Empirical results show that our method achieves high detection accuracy against diverse injection techniques while safeguarding sensitive user information.

Authors

Institutions

Publication Details

Published
2025-05-09
DOI
https://doi.org/10.1109/smartcloud66068.2025.00009
Citations
1
Primary Topic
Privacy-Preserving Technologies in Data
Type
article
Field-Weighted Citation Impact
2.48

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Privacy-Preserving Prompt Injection Detection for Smart Cloud-Deployed Large Language Models

Jun Wu, Guozhi Hao
1 citations
Privacy-Preserving Technologies in Data
2.48
article

Privacy-Preserving Prompt Injection Detection for Smart Cloud-Deployed Large Language Models

Jun Wu, Guozhi Hao
article en
1 citations

Abstract

Large Language Models (LLMs) have recently gained popularity for tasks like text generation and automated reasoning, often hosted on cloud servers to handle large-scale user interactions. Yet this setup faces a critical challenge, prompt injection attacks, where adversaries craft malicious text to bypass an LLM’s safety constraints and policy filters. Attackers constantly evolve new injection tactics, rendering static defenses ineffective. While service providers may wish to store user inputs for security audits, this practice poses serious privacy and data-protection risks. User prompts can contain personal or confidential information subject to strict regulatory requirements. To address these conflicting demands of security monitoring and user privacy, we propose a privacy-preserving prompt injection detection scheme via hash and embedding-based auditing for smart cloud-deployed LLMs. Our approach segments each user prompt into smaller chunks and stores only non-invertible representations of them—cryptographic hashes for exact matches and vector embeddings for near-match detection. This enables robust identification of both verbatim and paraphrased threats without retaining any plaintext data. Furthermore, newly discovered injection patterns can trigger retrospective audits on previously stored chunks, greatly enhancing attack traceability. We also introduce an optional blockchain-based logging mechanism for tamper-proof event records. Empirical results show that our method achieves high detection accuracy against diverse injection techniques while safeguarding sensitive user information.

Waseda University (JP)
China Scholarship Council
Openalex Percentile: Top 10%
Privacy-Preserving Technologies in Data
2.48
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.