Join our Newsletter — 33% off our NHI Course
Home› Glossary› Threats, Abuse & Incident Response› Task-Context Poisoning
Threats, Abuse & Incident Response

Task-Context Poisoning

← Back to Glossary
By NHI Mgmt Group Updated October 22, 2026 Domain: Threats, Abuse & Incident Response

Task-context poisoning is the contamination of an AI agent’s working context with attacker-controlled instructions or data that can distort its next decision. Unlike model training compromise, the attack operates during live execution and can influence specific actions without changing the underlying model.

How Task-Context Poisoning Works

Task-context poisoning attacks the live reasoning surface of an AI agent, not its model weights. The attacker’s goal is to seed the current working context with misleading instructions, false facts, or hidden constraints so the next action is bent toward the attacker’s intent.

This is dangerous because the agent may treat poisoned context as if it were operationally trusted input. The resulting failure can be narrow and highly targeted, affecting one decision, one tool call, or one workflow step without leaving the broader model obviously compromised.

Where the Poisoning Enters

The attack surface is the agent’s active context window and any adjacent memory, scratchpad, retrieval, or task state that feeds into it. If untrusted content can be inserted, replayed, or retained without clear separation from authoritative instructions, it can reshape the agent’s next move.

Common entry points include user-supplied text, retrieved documents, shared workspaces, summaries, tickets, logs, or prior session artifacts that the agent reuses. The issue is not just that the content exists, but that the agent cannot reliably tell which parts are instruction, which parts are data, and which parts were attacker-shaped.

Why It Changes Agent Behaviour

Task-context poisoning works because many agents optimise for immediate task completion and instruction-following. When a poisoned fragment lands in the active context, it can redirect planning, override user intent, or distort tool selection even if the base model remains unchanged.

That makes the threat especially effective against multi-step workflows, where an early poisoned hint can cascade into later actions. MITRE’s MITRE ATLAS adversarial AI threat matrix and the OWASP Agentic AI Top 10 both frame context manipulation and related agent abuse patterns as first-class security concerns.

How Defenders Reduce Exposure

Defence starts with context hygiene, not model tuning. High-value tasks need strong isolation between user content, retrieved content, system instructions, and persistent memory, plus explicit controls on what can be written back into context and how long it survives.

Practitioners should also be deliberate about trust boundaries for retrieval and tool output. The AI Agent Memory Security Guide is useful here because it focuses on isolation, write controls, retention, and leakage risks that make context poisoning easier to weaponise.

Risk and Threat Considerations

Task-context poisoning can turn a single malicious prompt fragment, retrieved record, or memory entry into a live compromise of decision quality. The main risk is not model corruption, but manipulated execution, where the agent follows attacker-shaped context and performs the wrong action with apparent confidence.

Failure mechanism: The attacker introduces or preserves misleading context that the agent treats as authoritative, then the poisoned instruction steers planning, retrieval, or tool use at execution time.

Impact: The agent may leak data, take unsafe actions, approve the wrong workflow, or propagate the poisoned instruction into later steps, creating a compounding compromise path.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Agentic AI Top 10 and MITRE ATT&CK address the attack and risk surface, while NIST AI RMF and NIST SP 800-53 Rev 5 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Agentic AI Top 10ASI06 — Memory & Context PoisoningTask-context poisoning is a live context manipulation risk for agentic systems.
Recommendation — Isolate trusted instructions from mutable context and limit how untrusted content can influence agent actions.
MITRE ATT&CKT1095 — Non-Application Layer ProtocolAdversaries use protocol and content manipulation paths to influence downstream execution decisions.
Recommendation — Hunt for anomalous content insertion and execution steering across agent workflows.
NIST AI RMFGV.3 — Manage AI RisksThis term is an AI operational risk that requires governance over runtime misuse and manipulation.
Recommendation — Define runtime controls that bound how agent context is sourced, retained, and trusted.
NIST SP 800-53 Rev 5SI-10 — Information Input ValidationPoisoning succeeds when untrusted input is allowed to drive trusted execution paths.
AC-6 — Least PrivilegeLimiting what an agent can do reduces the blast radius of poisoned context.
Recommendation — Validate and constrain inputs before they can alter agent decisions or actions. Restrict agent permissions so compromised context cannot trigger broad unauthorized actions.

Practitioner Guidance

What to watch for: Treat any agent that mixes untrusted input, memory, and tool output as a context-integrity problem, not just an AI quality problem. The practical question is whether the agent can prove which inputs are trusted enough to influence action and which must remain inert.

Practitioner takeaway: The strongest control is to narrow what the agent is allowed to remember, reuse, and act on, so attacker-controlled text cannot quietly become decision-making context.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on October 22, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org