System Prompt Leakage vulnerabilities occur when sensitive information is stored in the instructions used to steer an AI model’s behavior. In this blog, we’ll discuss the ways this can happen, consequences, and how to prevent it.
In 2025, AI is everywhere, and so are AI vulnerabilities. OWASP’s Top Ten Risks for LLMs provides developers and security researchers with a comprehensive resource for breaking down the most common risks to AI models. In previous blogs, we’ve covered the first 6 items on the list, and today, we’ll be going over number 7: System Prompt Leakage.
System Prompts are used to instruct AI model behaviour, and System Prompt Leakage occurs when sensitive information contained within the prompt is exposed. Once attackers access these secrets, they can use what they’ve learned to facilitate further attacks.
The system prompt itself should never be a secret, however, underlying secrets contained within the system prompt, such as guardrails, etc., are what attackers are looking for.
The best way to prevent System Prompt Leakage is to avoid hiding sensitive data such as credentials, permissions, data strings or passwords, etc., within the system prompt language. That way even if attackers get a hold of the system prompt, they have not gained any critical insider knowledge.
Some common examples of System Prompt Leakage are:
Prevention Strategies:
With AI vulnerabilities on the rise, now more than ever is the time for security researchers to educate themselves on the risks to LLMs and the OWASP Top 10 is a great place to start. System Prompt Leakage occurs when attackers access sensitive information contained within the system prompt of an LLM. They can then use this information to launch further attacks. There are several ways to mitigate the risk of system prompt leakage, but the best way is to ensure that you store sensitive information such as credentials and passwords outside of the system prompt.
To learn more about AI security and see how FireTail can help you with your AI security today, schedule a demo or set up a free trial, here.