Skip to main content
AI & Engineering

Threat-modeling an LLM app: a practical checklist

May 15, 2026·6 min read·Godwill
Threat-modeling an LLM app: a practical checklist

Introduction

Building LLM-powered applications introduces a unique set of security challenges that traditional web applications don't face. From prompt injection to data leakage, the attack surface is broader and more nuanced.

The Checklist

1. Input Validation Always validate and sanitize user inputs before passing them to the LLM. Treat prompts as untrusted data — because they are.

2. Output Filtering Implement output filters to prevent the model from revealing sensitive information, generating harmful content, or leaking system prompts.

3. Rate Limiting Apply aggressive rate limiting to API endpoints. LLM calls are expensive and can be abused for denial-of-service attacks.

4. Authentication & Authorization Ensure that users can only access data they're authorized to see. LLMs don't inherently understand access control.

5. Logging & Monitoring Log all LLM interactions with sufficient detail for forensic analysis. Monitor for anomalous patterns.

6. Data Privacy Never send sensitive customer data to third-party LLM providers without proper anonymization and contractual protections.

Conclusion

Threat modeling isn't a one-time activity. As your LLM application evolves, so do the threats. Review this checklist quarterly.

G

Written by Godwill

Founder of Maralito Labs

Read more about the founder →