MITRE ATLAS 2026.10 · AML.T0098 · Critical severity
AI Agent Tool Credential Harvesting
Adversaries abuse over-privileged AI agent tools, local shells, or MCP integrations to read API tokens, OAuth refresh keys, cloud metadata credentials, or SSH identities from the host environment. Because agents frequently inherit the parent process environment or IDE keychain, an indirect prompt injection or poisoned tool description can convert routine file or command tools into credential harvesters.
Technique dossier overview
- Category
- Agent and tool trust
- Severity
- Critical
- Attack surface
- Tool-Using Agents & MCP · LLM / Prompt Layer · Inference API & Hosting
- Framework maturity
- Demonstrated
- Platforms
- Agentic AI
- Tactics
- Credential Access
- Catalog entry modified
How the mechanism works
- An agent runtime spawns local tool subprocesses or MCP servers with broad access to process environment variables, ~/.aws, ~/.ssh, IDE credential files, or cloud instance metadata endpoints (169.254.169.254).
- Untrusted input from a repository issue, pull request, remote MCP tool manifest, or web page steers the model to invoke file-read, grep, or shell-inspection tools against secret-bearing paths.
- Harvested tokens are folded into tool parameters, commit comments, outbound HTTP calls, or rendered response links where an external receiver collects them.
Detection & telemetry signals
- Agent sandbox processes reading dotfile credential paths (.env, .npmrc, .git-credentials, .aws/credentials, ~/.ssh) outside the active workspace directory.
- High-entropy string patterns (API key prefixes, JWTs, PEM headers) appearing inside outbound MCP tool arguments or model-generated HTTP URLs.
- CI/CD coding-agent jobs triggered by pull_request_target or external forks accessing repository or OIDC secrets.
- Queries from agent containers toward cloud IMDS endpoints (169.254.169.254 or metadata.google.internal).
Architectural defensive countermeasures
- Inject credentials through a narrow host-side proxy or broker rather than exposing raw environment variables or keychain files inside the agent execution container.
- Block agent container egress to cloud instance metadata IPs and restrict filesystem mounts strictly to the ephemeral working repository.
- Separate read-only untrusted workspace analysis from credentialed CI jobs, prohibiting autonomous agents from running on unreviewed fork PRs with secret access.
- Scan outbound tool arguments and model responses with deterministic secret-entropy and prefix DLP filters prior to transmission.
- Issue short-lived, single-scope tokens (bound to one repository or API action) with mandatory human approval before accessing sensitive files.
Framework crosswalk (OWASP LLM Top 10 & NIST AI RMF)
- OWASP LLM Top 10 (2025)
- OWASP rationale
- Harvesting secrets via agent tools pairs Sensitive Information Disclosure (LLM02) with Excessive Agency (LLM06) when Prompt Injection (LLM01) directs tool calls against credentialed environments.
- NIST AI RMF functions
- NIST AI RMF guidance
- Define strict credential-isolation boundaries under GOVERN for agent runtimes, and enforce runtime secret brokering, IMDS blocks, and scoped ephemeral tokens under MANAGE.
Mapped defensive controls
- Encrypt Sensitive Information AML.M0012
Encrypt model weights, training datasets, RAG embeddings, and inference traffic in transit and at rest with tenant-scoped keys, recognizing providers still see plaintext during inference.
- Manage AI Agent Service Access AML.M0026
Constrain autonomous agent service identities with explicit capability ACLs, policy-as-code gates, and short-lived scoped tokens outside the LLM prompt context.
- Manage User-Delegated AI Agent Access AML.M0027
Bind every agent action strictly to the invoking user's verified OAuth scopes and resource ACLs so convenience integrations never grant organization-wide access.
- Enforce Access Controls for AI Agent Tools AML.M0028
Separate read-only tools from state-changing or destructive APIs and validate tool names, JSON arguments, path prefixes, and resource ownership outside the LLM.
- Segmentation of AI Agent Components AML.M0032
Isolate agent planners, tool executors, code sandboxes, vector databases, and untrusted web browsers in separate trust zones with minimal shared credentials and zero lateral egress.
Documented incidents & exercises (8)
- Exposed ClawdBot Control Interfaces Leads to Credential Access and Execution AML.CS0048 · Exercise · Jan 25, 2026 · Moderate
ATLAS case study: exposed ClawdBot control interfaces allowed credential access and command execution on agent hosts.
- Data Exfiltration via Remote Poisoned MCP Tool AML.CS0054 · Exercise · Apr 1, 2025 · Moderate
ATLAS case study: a remote MCP tool returned poisoned output that redirected agent behavior to exfiltrate data.
- Claude Code GitHub Action Secret Exposure AML.CS0067 · Exercise · Jun 5, 2026 · High
MITRE ATLAS case study documenting how untrusted external repository triggers or issue payloads in automated CI coding agent workflows could leak workflow environment secrets when overly broad credential scopes are exposed.
- n8n Workflow Expression Evaluation Remote Code Execution INC-2025-68613 · Incident · Dec 19, 2025 · Critical · Cloud & AI Infrastructure
CVE-2025-68613 disclosed a critical expression evaluation remote code execution vulnerability in the n8n workflow automation engine widely used to orchestrate LLM and MCP pipelines. Crafted workflow expressions bypassed sandbox isolation during node parameter evaluation,…
- Agentic Coding CLI Project-Level API Base URL Override Exfiltrating API Keys INC-2026-21852 · Incident · Jan 21, 2026 · High · Software Development & AI Tooling
CVE-2026-21852 (published January 21, 2026, disclosed by Check Point Research) revealed an API-key exfiltration vector in Claude Code caused by honoring project-level configuration overrides for outbound API endpoints (`ANTHROPIC_BASE_URL` or equivalent project settings). If a…
- LiteLLM PyPI Supply Chain Compromise (v1.82.7 / v1.82.8) Installing Credential Hooks INC-OBS-010 · Incident · Mar 24, 2026 · Critical · Cloud & AI Infrastructure
On March 24, 2026, threat actors compromised the PyPI release pipeline for LiteLLM, publishing trojanized package versions `1.82.7` and `1.82.8` of the widely adopted unified LLM proxy library. The malicious wheels dropped Python startup hooks (`.pth` / `sitecustomize.py`) that…
- LiteLLM Secondary PyPI & Docker Hub Compromise (v1.107.0) Deploying Cloud Stealers INC-OBS-011 · Incident · Oct 21, 2026 · Critical · Cloud & AI Infrastructure
On October 21, 2026, a second supply chain intrusion hit the LiteLLM ecosystem when backdoored version `1.107.0` was published to PyPI and Docker Hub via stolen CI/CD credentials and remained live for roughly two hours before takedown. The trojanized release again targeted…
- MCP Safety Audit & Automated MCPSafetyScanner Agentic Evaluation OBS.EX0057 · Exercise · Apr 2, 2025 · Industry-Leading LLMs & Live MCP Servers · Automated Multi-Agent Auditing
Radosevich and Halloran (2025) audited baseline MCP server integrations and demonstrated how frontier LLMs can be coerced via connected MCP tools into malicious code execution, remote access compromise, and credential theft on developer workstations. To automate pre-deployment…
Source citation records
- MITRE ATLAS: AI Agent Tool Credential Harvesting · MITRE ·
- LLM01:2025 Prompt Injection · OWASP GenAI Security Project ·
Common questions
- What is AI Agent Tool Credential Harvesting (AML.T0098)?
- Adversaries abuse over-privileged AI agent tools, local shells, or MCP integrations to read API tokens, OAuth refresh keys, cloud metadata credentials, or SSH identities from the host environment. Because agents frequently inherit the parent process environment or IDE keychain, an indirect prompt injection or poisoned tool description can convert routine file or command tools into credential harvesters.
- How do you mitigate AI Agent Tool Credential Harvesting?
- MITRE ATLAS maps 5 mitigations to AML.T0098: Encrypt Sensitive Information, Manage AI Agent Service Access, Manage User-Delegated AI Agent Access, Enforce Access Controls for AI Agent Tools, and Segmentation of AI Agent Components. Inject credentials through a narrow host-side proxy or broker rather than exposing raw environment variables or keychain files inside the agent execution container.