# Adversarial attack

> Canonical: https://skillalmanac.com/glossary/adversarial-attack | Last verified: 2026-11-25 | Index status: index-eligible

An adversarial attack is a deliberate attempt to make a machine learning system behave wrongly, for example by slightly altering an input so a model misclassifies it, or by corrupting its training data.

Also called: adversarial attacks, adversarial examples, adversarial attacks machine learning, adversarial AI, adversarial machine learning.

## In plain language

An adversarial attack tricks an AI system on purpose. A well-known example, used by IBM, is putting a few stickers on a stop sign so an image model reads it as a speed limit sign. Attacks can also target the data a model learns from, try to pull private information out of a model, or copy a model by querying it. NIST's taxonomy describes mitigations alongside the attacks. The practical lesson is to avoid trusting a model's output blindly in safety-critical or security-critical settings, and to cap what an automated system may do with that output.

## Technical definition

NIST AI 100-2 E2025 provides a taxonomy of adversarial machine learning (AML) concepts organised by ML method, attack lifecycle stage and attacker goals, objectives, capabilities and knowledge; its keywords name data poisoning, evasion and privacy breach. IBM describes evasion attacks, which alter inputs to cause misclassification (adversarial examples), data poisoning, privacy attacks such as membership inference and model inversion, and model extraction. Attacks are also split by access: in black-box attacks the attacker sees only outputs, while in white-box attacks the attacker can inspect internals such as weights, which IBM notes is possible with open-source models.

## How it shows up when you use agents

For people running coding agents, adversarial attacks mostly arrive as the LLM-era cases: [prompt injection](/glossary/prompt-injection), [jailbreaks](/glossary/jailbreak) and poisoned data or models. Classic adversarial examples, such as altered images that fool a classifier, matter when your project uses a vision or classification model.

What breaks when this is misunderstood: teams test only with friendly inputs and conclude a model is robust. NIST's taxonomy separates attacker goals and knowledge, and a defence that works against an attacker who sees only outputs may not hold against one who has the weights.

Next action: write down who might attack the system and what they can see and change, then test with hostile inputs as part of [red-teaming](/glossary/red-teaming). Treat model output as untrusted when it feeds a command, a query or a decision, and cap what the agent can do. The [AI safety](/glossary/ai-safety) page covers the wider picture.

## Common confusions

- **Adversarial attack versus jailbreak.** A jailbreak targets a chatbot's behavioural rules through text. An adversarial attack is the wider category, including altered inputs, poisoned training data and privacy attacks.
- **Adversarial attack versus ordinary error.** A model can fail on its own. An adversarial attack is deliberate and often exploits that failure on purpose.
- **Adversarial attack versus data poisoning.** In IBM's breakdown, data poisoning is one type of adversarial machine learning attack: it targets training data, while evasion targets the input to a finished model. See [data poisoning](/glossary/data-poisoning).
- **Myth.** Only attackers do adversarial machine learning. IBM notes the field also includes researchers who expose weaknesses so models can be made more robust.

## Worked examples in this catalogue

### [threat-model-stride-worksheet](https://skillalmanac.com/skills/skill-almanac/threat-model-stride-worksheet)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A STRIDE worksheet built from your assets, actors, trust boundaries and data flows, with each flow checked against the STRIDE categories.

Why it exercises the concept: Adversarial thinking starts with who the attacker is and what they can touch. The worksheet forces that question for a feature, including one that uses a model. It is general threat modelling, not an adversarial-example test.

### [code-risky-pattern-scan](https://skillalmanac.com/skills/skill-almanac/code-risky-pattern-scan)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A read-only scan of a source folder for nine risky code patterns, such as eval or exec, shell=True, string-built SQL and hard-coded keys.

Why it exercises the concept: Classic code flaws are the other half of attacking an AI application. The catalogue has no skill that generates adversarial examples; this one checks the code around a model.

### [Autonomous AI Agents: Risks and Guardrails](https://skillalmanac.com/learn/autonomous-ai-agents-risks-and-guardrails)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: What goes wrong when an agent acts unattended, with guardrails such as an allowlist of writable paths, an iteration cap and keeping ask rules for destructive commands.

Why it exercises the concept: Agents act on model output, so a manipulated output can have effects. Limits on what the agent may do cap the damage from any attack.

## Related terms

- [Data poisoning](https://skillalmanac.com/glossary/data-poisoning.md)
- [Prompt injection](https://skillalmanac.com/glossary/prompt-injection.md)
- [Jailbreak](https://skillalmanac.com/glossary/jailbreak.md)
- [Red teaming](https://skillalmanac.com/glossary/red-teaming.md)
- [AI safety](https://skillalmanac.com/glossary/ai-safety.md)
- [Machine learning (ML)](https://skillalmanac.com/glossary/machine-learning.md)

## Sources

- [Adversarial Machine Learning: A Taxonomy and Terminology of Attacks and Mitigations (NIST AI 100-2 E2025)](https://csrc.nist.gov/pubs/ai/100/2/e2025/final), NIST (accessed 2026-11-24)
- [What is adversarial machine learning?](https://www.ibm.com/think/topics/adversarial-machine-learning), IBM (accessed 2026-11-24)
- [OWASP Top 10 for LLM Applications 2025](https://genai.owasp.org/llm-top-10/), OWASP Gen AI Security Project (accessed 2026-11-24)

Definitions are written by Skill Almanac from the sources above and checked against them on 2026-11-25. [Glossary index](https://skillalmanac.com/glossary.md).
