Secure Prompt Engineering Patterns for Cloud LLM Agents

There is a new security threat to be concerned with when using Large Language Model (LLM) agents on cloud platforms called prompt injection attacks. These injections have the ability to bait agents to perform unauthorized actions that end up exposing data, privilege escalation and the end-user misuse of resources. Although prompt injection in chatbots has been studied before, little focus has been put on the LLM agents, which could be integrated with cloud, where the effect is much stronger. The current paper proposes a type of Secure Prompt Engineering Patterns (SPEP) customized to cloud-specific use cases. We devise a taxonomy of threat vectors, both direct and indirect manipulations of prompts, and suggest reusable security patterns aimed at input sanitization, role-context separation, execution confirmation, capability restriction and chain-of-thought isolation. Organized testing on AWS, GCP, and Azure testbeds with over 200 adversarial prompts indicates that SPEP can decrease the success rates of attacks to below 8% (with negligible latency overhead (<50ms). These findings show that directed prompt engineering is an efficient, weightless protection when it comes to the LLM agents in cloud orchestration pipelines.

Paper

Full text

PDF

Secure Prompt Engineering Patterns for Cloud LLM Agents

Semantic Scholar · 2026

Abstract

There is a new security threat to be concerned with when using Large Language Model (LLM) agents on cloud platforms called prompt injection attacks. These injections have the ability to bait agents to perform unauthorized actions that end up exposing data, privilege escalation and the end-user misuse of resources. Although prompt injection in chatbots has been studied before, little focus has been put on the LLM agents, which could be integrated with cloud, where the effect is much stronger. The current paper proposes a type of Secure Prompt Engineering Patterns (SPEP) customized to cloud-specific use cases. We devise a taxonomy of threat vectors, both direct and indirect manipulations of prompts, and suggest reusable security patterns aimed at input sanitization, role-context separation, execution confirmation, capability restriction and chain-of-thought isolation. Organized testing on AWS, GCP, and Azure testbeds with over 200 adversarial prompts indicates that SPEP can decrease the success rates of attacks to below 8% (with negligible latency overhead (<50ms). These findings show that directed prompt engineering is an efficient, weightless protection when it comes to the LLM agents in cloud orchestration pipelines.

Similar papers

© 2026 NYSGPT2525 LLC