Domain III /

Audits, red teaming and security testing

By the endClassify attacks on AI systems, plan red-teaming before release with independent testers, and state what the AI Act requires of high-risk systems and of general-purpose AI models with systemic risk.

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. 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. 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. 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. 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. 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. 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. 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. 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.

02 / Questions

Answer 10 questions

Check 1 of 10scenario · easy

A fraud-detection team finds that an outsider inserted mislabeled transactions into the data used to train its machine learning model, so that the model now misclassifies the outsider's transactions. In the terms of NIST AI 100-2e2025, the National Institute of Standards and Technology (NIST) taxonomy of adversarial machine learning, what kind of attack is this?

Check 2 of 10scenario · medium

A company's generative artificial intelligence (AI) assistant summarizes web pages for its users. An attacker hides instructions in a web page that make the assistant send the user's private data to the attacker when it processes the page. Under NIST AI 100-2e2025, the National Institute of Standards and Technology (NIST) taxonomy of adversarial machine learning, which attack is this?

Check 3 of 10scenario · medium

Testers show that users can deliberately get around the technical restrictions, such as the system prompt and safety alignment, that a developer placed on its generative artificial intelligence (AI) chatbot to stop it producing outputs that could harm others. NIST AI 100-2e2025, the National Institute of Standards and Technology (NIST) taxonomy, classifies attacks by the attacker's objective. Which objective does this attack serve?

Check 4 of 10scenario · medium

A developer of a generative artificial intelligence (AI) model is choosing who will red-team the model before release. Which choice best follows the suggested actions in NIST AI 600-1, the National Institute of Standards and Technology (NIST) Generative AI Profile?

Check 5 of 10scenario · hard

In November 2026, a U.S. developer of a generative artificial intelligence (AI) model asks whether Executive Order (EO) 14110 on Safe, Secure, and Trustworthy Development and Use of Artificial Intelligence requires it to red-team the model before release. What is the accurate answer?

Check 6 of 10scenario · easy

A company building a generative artificial intelligence (AI) model that answers medical questions cannot recruit enough clinicians to red-team it. It has members of the public write test prompts and asks a few clinicians to modify and verify those prompts. Which type of AI red-teaming in NIST AI 600-1, the National Institute of Standards and Technology (NIST) Generative AI Profile, is this?

Check 7 of 10scenario · hard

A provider will first place a new credit-scoring system, high-risk under Annex III of the European Union (EU) Artificial Intelligence (AI) Act, on the market in March 2028. Under the Act, Regulation (EU) 2024/1689 as amended by Regulation (EU) 2026/1744, what does Article 15(5) require on AI-specific attacks?

Check 8 of 10scenario · medium

A provider placed a general-purpose artificial intelligence (AI) model with systemic risk on the European Union (EU) market in September 2025. Under Article 55(1)(a) of the AI Act, Regulation (EU) 2024/1689, what must the provider do?

Check 9 of 10scenario · hard

After a pre-deployment red-teaming exercise found no successful jailbreak of a new large language model (LLM), the product lead says the model is now proven resistant to adversarial prompting. Which response best reflects NIST AI 100-2e2025, the National Institute of Standards and Technology (NIST) report on adversarial machine learning?

Check 10 of 10scenario · medium

A team tested its artificial intelligence (AI) model for vulnerabilities under its code testing policy before the first release. It has since retrained the model with an added data source. What does Special Publication (SP) 800-218A of the National Institute of Standards and Technology (NIST) recommend?

03 / Recall

Answer without looking back

What are the four attacker objectives in NIST AI 100-2e2025, who does NIST AI 600-1 suggest should red-team a generative AI model, and what does Article 15(5) of the AI Act require, from when?

Primary reading

Read the relevant section

NIST AI 100-2e2025, Adversarial Machine Learning: A Taxonomy and Terminology of Attacks and Mitigations · Abstract ↗
Sources used in this lesson
  1. NIST AI 100-2e2025, Adversarial Machine Learning: A Taxonomy and Terminology of Attacks and Mitigations, Section 3.3, printed p. 45 ↗National Institute of Standards and Technology
  2. Guidelines for secure AI system development, Section 3, Release AI responsibly, p. 15 ↗UK National Cyber Security Centre and US Cybersecurity and Infrastructure Security Agency, with international partners
  3. NIST AI 600-1, Artificial Intelligence Risk Management Framework: Generative Artificial Intelligence Profile, Appendix A.1.5, printed p. 50 ↗National Institute of Standards and Technology
  4. NIST AI 800-1 (Second Public Draft), Managing Misuse Risk for Dual-Use Foundation Models, Practice 5.1, recommendation 1, printed p. 16 ↗National Institute of Standards and Technology, U.S. AI Safety Institute
  5. How are AI developers managing risks? Insights from responses to the reporting framework of the Hiroshima AI Process Code of Conduct (OECD Artificial Intelligence Papers No. 45), Section I, printed p. 13 ↗OECD Publishing
  6. NIST SP 800-218A, Secure Software Development Practices for Generative AI and Dual-Use Foundation Models: An SSDF Community Profile, PW.8, printed p. 17 ↗National Institute of Standards and Technology
  7. Executive Order 14148 of January 20, 2025, Initial Rescissions of Harmful Executive Orders and Actions (90 FR 8237), Title and sec. 2, 90 FR 8237 ↗Executive Office of the President (Federal Register, Office of the Federal Register)
  8. Regulation (EU) 2024/1689 of the European Parliament and of the Council of 13 June 2024 laying down harmonised rules on artificial intelligence (Artificial Intelligence Act), Recital 114 ↗Publications Office of the European Union (EUR-Lex)
  9. Regulation (EU) 2026/1744 of the European Parliament and of the Council of 8 July 2026 amending Regulations (EU) 2024/1689, (EU) 2018/1139 and (EU) 2023/1230 as regards the simplification of the implementation of harmonised rules on artificial intelligence (Digital Omnibus on AI), Article 1(40)(b), replacing Article 113, third paragraph, point (c), of Regulation (EU) 2024/1689 ↗Publications Office of the European Union (EUR-Lex)
Glossary terms used in this lesson
AI system
Under the AI Act, a machine-based system designed to operate with varying levels of autonomy, which may exhibit adaptiveness after deployment and which, for explicit or implicit objectives, infers from its input how to generate outputs such as predictions, content, recommendations or decisions that can influence physical or virtual environments.
generative AI
AI that produces new content such as text, images, video or music. The OECD added content to the outputs in its definition in 2023 so that generative AI is covered, and the Commission's guidelines treat content as a category of output of its own.
large language model
In the EDPB expert report, a general-purpose model trained on extensive datasets and used for tasks from text generation and summarization to coding assistance and sentiment analysis. Some are multimodal and can process image, audio or video.
machine learning
U.S. law defines machine learning as an application of artificial intelligence characterized by giving systems the ability to learn and improve automatically from data or experience, without being explicitly programmed. The AI Act's Recital 12 names it as one family of inference techniques.
risk
Under the AI Act, the combination of the probability of an occurrence of harm and the severity of that harm. NIST's AI RMF similarly defines risk as the composite measure of an event's probability and the magnitude of its consequences.
harmonized standard
Under Article 40(1) of the AI Act, high-risk AI systems that conform with harmonized standards whose references have been published in the Official Journal are presumed to meet the Chapter III, Section 2 requirements those standards cover.
Regulation (EU) 2026/1744
The Digital Omnibus on AI, which amends the AI Act. It replaced the text of Article 4 on AI literacy, inserted a separate Article 4a on bias detection and correction, and moved the application dates for high-risk rules to 2 December 2027 for Annex III systems and 2 August 2028 for systems that are high-risk under Article 6(1) and Annex I.
systemic risk
A general-purpose AI model has systemic risk if it has high-impact capabilities or a Commission decision finds equivalent capabilities or impact. Training compute above 10 to the power of 25 FLOP creates a presumption, and the provider must notify the Commission within two weeks.
developer
Under Colorado's SB26-189, a person doing business in Colorado that develops or commercially supplies covered automated decision-making technology, develops a component for it, or intentionally and substantially modifies a technology so that it becomes covered, subject to the law's exclusions. Developers must give deployers documentation of intended and known harmful uses, training data categories and known limitations.
AI 600-1
NIST AI 600-1, the Generative AI Profile dated July 2024: a cross-sectoral profile of and companion to the AI RMF that defines twelve risks novel to or exacerbated by generative AI and gives suggested actions.
AI Risk Management Framework
NIST AI 100-1, version 1.0, dated January 2023. It is voluntary, rights-preserving, non-sector-specific and use-case agnostic, and helps organizations that design, develop, deploy or use AI manage risk and promote trustworthy AI.
Generative AI Profile
NIST AI 600-1, a companion resource to the AI Risk Management Framework for generative AI, intended for voluntary use. It lists suggested actions that an organization or AI actor can take to manage generative AI risks.
MEASURE
The AI RMF function that uses quantitative, qualitative or mixed methods and tools to analyze, assess, benchmark and monitor AI risk and related impacts, including test, evaluation, verification and validation.
OECDOrganisation for Economic Co-operation and Development
The Organisation for Economic Co-operation and Development, whose Council adopted the Recommendation on AI on 22 May 2019 and revised it in 2023 and 2024. OECD recommendations are not legally binding.
adversarial testing
A form of testing that NIST SP 800-218A lists for AI models next to unit, integration and penetration testing, red teaming and use case testing. Providers of general-purpose AI models with systemic risk must conduct and document it under the AI Act.
data poisoning
An attack on the training stage in which the adversary controls a subset of the training data by inserting or modifying training samples. NIST AI 100-2e2025 classes it among attacks on a model's availability or integrity.
evasion
An attack against a deployed model in which the adversary modifies testing samples to create adversarial examples that alter the model's predictions, as NIST AI 100-2e2025 describes it.
model poisoning
An attack on the training stage in which the adversary controls the model and its parameters, in contrast to data poisoning, where the adversary controls only a subset of the training data.
prompt injection
A generative AI attack. A direct prompt injection comes from the user's own in-context instructions; an indirect one is executed through control of external resources that the model consumes at inference time.
red teaming
In NIST's wording, a structured testing effort, often adopting adversarial methods, to find flaws and vulnerabilities in an AI system, including unforeseen or undesirable behaviors and risks associated with misuse of the system.
training data
Under the AI Act, data used for training an AI system through fitting its learnable parameters. High-risk systems that train AI models must be developed on training data sets that meet the quality criteria of Article 10.
fine-tuning
Training a pre-trained model further. Supervised fine-tuning uses a labeled dataset for a specific task and adjusts some or all parameters; parameter-efficient fine-tuning trains only some parameters and leaves most of the model unchanged.
retrieval-augmented generation
A technique that connects a model to an external knowledge base and retrieves relevant documents at runtime, without modifying the base model, to bring in domain-specific or updated information.