Credentials may persist in the agent's context window, appear in logs, be transmitted to downstream agents, or be exposed through tool invocations.
Agents are often given credentials or secrets to invoke tools and access services (API keys, database passwords, OAuth tokens). These credentials are passed to agents in context, stored in agent memory, logged in audit trails, or passed through delegation chains.
Secrets management systems (vaults, secret managers) track credentials issued to humans and applications, but often do not track credentials used by agents. An agent might be given an API key in its system prompt, store the key in memory, use it in tool invocations (logging the key in HTTP headers), and pass it to delegated agents.
Secret rotation and monitoring assume that secrets are used by a single, identifiable application. But when secrets are passed through agent chains, the number of places a secret is stored or logged multiplies. A secret used by one application is now exposed in agent memory, delegation context, tool invocation logs, agent output logs, and any downstream agents that received the secret.
A payment processing company gives agents database credentials to access customer payment information. The credentials are provided to the Payments-Agent in its system prompt: "You have access to the payments database using credentials: user='service_api', password='SuperSecret123'."
The agent processes payment requests by querying the database. The agent logs its database queries for audit purposes, including the credentials in the log entries. The agent then delegates to Risk-Agent to assess payment fraud risk, passing credentials in the delegation context.
Risk-Agent stores the credentials in its memory for future use and logs its analysis including the credentials. The secret is now stored in six different systems: Payments-Agent system prompt, audit logs, Payments-Agent memory, Risk-Agent context, Risk-Agent memory, and Risk-Agent logs.
An attacker with read access to any of these systems can extract the secret. The company's secret vault shows the password is still active. The vault monitoring does not flag that the password is exposed in agent systems, logs, and memories. Additionally, if any of these systems are compromised or searched during a regulatory investigation, the secret is exposed.
| Dimension | Score | Rationale |
|---|---|---|
| D - Detectability | 3 | Credential leakage in agent contexts is difficult to detect because credentials are treated as legitimate data. Requires log scanning for credential patterns. |
| A - Autonomy Sensitivity | 3 | Affects all agent types. Credentials are necessary for agents to function. |
| M - Multiplicative Potential | 5 | Every agent given credentials creates leakage risk. Every log, memory, and delegation context is an exposure point. |
| A - Attack Surface | 5 | Multiple systems store or transmit credentials: agent memory, logs, delegation chains, tool invocations. |
| G - Governance Gap | 4 | Secret management systems do not account for agent exposure. Secret rotation does not consider agent copies of secrets. |
| E - Enterprise Impact | 4 | Compromised credentials enable unauthorized database access, tool invocation, and lateral movement. |
| Composite DAMAGE Score | 3.8 | High. Requires dedicated controls and monitoring. Should not be accepted without mitigation. |
How severity changes across the agent architecture spectrum.
| Agent Type | Impact | How This Risk Manifests |
|---|---|---|
| Digital Assistant | Low | Credentials are passed by human at time of use, not stored. |
| Digital Apprentice | Medium | Agents store credentials in memory but with encryption and limited access. |
| Autonomous Agent | High | Agents store credentials for autonomous use. Multiple exposure points. |
| Delegating Agent | Critical | Delegating agent passes credentials to delegated agents. Delegation chain amplifies exposure. |
| Agent Crew / Pipeline | Critical | Crew agents share credentials. Compromise of any crew member exposes credentials to entire crew. |
| Agent Mesh / Swarm | Critical | Mesh agents pass credentials through dynamic peer-to-peer paths. Credentials exposed to unpredictable agent set. |
| Framework | Coverage | Citation | What It Addresses | What It Misses |
|---|---|---|---|---|
| NIST CSF 2.0 | Partial | PR.PT-2 (Secrets Management) | Secrets and credential management. | Agent credential exposure across systems. |
| NIST SP 800-53 | Partial | IA-4, IA-7 | Identity and credential management. | Agent credential lifecycle. |
| NIST SP 800-63B | Partial | Credential Management | Credential issuance and lifecycle. | Agent credential exposure in delegation chains. |
| CIS Controls | Partial | 4.4 (API Token Management) | Credential management. | Agent credential exposure. |
Credentials provide access to sensitive systems. If credentials leak through agent systems, an attacker can gain unauthorized access to those systems. Additionally, if credentials are exposed in logs or are stored unencrypted, the institution is not meeting encryption and access control requirements.
Regulators expect institutions to maintain control over all credentials and secrets. When agent architectures multiply the number of locations where secrets are stored and transmitted, the institution's credential management posture is fundamentally weakened.
Credential and Secret Leakage requires architectural controls that go beyond what existing frameworks provide. Our advisory engagements are purpose-built for banks, insurers, and financial institutions subject to prudential oversight.
Schedule a Briefing