Security Principle: No Secrets in System Prompts

The foundational layer dictates that system prompts should never be treated as secure storage or contain sensitive information like API keys, credentials, or internal logic, as they are susceptible to leakage via prompt injection attacks.

The top 3

  1. Top 3 Attack Vectors Exploiting Prompt Secrets: Attackers primarily use prompt injection (direct or indirect) to override instructions, system prompt leakage to reveal internal directives, and then leverage exposed secrets for data exfiltration or privilege escalation.
  2. Top 3 Secure Methods for LLM Secret Management: Securely manage LLM secrets by using environment variables, leveraging dedicated secrets management services like AWS Secrets Manager or Akeyless, and implementing backend API calls with least privilege rather than embedding credentials in prompts.
  3. Most Common Secrets Accidentally Exposed in Prompts: Developers frequently expose API keys, database credentials, proprietary business logic, and sensitive user data (like PII or PHI) by mistakenly embedding them directly within LLM system prompts.

Sources

Open the full topic