# LLM security

> Canonical: https://skillalmanac.com/glossary/llm-security | Last verified: 2026-11-25 | Index status: index-eligible

LLM security is the practice of protecting applications built on large language models, and the data, tools and users around them, from attacks such as prompt injection, data poisoning and leaking sensitive information.

Also called: LLM app security, generative AI security, LLM application security, securing LLM applications.

## In plain language

LLM security is about keeping an AI-powered app from being tricked, abused or made to leak things. A malicious line in textual content, such as an email, web page or file, can try to steer a model. Application inputs are not always text: multimodal prompt injection can also carry instructions in an image. If the app can also send messages, run commands or reach private data, a successful trick can do real harm. Security work here mostly means limiting what the model can reach, checking what it produces before acting on it, vetting the models and data you import, and testing with hostile inputs. It reduces risk and does not remove it, so decide in advance which actions need a human to approve.

## Technical definition

The OWASP Top 10 for LLM Applications (2025) names ten risks: prompt injection, sensitive information disclosure, supply chain, data and model poisoning, improper output handling, excessive agency, system prompt leakage, vector and embedding weaknesses, misinformation and unbounded consumption. Anthropic's guidance on jailbreaks and prompt injection recommends input screening, tool-output screening, telling the model that third-party content is untrusted data, least privilege so a successful injection can do minimal damage, red-teaming before deployment and continuous monitoring. IBM uses the phrase AI security more broadly, for using AI to strengthen defence and for securing AI deployments.

## How it shows up when you use agents

A coding agent reads files, web pages, issues and tool results, and it can run commands. Each of those is a path for hostile text to reach the model and a path for the model's output to cause an effect. [Prompt injection](/glossary/prompt-injection) is the best-known case, but the OWASP list also covers excessive agency, improper output handling and supply chain risks such as untrusted models or plugins.

What breaks when this is misunderstood: people rely on one control, often a careful system prompt. Anthropic's guidance layers several: screening, labelling untrusted content, least privilege, sandboxed tools, red-teaming and monitoring. [Guardrails](/glossary/guardrails) work best as one layer among these.

Next action: list what your agent can read and do, remove what it does not need, keep approval prompts on for risky actions, and keep secrets out of reach. The [AI agent](/glossary/ai-agent) and [tool calling](/glossary/tool-calling) pages explain where actions come from. See [OWASP Top 10 for LLM Applications](/glossary/owasp-llm-top-10) for the checklist.

## Common confusions

- **LLM security versus AI safety.** Security is about adversaries and misuse of a system. [AI safety](/glossary/ai-safety) is broader and includes unintended harm with no attacker.
- **LLM security versus AI security.** IBM uses AI security for several things, including using AI to improve defence. LLM security here means securing LLM applications.
- **Prompt hardening versus a security design.** Hardened prompts help, but Anthropic pairs them with screening, least privilege and testing.
- **Myth.** A closed, hosted model makes the application secure. The application's tools, data and imports are still the attack surface.

## Worked examples in this catalogue

### [Check a Claude Skill From GitHub Before Installing It](https://skillalmanac.com/learn/check-a-claude-skill-from-github-before-installing)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A step-by-step review of a third-party skill before it runs, including searching for injected shell commands, hooks and pre-approved tools, and reading scripts before install.

Why it exercises the concept: Skills and plugins are part of an agent's supply chain. Reviewing them before use is a concrete step toward securing an agent setup.

### [skill-safety-audit](https://skillalmanac.com/skills/skill-almanac/skill-safety-audit)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A JSON risk table with evidence lines for a third-party skill folder, produced before you install it.

Why it exercises the concept: It is a pre-install check on one input an agent will trust.

### [env-file-exposure-check](https://skillalmanac.com/skills/skill-almanac/env-file-exposure-check)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A report of possible local environment-file and secret-pattern exposure, with file, line and masked values. It uses a root-gitignore heuristic and does not inspect the Git index or history, so it does not establish committed or tracked status.

Why it exercises the concept: Where an agent has access to a file, exposed sensitive values can increase what a manipulated agent could leak. This illustrative local pattern check flags candidates; it neither proves Git tracking nor guarantees every secret is found.

### [sensitive-data-redaction](https://skillalmanac.com/skills/skill-almanac/sensitive-data-redaction)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A copy of a file with emails, phones, cards, IBANs, keys, IPs and listed names replaced by consistent placeholders.

Why it exercises the concept: Removing sensitive values before text goes to a model addresses, on the input side, the sensitive-information risk on OWASP's list.

## Related terms

- [Prompt injection](https://skillalmanac.com/glossary/prompt-injection.md)
- [Guardrails](https://skillalmanac.com/glossary/guardrails.md)
- [Red teaming](https://skillalmanac.com/glossary/red-teaming.md)
- [AI agent](https://skillalmanac.com/glossary/ai-agent.md)
- [Jailbreak](https://skillalmanac.com/glossary/jailbreak.md)
- [Tool calling (function calling)](https://skillalmanac.com/glossary/tool-calling.md)

## Sources

- [OWASP Top 10 for LLM Applications 2025](https://genai.owasp.org/llm-top-10/), OWASP Gen AI Security Project (accessed 2026-11-24)
- [Mitigate jailbreaks and prompt injections](https://platform.claude.com/docs/en/test-and-evaluate/strengthen-guardrails/mitigate-jailbreaks), Anthropic (accessed 2026-11-24)
- [What is AI security?](https://www.ibm.com/think/topics/ai-security), IBM (accessed 2026-11-24)
- [LLM01:2025 Prompt Injection: multimodal injection](https://genai.owasp.org/llmrisk/llm01-prompt-injection/), OWASP Gen AI Security Project (accessed 2026-11-25)

Definitions are written by Skill Almanac from the sources above and checked against them on 2026-11-25. [Glossary index](https://skillalmanac.com/glossary.md).
