Black Friday sale: an extra 40% off every course until Monday, November 30.New Year sale: an extra 30% off every course until Friday, January 1.Memorial Day sale: an extra 25% off every course until Monday, May 31.SysAdmin Day sale: an extra 25% off every course until Sunday, August 1.Back to School sale: an extra 25% off every course until Sunday, August 22.Labor Day sale: an extra 25% off every course until Monday, September 6.Black Friday sale: an extra 40% off every course until Monday, November 29.New Year sale: an extra 30% off every course until Saturday, January 1.Choose your certification →

Copyright (c) 2026 MindMesh Academy. All rights reserved. This content is proprietary and may not be reproduced or distributed without permission.

3.6.1. AI as an Attack Surface: LLMs and AI-Enabled Applications

💡 First Principle: A traditional application keeps code (instructions) separate from user input (data) — that separation is exactly what parameterized queries restore to defeat SQL injection. An LLM application has no such boundary. The developer's instructions (the system prompt), the user's message, and any documents or web pages the application retrieves are combined into one block of text that the model interprets as a whole. Anything that becomes text in that block can behave like an instruction, which is why LLMs appear in the exam's list of attack surfaces.

An LLM-enabled application is far more than the model. Each component below is a separate way in:

ComponentWhat it isWhy it is an attack surface
Prompts and inputsUser messages, uploaded files, and the emails, web pages, or documents the AI readsUntrusted text can carry instructions (prompt injection)
Training and fine-tuning dataThe data the model learned fromCorrupted data changes the model's behavior for every user (poisoning)
Retrieval data (RAG)Knowledge bases and vector stores the app searches at answer time (retrieval-augmented generation)A planted document corrupts answers without any retraining; the retriever exposes whatever its identity can read
The model itselfWeights and configuration — valuable intellectual propertyTheft, tampering (model manipulation), or a malicious model downloaded from a public repository
Connected tools, plugins, and agentsAPIs, code interpreters, email, ticketing, shell accessThe model can act, so its permissions become the attacker's permissions
OutputsText, code, or commands passed to users or to other systemsUnsanitized output becomes XSS, SQL, or command injection downstream; responses can leak data
Conversation sessionsChat history and the session tokens that tie it to a userA hijacked session exposes the history and lets the attacker act as the user

Data loss happens in two directions. Going in: employees paste source code, customer records, or credentials into public AI services, and that data leaves the organization's control — depending on the provider's terms it may be retained, logged, or used to train future models. Coming out: a model can disclose its hidden system prompt, secrets that were present in its training data, or documents its retriever could reach. An internal assistant that searches file shares through one broad service account will summarize files the person asking could never open; retrieving with the requesting user's own permissions removes that gap. Related controls: an approved list of AI tools and an AI acceptable use policy (unapproved "shadow AI" is the newest form of shadow IT), DLP inspection of prompts and responses, and enterprise agreements that prohibit training on submitted data.

Privacy is the personal-data side of the same problem. Models trained or fine-tuned on personal data can memorize records and reproduce them, and attackers can query a model to reconstruct or confirm training records (model inversion and membership inference). Once personal data is inside a model's weights, honoring a deletion request is difficult, so minimize and de-identify data before training, and treat prompts that contain PII as processing of personal data under the organization's privacy obligations.

Supply chain risk applies to models just as it does to libraries. Pre-trained models and datasets downloaded from public repositories may be backdoored, and some model file formats (for example, those based on Python's pickle serialization) can execute embedded code the moment they are loaded. Treat a third-party model like third-party software: trusted sources, hash or signature verification, scanning, formats that store only weights, and loading in an isolated environment.

⚠️ Exam Trap: The model is not the only attack surface — the data it retrieves and the tools it can call often matter more. When a scenario gives an AI assistant access to email, files, or APIs, the risk is that the AI's permissions become the attacker's, so least privilege applies to the AI's service identity exactly as it does to any other account.

See how it connects
Alvin Varughese
Written byAlvin Varughese
Founder•26 professional certifications earned