Securing AI Systems: Prompt Injection, Agents and the AI Supply Chain
In short
Securing AI systems means protecting the models, data, prompts, tools, agents and infrastructure that make up AI applications against attacks and failures that traditional security controls were not designed for. The most important new risk is prompt injection: instructions hidden in emails, documents, web pages or user input that manipulate an AI system into leaking data or taking actions its owners never intended. The risk grows as AI systems gain access to tools and act as agents. Other risks include sensitive data disclosure through answers and logs, poisoned training or retrieval data, compromised models and libraries in the AI supply chain, unsafe handling of AI outputs by downstream systems and runaway consumption that drives up costs. No single control solves these problems. Effective security for AI combines limiting what AI systems can access and do, treating everything they read as untrusted, enforcing permissions outside the model, validating outputs before they are used, securing the supply chain, monitoring behavior and testing systems adversarially before and after deployment. This guide gives CISOs and security architects a practical model of the AI attack surface, the defenses that work, how to embed AI security in development and procurement, and how to report it to executives and boards.
Key takeaways
- Assume prompt injection will sometimes succeed; limit what a manipulated AI system can reach or do.
- Enforce permissions and approvals outside the model; never rely on instructions in prompts for security.
- Give agents their own identities, least-privilege tools and human approval for consequential actions.
- Treat AI outputs as untrusted input to downstream systems; validate and encode them.
- Secure the AI supply chain: models, datasets, libraries, plugins and connectors.
- Log prompts, retrievals, tool calls and outputs, and monitor for abuse and anomalies.
- Red team AI systems before release and after significant changes, using OWASP and MITRE ATLAS as guides.
What this guide covers
- What does securing AI systems mean?
- How is AI security different from traditional application security?
- What is the AI attack surface?
- What are the top security risks for AI applications?
- What is prompt injection?
- How should organizations defend against prompt injection?
- Why is excessive agency dangerous?
- How should agents' tools and permissions be secured?
- How do you prevent sensitive information disclosure by AI?
- How should system prompts be protected?
- How should AI outputs be handled safely by other systems?
- How should retrieval systems and vector stores be secured?
- What is data and model poisoning?
- How should the AI supply chain be secured?
- How should model files be handled securely?
- How should third-party model APIs be used securely?
- How should connectors and plugins for AI be secured?
- How do you protect AI systems against unbounded consumption and abuse?
- How should AI infrastructure and pipelines be secured?
- How should identity and access work for AI systems?
- How should AI systems be logged and monitored?
- How should AI security testing and red teaming work?
- Which frameworks guide AI security?
- How should AI be integrated into the secure development lifecycle?
- How should AI threat modeling be done?
- How should security review of new AI uses work?
- How should AI applications handle authentication and session context?
- How should AI security exceptions and risk acceptance work?
- How should shadow AI be addressed by security teams?
- How should enterprise copilots and assistants be secured?
- How should browser and computer-use agents be secured?
- How should customer-facing chatbots be secured?
- How should organizations defend against AI-enabled social engineering?
- How should AI security incidents be handled?
- How do regulations address AI security?
- How should AI vendors be assessed for security?
- How should the security operations center detect attacks on AI?
- How should model theft and extraction be prevented?
- How should data loss prevention adapt to AI?
- How should AI coding assistants be secured?
- How should secrets be protected from AI tools?
- How should providers of multi-tenant AI products secure them?
- How should privacy attacks on AI models be considered?
- How should open-weight and self-hosted models be secured?
- How should cloud AI services be configured securely?
- How can AI help defenders secure AI and other systems?
- How should developers and users be trained on AI security?
- What should CISOs report to the board about AI security?
- How should AI security be measured?
- How should mid-sized organizations secure AI?
- Worked example: a retailer secures an AI shopping assistant
- What are the most common mistakes in securing AI systems?
- What should a CISO do in the first 90 days on AI security?
- How do CXO Avenue members approach securing AI?
The full guide is for CXO Avenue members. 8,018 words of analysis, frameworks and worked examples for Cybersecurity leaders.
Frequently asked questions
What is prompt injection?
An attack in which text supplied to an AI system, directly by a user or indirectly through content such as documents, emails or web pages, causes it to ignore its intended instructions and leak data, produce harmful content or take unauthorized actions.
Can prompt injection be prevented completely?
Not with current technology. Defenses reduce the risk, but organizations should assume some attacks succeed and limit what a manipulated AI system can access and do.
What is the most effective defense against prompt injection?
Limiting the blast radius: least-privilege tools and data access, permissions and approvals enforced outside the model, restrictions on where data can be sent and human confirmation for consequential actions.
What is excessive agency in AI?
Giving an AI system more functionality, permissions or autonomy than its task requires, which turns errors or manipulation into serious harm.
How should AI agents be secured?
With distinct identities, least-privilege and short-lived credentials, narrow tools, approval for consequential actions, validation of tool inputs and outputs, logging of every action and the ability to stop them quickly.
What is the OWASP Top 10 for LLM Applications?
A list of the most significant security risks for applications using large language models, including prompt injection, sensitive information disclosure, supply chain vulnerabilities, poisoning, improper output handling, excessive agency, system prompt leakage, vector weaknesses, misinformation and unbounded consumption.
What is MITRE ATLAS?
A knowledge base of adversary tactics and techniques against AI systems, used for threat modeling, red teaming and detection.
How do you secure the AI supply chain?
Source models, datasets, libraries and connectors from trusted providers, verify integrity, scan files, prefer safe model formats, maintain inventories, pin versions, review licenses and patch dependencies.
Why are some model files dangerous?
Some serialization formats, such as Python pickle, can execute code when loaded, so a malicious model file can compromise the system that loads it. Safer formats such as safetensors avoid this.
How should AI outputs be handled?
As untrusted input to other systems: validated against expected formats, encoded before display, parameterized in queries and never executed as code or commands without sandboxing and review.
What should be logged for AI systems?
Prompts, references to retrieved content, tool calls with parameters, outputs, user and agent identities and costs, with access controls and retention limits because logs may contain sensitive data.
How do you secure enterprise copilots?
Fix oversharing in the content they search, apply sensitivity labels and data loss prevention, configure retention, restrict connectors, monitor for misuse and protect user accounts with strong authentication.
What is AI red teaming?
Adversarial testing of an AI application by skilled testers, supported by automated attack libraries, to find ways it can be manipulated, leak data or cause harm, before deployment and after significant changes.
How does the EU AI Act address AI security?
It requires high-risk AI systems to achieve appropriate accuracy, robustness and cybersecurity, including resilience against manipulation such as data poisoning and adversarial inputs, alongside existing cybersecurity and data protection obligations.
How should the SOC monitor AI?
By ingesting AI application, gateway and agent logs, building detections for injection attempts, abnormal retrieval, unusual tool calls, exfiltration patterns and key misuse, and training analysts on AI attack patterns.
Do system prompts keep secrets safe?
No. System prompts can often be extracted by users. They should contain no secrets, and security rules they describe must be enforced elsewhere.
How can organizations protect against deepfake fraud?
Verify payments, credential resets and sensitive requests through separate, known channels, use phishing-resistant authentication, require multi-person approval for high-value actions and train staff on synthetic media.
How should AI vendors be assessed for security?
With standard third-party reviews plus questions on prompt injection defenses, tenant isolation, data retention, supply chain security, customer-accessible logs, red teaming and incident notification.
How should AI coding assistants be secured?
Approve specific tools with appropriate data terms, keep secrets out of code sent to them, scan generated code for vulnerabilities and license issues, require normal code review, verify suggested dependencies and isolate coding agents with limited credentials.
Where should an AI tool get the user's identity from?
From the authenticated session, never from what is typed in the conversation, with permissions passed securely to every tool and retrieval call and step-up verification for sensitive actions.
How should data loss prevention cover AI?
By recognizing AI services as destinations, applying sensitivity labels that follow data into AI tools, inspecting prompts and uploads where policy allows, warning or blocking transfers of sensitive data to unapproved services and covering AI outputs.
How should AI security exceptions be handled?
Through the existing exception process, recording what the AI can access and do, missing and compensating controls, an accountable business owner and an expiry date, with exceptions tracked and reported to leadership.
Glossary
- Prompt injection
- Manipulating an AI system through instructions in the text it processes.
- Indirect prompt injection
- Prompt injection delivered through content the AI reads, such as documents or web pages.
- Jailbreak
- An attempt to make an AI system bypass its safety policies.
- Excessive agency
- An AI system having more functionality, permissions or autonomy than its task needs.
- System prompt
- Instructions given to a model by the application to guide its behavior.
- Improper output handling
- Using AI outputs in other systems without validation, enabling injection or code execution.
- Retrieval-augmented generation
- Answering using content retrieved from approved sources at query time.
- Vector store
- A database of embeddings used to find relevant content for retrieval.
- Data poisoning
- Manipulating training or retrieval data to alter AI behavior.
- Backdoor
- Hidden behavior in a model triggered by specific inputs.
- AI bill of materials
- An inventory of models, datasets and components used in an AI system.
- Safetensors
- A model file format designed not to execute code when loaded.
- Model extraction
- Approximating a model's behavior through systematic queries.
- Membership inference
- Determining whether specific data was used to train a model.
- MITRE ATLAS
- A knowledge base of adversary tactics and techniques against AI systems.
- Blast radius
- The extent of harm possible if a component is compromised or manipulated.
- Kill switch
- A control that quickly disables an AI feature, connector or agent.
- Unbounded consumption
- Excessive use of AI resources through abuse or bugs, raising costs or degrading availability.
- Tenant isolation
- Keeping each customer's data and outputs separate in a shared AI service.
- Step-up verification
- Additional identity checks required before sensitive actions.
- Model Context Protocol
- An open protocol for connecting AI applications to tools and data sources.
Related guides
- AI in the Security Operations Center: Detection, Response, Automation
- The CISO Guide for 2027: Board Reporting, Resilience and AI Security
- Agentic AI in the Enterprise: A CIO Guide to Agents and Controls
- Enterprise AI Reference Architecture: Gateways, Retrieval, Agents
- Generative AI for Marketing Content and Creative
- Voice AI in the Contact Center: Speech Agents and Real-Time Assist