A common language for attacks on AI
NIST AI 100-2e2025, a report of the National Institute of Standards and Technology (NIST), gives a taxonomy of attacks in adversarial machine learning (AML). It arranges them by the life cycle stage of the attack and by the attacker's goals, objectives, capabilities and knowledge. The taxonomy and its terminology are meant to inform other standards and future practice guides for assessing and managing the security of artificial intelligence (AI) systems, by establishing a common language.
The report deliberately leaves aside how organizations can make decisions about developing and using AI systems in light of the evidence about AML attacks and the limits of the available mitigations.
The Guidelines for secure AI system development were published by the United Kingdom's National Cyber Security Centre (NCSC), the United States Cybersecurity and Infrastructure Security Agency (CISA) and international partners. They say that AI systems "are subject to novel security vulnerabilities that need to be considered alongside standard cyber security threats".
What the attacker wants
NIST AI 100-2e2025 sorts attacks by the attacker's objective. Availability breakdown, integrity violation and privacy compromise apply to both predictive and generative AI. Misuse enablement is described for generative AI.
Availability breakdown
Deliberate interference with a system to disrupt the ability of other users or processes to obtain timely and reliable access to its services. It can be done through data poisoning, model poisoning, or energy-latency attacks that need only query access.
Integrity violation
Deliberate interference that forces a system to misperform against its intended objectives and produce predictions that align with the adversary's objective. It can be done through evasion at deployment time or poisoning at training time.
Privacy compromise
In generative AI, an attempt to gain unauthorized access to restricted or proprietary information in the system, such as its training data, weights or architecture, or the knowledge base of a retrieval-augmented generation (RAG) application.
Misuse enablement
An objective especially relevant to generative AI: deliberately circumventing technical restrictions that the system's owner imposes on its use, such as restrictions designed to prevent outputs that could cause harm to others.
When attacks happen
AML attacks can occur across a model's life. The comparison below takes the two stages most examples come from: training and deployment.
Training stage
- Data poisoning: the adversary controls a subset of the training data by inserting or modifying training samples
- Model poisoning: the adversary controls the model and its parameters
Deployment stage
- Evasion attacks modify testing samples to create adversarial examples that alter the model's predictions
- Attackers with query access can mount availability attacks
- Attackers with query access can also mount privacy attacks such as membership inference and data reconstruction
Two kinds of prompt injection
Generative AI adds prompt injection.
Direct prompt injection
It comes from the user's own in-context instructions.
Indirect prompt injection
It is executed through resource control, meaning control of external resources that the model consumes at inference time.
What the attacker knows
By the attacker's knowledge, attacks are white-box, gray-box or black-box.
White-box
These attacks assume full knowledge of the system. They are analyzed mainly to test its vulnerability against worst-case adversaries.
Black-box
These attacks assume minimal knowledge and are the most practical.
Red teaming
NIST AI 100-2e2025 defines red teaming in the AI context as "a structured testing effort, often adopting adversarial methods, to find flaws and vulnerabilities in an AI system, including unforeseen or undesirable system behaviors or potential risks associated with the misuse of the system".
The report says that, especially in generative AI, some model developers and application builders have moved toward testing adversarial risks as part of pre-deployment testing and evaluation, such as through a structured red-teaming process.
NIST AI 600-1 is a cross-sectoral profile of the AI Risk Management Framework (AI RMF) for generative AI, and the AI RMF is intended for voluntary use. The profile calls AI red-teaming an evolving practice, often conducted in a controlled environment and with the developers building the models. Its purpose is to identify potential adverse behavior or outcomes of a model or system, how they could occur, and to stress test safeguards. Red-teaming can happen before or after release to the broader public, and the profile's section on it focuses on pre-deployment contexts.
What makes red-team results useful
The profile links the quality of the results to the team.
Diverse teams
Diverse teams can find flaws in the varying contexts where generative AI will be used.
Domain expertise
Teams should show domain expertise and awareness of socio-cultural aspects of the deployment context.
Further analysis
Results should get additional analysis before they feed governance decisions, policy updates and risk management.
Who can be on the red team
NIST AI 600-1 describes four ways to staff red-teaming.
General public
General users, not necessarily AI or technical experts, who are expected to use the model or interact with its outputs and bring their own lived experiences. This type can be more effective with large groups.
Expert
Specialists with expertise in the domain or the specific context of use, such as medicine, biotech or cybersecurity.
Combination
Expert and general public participants together, where specialists with enough domain and contextual expertise are hard to recruit. Expert red-teamers could, for example, modify or verify prompts written by general public red-teamers.
Human / AI
Generative AI working with specialist or non-specialist human teams. Red-teaming led by generative AI can be more cost effective than human red-teamers alone.
Red-teaming in two NIST documents
NIST AI 800-1 on managing misuse risk for dual-use foundation models is a second public draft, released in January 2025 for a second round of public comment.
NIST AI 600-1, Generative AI Profile
- Red-teaming to assess resilience against abuse that facilitates attacks on other systems, generative AI attacks such as prompt injection, and machine learning attacks such as data poisoning and model extraction
- Internal and external evaluations, red-teaming or impact assessments with AI actors who know the context of use or represent the populations associated with it
- Verifying that those conducting structured human feedback exercises are not directly involved in development tasks for the same model
- Documenting the instructions given to AI red-teamers
NIST AI 800-1, second public draft
- Red-teaming safeguards to assess whether threat actors could bypass model or system safeguards designed to prevent misuse
- Assembling red teams with regard to domain expertise, independence from the model developer, diversity of perspectives and lack of conflicting incentives
- Considering tests of the model without safeguards, with safeguards, and integrated into a downstream system or interface
- Establishing evidence of safeguards' effectiveness, such as by red-teaming, before relying on them to prevent misuse
Who tests, and how independent they are
Under MEASURE 1.3 of the AI RMF, as NIST AI 600-1 restates it, internal experts who did not serve as front-line developers for the system and/or independent assessors are involved in regular assessments and updates. The profile treats red-teaming as a structured human feedback exercise.
The profile suggests engaging in internal and external evaluations, red-teaming, impact assessments or other structured human feedback exercises with AI actors who have expertise and familiarity in the context of use or who represent the populations associated with it. It also suggests verifying that those conducting structured human feedback exercises are not directly involved in system development tasks for the same model.
The Hiroshima Process International Code of Conduct, as quoted by the Organisation for Economic Co-operation and Development (OECD), asks organizations developing advanced AI systems to "employ diverse internal and independent external testing measures, through a combination of methods for evaluations, such as red-teaming". The OECD analyzed 20 voluntary responses to the code's reporting framework, submitted between February and June 2025.
Many respondents pointed to adversarial testing, including red teaming and purple teaming, and several worked with external researchers or panels, often by commissioning independent evaluations. AI21, for example, hires third-party testing firms to evaluate in parallel with its own testing.
Security testing across the life cycle
- 1
Design: model the threats
As part of risk management, apply a holistic process to assess the threats to the system, including the potential impacts on the system, users, organizations and wider society if an AI component is compromised or behaves unexpectedly, and document the decisions.
- 2
Development: put AI models in code testing
NIST Special Publication (SP) 800-218A recommends including AI models in code testing policies and guidelines. It names unit, integration and penetration testing, red teaming, use case testing and adversarial testing as forms that can be used. It also recommends testing all AI models for vulnerabilities under those policies, and recording and triaging every issue found, with its recommended remediation.
- 3
Release: evaluate first, then state the limits
Release models, applications or systems only after appropriate and effective security evaluation such as benchmarking and red teaming, and be clear to users about known limitations or potential failure modes.
- 4
Retraining: test again
Retest AI models when they are retrained or new data sources are added.
What the law requires
Executive Order (EO) 14148 of 20 January 2025 revoked EO 14110 on Safe, Secure, and Trustworthy Development and Use of Artificial Intelligence. NIST developed AI 600-1 under section 4.1(a)(i)(A) of EO 14110.
In the European Union (EU), the AI Act, Regulation (EU) 2024/1689 as amended by Regulation (EU) 2026/1744, requires high-risk AI systems to be resilient against attempts by unauthorized third parties to alter their use, outputs or performance by exploiting system vulnerabilities. The technical solutions for AI-specific vulnerabilities must include, where appropriate, measures to prevent, detect, respond to, resolve and control for data poisoning, model poisoning, adversarial examples or model evasion, confidentiality attacks or model flaws. This is Article 15(5).
When Article 15 applies
Article 15 is in Chapter III, Section 2, which applies on different dates depending on how the system is classified.
From 2 December 2027
Systems that are high-risk under Article 6(2) and Annex III.
From 2 August 2028
Systems that are high-risk under Article 6(1) and Annex I, Section A. Article 15 does not apply to systems related to products under Annex I, Section B, because Article 2(2) applies only a limited set of provisions to them.
Systems already on the market
A high-risk system placed on the market or put into service before that date, other than the systems referred to in Article 111(1), is covered only if it is subject to significant changes in its design from that date. Providers and deployers of high-risk systems intended for use by public authorities must comply by 2 August 2030 in any case.
Adversarial testing of general-purpose AI models
Providers of general-purpose AI models with systemic risk must perform model evaluation in accordance with standardized protocols and tools reflecting the state of the art. That includes conducting and documenting adversarial testing of the model with a view to identifying and mitigating systemic risks. This is Article 55(1)(a). Recital 114 explains that providers should perform the necessary model evaluations, in particular before first placing the model on the market, including adversarial testing done, as appropriate, through internal or independent external testing.
When the general-purpose AI duties apply
Article 55 is in Chapter V, on general-purpose AI models.
From 2 August 2025
Chapter V applies.
By 2 August 2027
Providers of general-purpose AI models placed on the market before 2 August 2025 must take the necessary steps to comply.
Until a harmonized standard is published
These providers may rely on codes of practice within the meaning of Article 56 to demonstrate compliance.
Worked example
Testing a support assistant before release
A software company is building a customer-support assistant on a third-party large language model (LLM). The assistant answers questions with retrieval-augmented generation (RAG) over a knowledge base that includes web pages and customer emails, and it processes customers' order details. The company plans to release it in three months and wants a security testing plan.
- 1
Model the threats
Following the NCSC and CISA guidelines, the team assesses the impacts on users, the company and others if the assistant is compromised or behaves unexpectedly, and documents its decisions. Web pages and emails are external resources the model consumes at inference time, so NIST AI 100-2e2025 points the team to indirect prompt injection, which attackers can use to make a model leak a user's private data that the system processes.
- 2
Choose the testers
The team brings in security specialists who did not build the assistant. This follows AI 600-1's expert type of red-teaming and its suggestion that those running structured human feedback exercises not be directly involved in developing the same model. The team documents the instructions it gives them.
- 3
Test and record
The red-teamers try direct and indirect prompt injection against the assistant. As SP 800-218A recommends for testing AI models, the team records and triages every issue found, with its recommended remediation, in its issue tracking system.
- 4
Release and retest
The company releases the assistant only after this security evaluation and tells users about its known limitations and potential failure modes. When it adds new data sources, it tests again.
Result: The plan covers threat modeling, red-teaming by people outside the build team, recorded issues and remediations, release with stated limitations, and retesting when data sources are added.
Try it
Pick the red team
A developer plans a red-teaming exercise for its new generative AI model. It proposes that the engineers who fine-tuned the model run the exercise, working from instructions that no one will write down. Using NIST AI 600-1, what do you tell the developer?
Hint: Look at MEASURE 1.3 and at the suggested actions on structured human feedback and on documentation.
AI 600-1 treats red-teaming as a structured human feedback exercise and suggests verifying that those conducting such exercises are not directly involved in system development tasks for the same model, so the fine-tuning engineers are the wrong testers. MEASURE 1.3 looks to internal experts who did not serve as front-line developers for the system and/or independent assessors. The profile also suggests documenting the instructions given to AI red-teamers. These are suggested actions in a profile of the AI RMF, which is intended for voluntary use.