Prompt injection is increasingly recognized as a rising class of risk in AI systems. This is a critical threat vector in which attackers craft natural language inputs to subvert model instructions, bypass guardrails, or leak sensitive data.
But before focusing on prompt injection threats let’s quickly review how AI tools present risks for a company’s unstructured data. In our blog discussing how Versa secures unstructured data against AI driven risk, we explain how unstructured data—spanning emails, documents, collaboration tools, and code repositories—creates surface area of risk with generative AI platforms and solutions. We also examine how Versa’s Unified SASE platform secures that unstructured data across its full lifecycle: in motion, in use, and at rest.
In this blog we’ll expand on a particular dimension of AI risk: prompt engineering. Where the prior blog was about the raw material (unstructured data), this blog is about the instructions (prompt injection). Together, they form the inputs that power AI workflows. Securing both is essential to protect intellectual property, maintain compliance, and ensure AI delivers value safely.
AIs can be manipulated to override their intended behaviors, with prompts being able to extract sensitive information, or trigger unauthorized actions. Even well-meaning employees may inadvertently craft prompts that can cause an AI to expose a company’s unstructured data.
This makes prompt engineering not just a developer skill, but an attack vector that needs to be given appropriate security considerations. Just as careless handling of unstructured data can lead to data leaks, careless or malicious prompt design can compromise AI safety and security.
Prompt engineering expands the AI attack surface by transforming natural language into executable logic. Unlike conventional software vulnerabilities, these risks arise from adversarial inputs and instruction manipulation, creating new vectors for data exfiltration, policy bypass, and privilege escalation.
The risks outlined above—whether it’s instruction injection, data leakage through prompts, or role confusion—share a common theme: sensitive information can be exposed, manipulated at the point of input, held hostage with potential backdoor access creating ransomware scenarios. Prompts are not just instructions for AI; they can also become a vehicle for attackers or careless users to bypass security policies intended to protect the business’s assets, such as its confidential data.
This is why extending security controls directly into prompt flows is critical. By applying regex, keyword matches, proximity rules, and custom identifiers to prompt traffic, organizations gain the ability to:
Data Loss Prevention (DLP) has long been a foundational control for securing enterprise data. Traditionally, DLP is applied to monitor and govern how sensitive information—such as PII, financial data, or source code—moves across applications, endpoints, and user interactions. It helps prevent unintentional sharing, insider misuse, or exfiltration through email, cloud apps, collaboration platforms, or web uploads.
When applied to AI, the same challenges emerge in new ways: employees may paste sensitive information into prompts, or adversarial instructions may attempt to coax models into exposing confidential data. This is where Versa’s DLP capabilities become critical—extending familiar detection methods like regex, keyword matching, and proximity rules directly into prompt traffic to reduce these risks.
As an example, we’ll take four common scenarios and demonstrate simple policy controls to secure your data. In each scenario we’ll show: what to detect, sample regex/keywords, and a Versa policy example you can run with today’s controls. Each example assumes that TLS decryption is enabled within Versa for traffic sent to an AI application.
1) Prevent PII leakage inside prompts
Goal: Stop employees from pasting customer PII (such as SSN/CC) into AI assistants.
Detect:
Versa policy recipe:
2) Stop secret keys / code exfiltration in prompts
Goal: Prevent sharing credentials, keys, or internal code in AI chats.
Detect
—–BEGIN (?:RSA|EC|DSA|OPENSSH) PRIVATE KEY—–[\s\S]+?—–END \1 PRIVATE KEY—–
\bAKIA[0-9A-Z]{16}\b
\bAIza[0-9A-Za-z\-_]{35}\b
\bxox[baprs]-[0-9A-Za-z]{10,48}\b
Versa policy recipe
3) Catch prompt-injection “bypass” phrases before they hit the model
Goal: Filter adversarial phrasing that tries to override system policies.
Detect
(?i)\b(ignore|disregard)\s+(all|previous|prior)\s+(instructions|rules)\b
(?i)\b(reveal|print|show)\s+(the\s+)?(system|developer)\s+prompt\b
(?i)\b(exfiltrate|leak|send)\s+(data|information)\b
Versa policy recipe
4) Govern Shadow AI usage (unsanctioned tools)
Goal: Discover and control AI sites/apps that bypass policy.
Detect
Versa policy recipe
Prompts are a powerful way to interact with AI using natural language instructions, but they also create new threat opportunities for data extraction, data loss, and potential new vectors for corporate infiltration. Versa’s DLP capabilities—regex and keyword detection, proximity rules, and custom identifiers—can extend directly into prompt flows, enabling organizations to block unsafe inputs and protect sensitive information in real time.
With these controls in place, teams can safely embrace generative AI while keeping data secure, compliant, and under control. To try Versa Gen AI, start here
Subscribe to the Versa Blog