LLM Security Risks and Attack Surfaces (Explained Clearly) - Prompt Injection and More
CompTIA Security+ SY0-801: Cybersecurity Fundamentals
Learn to spot LLM security risks, from prompt injection to tools with too much access, and find ways to limit data leaks, unauthorized actions, and costs.
👉 Master your Security+ skills with Pluralsight here: Pluralsight
You’ll learn how to spot large language model (LLM) security risks and attack surfaces, from prompt injection to tools with too much access. This beginner-friendly Security+ guide explains which controls help prevent data leaks, unauthorized actions, and unexpected AI costs.
Chapters:
0:00 Intro
0:16 What’s part of an LLM’s attack surface?
0:58 How does prompt injection work?
1:50 What can go wrong without prompt injection?
2:36 Which security controls actually reduce LLM risk?
3:36 Outro
Affiliate notice: Some links may earn a commission. Thanks for your support.
- Map the entire LLM attack surface, not just the chat box. Review sign-in, document retrieval, connected tools, downstream outputs, third-party dependencies, and logs.
- Prompt injection can come from users or from content the model reads. A PDF, webpage, or support ticket can steer the model off task. Prompt labels and filters are not security boundaries.
- Let the model propose; let the application authorize. Give summarizers read-only access, enforce permissions at the destination API, and require approval for consequential actions.
- Check document permissions before retrieval. Keep customer data separated, store credentials outside prompts, and limit sensitive data in logs.
- Cap what the assistant can spend and do. Set per-user quotas, spending caps, and tool-step limits; monitor for unusual costs and unexpected data access.
- Look beyond prompt injection. Data leaks, compromised dependencies, and unsupported answers can occur without anyone manipulating the prompt. Use the OWASP Top 10 for LLM Applications to broaden your review.
- 👉 Put these concepts into practice with Pluralsight. Use guided labs and feedback to build skills, then use assessments and practice exams to focus your certification prep.
An AI assistant that can summarize an invoice doesn’t need permission to change a vendor’s payment details. If it has that permission anyway, a misleading summary can become an unauthorized change. That’s why LLM security risks depend not only on what the model says, but also on what the application lets it read, change, and spend.
This Security+ guide explains where those risks arise, how to tell prompt injection from other failures, and which controls can prevent data leaks, unauthorized actions, and unexpected AI costs.
What is an LLM attack surface?
A large language model (LLM) generates text by predicting sequences of tokens, or units of text. An LLM application is the system around it: the chat interface, sign-in flow, document search, connected tools, logs, and infrastructure. Its includes all the places where someone could interact with or influence that system.
FAQ
Quick answers to the questions people usually ask about this topic.
Is a read-only AI chatbot still a security risk?
Is a read-only AI chatbot still a security risk?
Yes. Read-only access prevents the chatbot from changing records through its tools, but it can still disclose data a user isn't authorized to see, produce a misleading summary, or consume excessive resources. Check what the chatbot can read on each user's behalf, not just whether it can write.
Does using a private or self-hosted LLM eliminate prompt injection?
Does using a private or self-hosted LLM eliminate prompt injection?
No. Self-hosting can give you more control over where data is processed and logged, but the model can still be influenced by untrusted text in documents, messages, or tool results. As the UK National Cyber Security Centre explains, prompt instructions aren't a reliable security boundary. Enforce permissions and approvals outside the model.
How can you verify that a RAG chatbot respects document permissions?
How can you verify that a RAG chatbot respects document permissions?
In a test environment, create a synthetic document and two test accounts: one that can read the document and one that can't. Ask both accounts a question the document answers, then check retrieval records to confirm the restricted document never entered the unauthorized account's model context. Repeat after revoking access to check that cached results don't bypass the permission change.
What should you log to investigate an LLM security incident without storing every prompt?
What should you log to investigate an LLM security incident without storing every prompt?
Record who made the request, when it happened, which document or tool was accessed, and whether the application allowed, blocked, or required approval for the action. A request ID can tie those events together. Avoid logging credentials or full document contents by default, and restrict access to audit records.
Which LLM security risks should a team prioritize before launch?
Which LLM security risks should a team prioritize before launch?
Start with the failures that would cause the most harm in your workflow, such as exposing customer data, making an unauthorized change, or running up costs. For each one, verify that a control still works when the model gets things wrong: a document permission check, a read-only tool identity, or a hard spending cap. Use the OWASP Top 10 for LLM Applications to check for risks you may have missed.
How can I practice the Security+ concepts behind LLM security risks?
How can I practice the Security+ concepts behind LLM security risks?
If you understand the terms but want practice choosing controls for a workflow, try the guided labs in Pluralsight. Use lab feedback to refine your approach, then use assessments and practice exams to identify gaps in areas such as access control, security operations, and risk management.
Comments
Add a comment...Pinned by @jaymayor
@jaymayor👉 Master your Security+ skills with Pluralsight here: https://www.jaymayor.com/go/security-plus
Some links may earn a commission. Thanks for your support.
