🧠OWASP LLM Top 10 LLM07Rule: OWASP-LLM-007medium

System Prompt Leakage

Description

System prompts containing sensitive info (business logic, secrets, authorization rules) exposed through model output, jailbreaks, or prompt-injection.

⚠️ Risk Impact

System prompts are routinely treated as 'private' by developers — but they're trivially extractable by sufficiently motivated users. Any sensitive info in a system prompt is functionally public.

🔍 How EchelonGraph Detects This

OWASP-LLM-007Automated scanner rule

EchelonGraph's Tier 1 Cloud Scanner automatically checks for this condition across all connected cloud accounts. Violations are flagged as medium-severity findings with remediation guidance.

🔧 Remediation

Never store secrets in system prompts. Use external authorization checks instead of prompt-encoded rules. Treat system-prompt content as 'public knowledge that's just inconvenient to find'.

💀 Real-World Attack Scenario

A Discord-integrated coding-assist LLM had a system prompt that embedded an OpenAI API key for tool use. A user posted a system-prompt-extraction payload; the key leaked. Within hours an attacker had enumerated the API and incurred $87K in unbilled compute before AWS billing flagged the spike.

💰 Cost of Non-Compliance

System-prompt-leaked API keys: avg $50K-$200K direct compute cost per incident + reputational impact.

📋 Audit Questions

  • 1.Show me the system prompt for your top LLM application.
  • 2.Does it contain any secrets, API keys, or business-sensitive content?
  • 3.What is your secret rotation policy if a system prompt leaks?
  • 4.Have you tested system-prompt extraction recently?

🎯 MITRE ATT&CK Mapping

MITRE_ATLAS-AML.T0051 — LLM Prompt Injection

⚡ Common Pitfalls

  • Embedding API keys, internal URLs, or pricing logic in system prompts
  • Treating system prompts as inaccessible to users
  • No rotation procedure if leak occurs

📈 Business Value

System-prompt hygiene prevents the most common LLM secret-leakage incident. Material for any LLM application that uses authenticated tool access.

⏱️ Effort Estimate

Manual

1-2 weeks for system-prompt audit + secret-extraction to env / KMS

With EchelonGraph

EchelonGraph scans system prompts for secret patterns; alerts on embedded credentials

🔗 Cross-Framework References

OWASP_LLM-LLM01OWASP_LLM-LLM02

Automate OWASP LLM Top 10 LLM07 compliance

EchelonGraph continuously monitors this control across all your cloud accounts.

Start Free →