Prompt injection is an attack in which hidden instructions in text make a language model act against the business. The risk cannot be eliminated, so it must be contained through least privilege, human approval and logging. The contract should bind the vendor to concrete security measures, testing, notification of vulnerabilities and incidents, and liability proportionate to the risk.
The OWASP Top 10 for LLM Applications 2025 ranks prompt injection as the leading security risk for applications built on large language models. The risk grows when the model can send email, alter data or make payments. As a legal matter, the question is governed by several regimes at once. Under AI Act Art. 15(5), the AI Act requires high-risk systems to be resilient against attempts by unauthorised third parties to alter their use, outputs or performance. The General Data Protection Regulation governs the security of processing. The questions are why language models are vulnerable, what the legislation requires, which design limits the consequences, and what the contract with the vendor should require.
What is prompt injection, and why can a language model not separate instructions from data?
Prompt injection is an attack in which text processed by a language model contains instructions that cause the model to act contrary to what the business has decided. The instructions of the business, the user’s question and content retrieved from documents, email or web pages are all placed in the same stream of text. The model has no technically secure boundary between what is intended as an instruction and what is intended as information.
Unlike a conventional software vulnerability, prompt injection cannot be corrected by an update. OWASP states that it is unclear whether a fool-proof method of prevention exists, and that mitigation primarily reduces the impact. The NIST taxonomy of attacks on machine learning systems, NIST AI 100-2 E2025 of March 2025, likewise treats prompt injection as a distinct class of attack for which the known mitigations have limitations. The legal assessment must therefore focus on how much harm a successful manipulation can cause.
What is the difference between direct and indirect prompt injection?
In direct prompt injection, the instructions are entered by the user of the system. An example is a customer who tries to make a service assistant disregard its rules. The risk is greatest where the system holds information or functions to which the user is not entitled.
In indirect prompt injection, the instructions are contained in content that the model retrieves from an external source, such as a web page, an attachment, a calendar invitation or a document in a shared folder. The instructions may be invisible to a human reader but legible to the model. This form is the more serious for AI agents, because the attacker needs no access to the system, only content that the agent reads while holding the access rights of the business. Liability for harm to others is discussed in the article on AI agent liability.
Which legal requirements apply to the security of AI agents?
No rule addresses prompt injection specifically, but several regimes impose requirements that apply to the risk. The table sets out the most important.
| Legislation | Who is bound | Relevant requirements | Status |
|---|---|---|---|
| AI Act Art. 15 | Providers of high-risk systems | Robustness and cybersecurity, including protection against manipulative inputs | EU from 2 December 2027 (Annex III) and 2 August 2028 (Annex I), not in the EEA |
| AI Act Art. 55 | Providers of general-purpose AI models with systemic risk | Evaluation including adversarial testing, incident reporting and cybersecurity | Applies in the EU from 2 August 2025 |
| Cyber Resilience Act (EU) 2024/2847 | Manufacturers of products with digital elements | Essential cybersecurity requirements, vulnerability handling and reporting | Reporting from 11 September 2026, other obligations from 11 December 2027, not in the EEA |
| GDPR Arts. 32 and 33 | Controllers and processors | Appropriate security measures and breach notification within 72 hours | Applies in Norway |
| Norwegian Digital Security Act | Providers of essential services and digital services | Risk-based security measures and incident notification | In force since 1 October 2025 |
Under AI Act Art. 15(5), the technical solutions addressing AI-specific vulnerabilities must, where appropriate, include measures against inputs designed to cause the model to make a mistake. In our view this covers prompt injection, although the term is not used. Following the amendment of AI Act Art. 113 by Regulation (EU) 2026/1744, the requirements apply in the EU only from December 2027 and August 2028, and most AI agents will not be high-risk systems. Providers of the largest models must, under AI Act Art. 55(1)(a), perform and document adversarial testing and, under point (d), ensure an adequate level of cybersecurity protection. They give the customer a basis for requesting documentation, though no independent claim.
The Cyber Resilience Act applies to software made available on the market, together with its remote data processing solutions. From 11 September 2026, CRA Art. 14 requires the manufacturer to give an early warning within 24 hours of becoming aware of an actively exploited vulnerability or a severe incident. A full notification must follow within 72 hours. According to the Commission’s summary, pure software as a service falls outside unless it is necessary for a product to function. EEA-Lex shows that the Regulation has not been incorporated into the EEA Agreement.
For Norwegian businesses, the GDPR, which applies through the Personal Data Act, is the regime in full force today. Under GDPR Art. 32, both controller and processor must implement technical and organisational measures ensuring a level of security appropriate to the risk, taking into account the state of the art. An agent that reads external content without any assessment of the risk of prompt injection will struggle to meet that standard. If an attack causes the agent to disclose personal data, the breach must be notified to the Norwegian Data Protection Authority within 72 hours under GDPR Art. 33, as explained in the article on personal data breaches. Businesses within the scope of the Digital Security Act are also required to take risk-based security measures under §§ 7 and 10 and to notify incidents without undue delay under §§ 8 and 11.
Which system design limits the consequences of prompt injection?
Because the attacks cannot be prevented entirely, the agent must be designed so that a successful attack causes limited harm. The Guidelines for secure AI system development, published on 27 November 2023 by the UK NCSC, the US CISA and partner agencies, proceed on the same basis as OWASP. The Norwegian National Security Authority has issued no specific guidance on AI agents. Its note on AI-enabled attacks of 12 May 2026 refers to its basic principles for ICT security, including log retention.
The first measure is least privilege, meaning that the agent holds only the access rights its task requires, under its own technical identity rather than that of the employee who configured it. The second is human approval of actions with significant consequences, such as payments, deletion, entering into agreements and sending material to external recipients. The approval must sit outside the model, which cannot then grant itself permission. The third is separation of tools and data. External content should be marked as untrusted, and an agent that reads it should not also have both sensitive information and a channel out of the organisation. The fourth is logging of what the agent has read and done, so that an attack can be detected and documented. The Norwegian Data Protection Authority’s advice on AI agent governance points in the same direction.
Which security requirements against prompt injection should the contract contain?
The contract should describe concrete measures rather than a general obligation to follow industry standards. A reference to good industry practice makes breach difficult to establish while practice is developing rapidly. The vendor should instead undertake to implement the design measures above and document the agent’s configuration. The requirements should extend to the subcontractors that supply the language model.
The agreement should further oblige the vendor to test the system for prompt injection before delivery and upon material changes, including a change of underlying model. Testing should include red teaming by persons independent of the development team, with a summary of findings for the customer. The customer should also be entitled to conduct its own tests by arrangement, since standard terms often prohibit attempts to circumvent safety measures. Vendor terms for high-risk use are examined in the article on AI vendor terms for high-risk use.
The notification obligation should cover both vulnerabilities and incidents, stating which data and actions may be affected. The vendor should notify without undue delay and within a fixed period that allows the customer to meet the 72-hour deadline in GDPR Art. 33. Where the vendor is a processor, the data processing agreement under GDPR Art. 28 must contain corresponding obligations. The customer should also be entitled to suspend the agent immediately and to access the logs.
How should liability and limitation of liability be regulated?
Standard terms for AI services normally cap liability at a short period of fees and exclude indirect loss and loss of data. The typical losses from prompt injection, such as unauthorised payments, disclosure of trade secrets and personal data, or third-party claims, will often fall within those exclusions. The customer then bears the loss even where the vendor has breached its security obligations. Norwegian law on such clauses is discussed in the article on limitation of liability in SaaS agreements.
In our view, breaches of security and data protection obligations should either be excluded from the liability cap or be subject to a separate, higher cap. Loss of data, incident handling costs and administrative fines caused by the vendor’s breach should expressly count as direct loss. The vendor should be liable for its subcontractors as for its own acts. Whether the business is bound by transactions concluded by a manipulated agent is discussed in the article on AI agents and contracting.
What should a business do before deploying an AI agent?
The measures should be in place before the agent gains access to production systems. See also the artificial intelligence and contracts topic pages.
- Map which external sources the agent reads and which actions it can take on the basis of them.
- Restrict the agent’s access rights to what the task requires, and require human approval of payments, deletion and communications to external recipients.
- Address prompt injection in the risk assessment under
GDPR Art. 32and, where relevant, in a data protection impact assessment. - Require in the contract concrete security measures, testing before delivery and upon any change of model, and a right for the customer to test the system itself.
- Agree notification of vulnerabilities and incidents in time for the business to notify breaches within 72 hours.
- Negotiate a separate liability cap for breaches of security and data protection obligations, and specify that loss of data and incident handling costs are direct loss.
Questions and answers
Can the vendor guarantee that the AI agent cannot be manipulated through prompt injection?
No, and such a guarantee should not be accepted in place of concrete obligations. OWASP and NIST both proceed on the basis that no known method prevents prompt injection entirely. The contract should therefore specify which measures the vendor must maintain, how they are tested and who bears the loss when an attack nevertheless succeeds.
Is a successful prompt injection attack a personal data breach?
It is a breach under Article 4(12) GDPR if the attack leads to accidental or unlawful disclosure, alteration, loss or destruction of personal data. The controller must then notify the Norwegian Data Protection Authority within 72 hours under Article 33, unless the breach is unlikely to result in a risk to the data subjects.
Do the cybersecurity requirements of the AI Act apply to all AI agents?
No. Article 15 of the AI Act applies only to high-risk systems, and in the EU the obligations for systems listed in Annex III apply from 2 December 2027. The Regulation has not been incorporated into the EEA Agreement. The requirements are nonetheless a suitable benchmark for what a business should demand of agents that are not high-risk.
- Artificial Intelligence Act, Regulation (EU) 2024/1689 Arts. 15(1) and 15(5), 55(1) and 113
- Regulation (EU) 2026/1744 (Digital Omnibus on AI) amendment of Art. 113
- Cyber Resilience Act, Regulation (EU) 2024/2847 Arts. 13, 14 and 71 and Annex I
- European Commission, The Cyber Resilience Act, Summary of the legislative text
- EEA-Lex, Regulation (EU) 2024/2847
- General Data Protection Regulation (EU) 2016/679 Arts. 4(12), 28, 32 and 33
- Norwegian Personal Data Act (personopplysningsloven) § 1
- Norwegian Digital Security Act (digitalsikkerhetsloven) §§ 7, 8, 10 and 11
- OWASP, LLM01:2025 Prompt Injection (OWASP Top 10 for LLM Applications 2025)
- NIST AI 100-2 E2025, Adversarial Machine Learning: A Taxonomy and Terminology of Attacks and Mitigations (March 2025) section 3.4 on indirect prompt injection
- NCSC, CISA and others, Guidelines for secure AI system development (27 November 2023)
- Norwegian National Security Authority (NSM), Om Mythos og Anthropic (12 May 2026)
Next legal review: 1 December 2026