dimlang
Back to blog
Engineering3 min read

Security Challenges Every AI Project Must Address

Ayoola Ajakaiye

Standard application security practice, including auth, encryption, and least-privilege access, is necessary but not sufficient for AI systems. Language models introduce a few failure modes that don't map cleanly onto a traditional security checklist.

Data leakage through the prompt itself

Every piece of context sent to a model, from retrieved documents to chat history to system instructions, is a potential leakage surface, not just the data the model was trained on. A retrieval system that doesn't enforce the same access controls at query time as the source system does will happily surface information the requesting user was never supposed to see.

Prompt injection isn't a theoretical risk

Any system that feeds untrusted content, including a document, an email, or a web page, into a model's context is exposed to prompt injection: instructions hidden in that content attempting to override the system's actual instructions. Treating retrieved content as data, never as instructions, and validating model output before it triggers any downstream action are the two practical defenses that matter most.

Third-party API data handling

Sending data to an external model provider means trusting their data handling commitments as part of your own security posture. This needs the same diligence as any other vendor with data access: data residency, retention windows, whether your data trains their models, and what a breach on their side would mean for you.

Output validation before automation

A model's output is a suggestion, not a verified fact, until something checks it. Systems that let model output directly trigger downstream actions, including sending an email, updating a record, or executing a transaction, without validation are trusting the model's reliability with the same weight as validated, deterministic code, which it isn't.

The security question for AI isn't just “can someone break in.” It's “what happens when the system is right about the wrong thing.”

Access control on the model itself

Who can query the model, with what data, and get what level of detail back needs to be as deliberate as access control on a database. A model with broad access to sensitive systems, available to anyone in the organization without scoping, is a bigger blast radius than most teams initially account for.

None of this means AI systems are unusually insecure; it means they have a different threat model than the applications most security reviews are built around, and that threat model needs its own checklist, not an afterthought bolted onto an existing one.