AI Integrations,
Actually Reviewed.

Strata Security's repository scans detect 8 of the 10 OWASP Top 10 for LLM Applications (2025) categories — the pattern-based risks that appear when application code integrates directly with an AI provider.

What Is the OWASP Top 10 for LLM Applications?

8 of 10 Categories Covered

The two categories not covered — Data and Model Poisoning, and Misinformation — are training-pipeline and model-output-quality concerns that aren't visible in application source code, so they're left off rather than stretched for weak findings.

IDCategoryPythonJS / TSTypical Severity
LLM01Prompt InjectionHigh
LLM02Sensitive Information DisclosureHigh
LLM03Supply ChainHigh
LLM05Improper Output HandlingHigh
LLM06Excessive AgencyMedium
LLM07System Prompt LeakageHigh
LLM08Vector and Embedding WeaknessesMedium
LLM10Unbounded ConsumptionMedium

How Strata Detects Each Category

Pattern-based static analysis applied to every repository scan, across Python and JavaScript/TypeScript.

LLM01

Prompt Injection

High

Identification of untrusted request data interpolated directly into a prompt, with no separation between trusted instructions and user-controlled input.

Detection Techniques
  • F-string / concatenation of request data into a prompt-shaped variable (Python)
  • Template-literal interpolation of request data into a prompt string (JS/TS)
  • Flags the same construction pattern already used to catch SQL injection, applied to prompt building instead of query building
Example Finding
system_prompt = f"You are helpful. {request.json['msg']}"

Prompt injection is the entry point for most other LLM attacks — an attacker who can override your instructions can often chain into data exposure or unintended tool use.

LLM02

Sensitive Information Disclosure

High

Detection of PHI/PII-shaped data — or entire raw request objects — passed directly into a third-party AI API call with no visible redaction.

Detection Techniques
  • OpenAI/Anthropic SDK calls receiving a raw request.json / request.form / req.body object
  • PHI/PII-named identifiers (patient, diagnosis, ssn, medical_record, credit_card) passed directly into an AI API call
Example Finding
openai.chat.completions.create(messages=[{"content": patient_diagnosis}])

The most compliance-relevant category — this is what a HIPAA- or PCI-adjacent application needs caught before sensitive data ever leaves the application boundary.

LLM03

Supply Chain

High

Unsafe ML model loading patterns that risk arbitrary code execution on load, or an unpinned model whose exact weights can change without notice.

Detection Techniques
  • torch.load() without weights_only=True — defaults to pickle-based deserialization
  • HuggingFace from_pretrained() without a pinned revision (commit hash or tag)
Example Finding
weights = torch.load("model.pt") # no weights_only=True

A compromised or tampered model file is functionally equivalent to a malicious dependency — it just doesn't look like one in a typical dependency audit.

LLM05

Improper Output Handling

High

AI-generated response content flowing into an established dangerous sink — eval(), innerHTML, dangerouslySetInnerHTML — with no sanitization.

Detection Techniques
  • AI response variables passed directly to eval() (Python and JS)
  • AI response assigned to innerHTML or rendered via dangerouslySetInnerHTML with no sanitization step
Example Finding
element.innerHTML = aiResponse;

The model's output is untrusted data, exactly like any other external input — a prompt-injection attack upstream can indirectly control what ends up here.

LLM06

Excessive Agency

MediumHeuristic — review before treating as confirmed

LLM-callable tools registered with a name that itself suggests a destructive or irreversible capability, with no visible approval gate.

Detection Techniques
  • LangChain Tool() / DynamicTool() registrations named with a destructive verb (delete, remove, drop, exec, shell)
Example Finding
Tool(name="delete_user_account", func=delete_fn)

Heuristic and name-based by design — this flags a tool worth a human review, not a confirmed vulnerability. Whether it's actually a problem depends on whether a real approval step exists before the tool fires.

LLM07

System Prompt Leakage

High

Secrets or API keys embedded directly inside a system prompt string, where they leak if the prompt is ever disclosed or extracted via prompt injection.

Detection Techniques
  • System-role prompt content containing api_key / password / secret-key-shaped strings (Python and JS, quoted or unquoted object keys)
Example Finding
{"role": "system", "content": "use api_key sk-..."}

A leaked system prompt hands an attacker both the credential and a blueprint for crafting a more effective prompt-injection attack against your actual instructions.

LLM08

Vector and Embedding Weaknesses

MediumHeuristic — review before treating as confirmed

Vector database queries with no visible tenant/user scoping filter — a common way for one user's retrieval to surface another user's embedded documents.

Detection Techniques
  • Pinecone-shaped vector queries with no filter parameter
  • Chroma-shaped vector queries with no where clause
Example Finding
results = index.query(vector=embedding, top_k=5) # no filter

Heuristic by design — single-tenant applications may not need a filter at all. Deliberately excludes FAISS, which has no built-in filtering concept, since nearly every real FAISS call would otherwise false-positive.

LLM10

Unbounded Consumption

Medium

AI API calls with no token limit set, allowing a single request — or a burst of them — to drive unbounded cost and latency.

Detection Techniques
  • OpenAI-shaped calls (chat.completions.create, ChatCompletion.create, Completion.create) missing max_tokens
  • Anthropic deliberately excluded — its API requires max_tokens, so its absence would fail the call rather than allow unbounded generation
Example Finding
openai.chat.completions.create(model="gpt-4", messages=msgs) # no max_tokens

A cost-denial-of-service vector as much as an availability one — an unbounded endpoint reachable from user input is a real line item on your AI provider's bill.

What's Deliberately Not Covered

Detection Confidence, by Category

Scan Your AI Integration
Free Today

Connect a repository and get OWASP LLM Top 10 mapping alongside standard OWASP Web Top 10 and CWE coverage. No credit card required.

Looking for mobile app coverage instead? See the OWASP Mobile Top 10 page.