Risk · R-065 · Model & Application Security
Exposed AI credentials and secrets
API keys, tokens and connection secrets sit in prompts, agent configuration, notebooks or logs, where the model or an attacker can read and reuse them.
- Severity
- High
- Audience
- Heads-of · Practitioner
- Frameworks
- AML.T0055 · AML.T0098 · Article 32
- Responsible AI domain
- Lifecycle stage
- Reviewed
- 2026-11-10
What it is
AI systems hold many credentials: keys for model providers, tokens for the tools an agent calls, passwords for data sources. They accumulate in places that conventional secret management overlooks, including prompt templates, agent configuration files, experiment notebooks, and conversation logs that captured them in passing. A credential placed in a model's context should be assumed readable by anyone who can converse with the model.
How it happens
- A key is written into a prompt or tool definition for convenience.
- A notebook containing keys is shared or committed to a repository.
- Credentials passed in a conversation are stored in logs or memory.
- One long-lived key is shared by a whole team or by every agent.
Why it matters
A model provider key allows use at the organisation's expense and may expose stored conversations and fine-tuned models. A tool token gives whatever access the tool has. Because these keys are often long-lived and broadly scoped, one exposure reaches far.
Warning signs
- Secrets found by scanning prompts, configuration and notebooks.
- Keys with no owner, no expiry and no record of use.
- Provider usage from unfamiliar locations or at unusual times.
- The same key present in several systems.
Who owns it
Security owns the secret management standard and the scanning. Each system owner is accountable for the credentials the system holds.
In practice
A data scientist tests an idea in a notebook, pastes in the team's provider key, and later publishes the notebook to a public repository as part of a write-up. Within hours the key is being used by others, and the provider's invoice is the first sign. The same pattern generalises to any credential kept where the work is done instead of where secrets are managed.
Mitigating controls
Primary controls
- Secrets management for AI Preventive
- Holds credentials in a vault and injects them at run time so they never sit in prompts or configuration. Credentials used by AI systems are held in a vault, supplied at run time, kept out of prompts, configuration and notebooks, scoped narrowly and rotated.
Supporting controls
- Least-privilege agent identity and permissions Preventive
- Short-lived, narrowly scoped credentials limit what an exposed secret can do. Each agent has its own identity, with permissions scoped to its task and to the user it is acting for, short-lived and reviewed like any other entitlement.
- Secure AI development pipeline Preventive
- Scanning in the pipeline finds secrets committed to notebooks and code. The pipelines and tooling that train, evaluate and deploy models are subject to the security controls of production software delivery, including review, scanning and segregation of environments.
Framework and clause references
| Framework | Clause | Title |
|---|---|---|
| MITRE ATLAS | AML.T0055 | Unsecured Credentials Unsecured credentials. |
| MITRE ATLAS | AML.T0098 | AI Agent Tool Credential Harvesting Harvesting of credentials held by agent tools. |
| UK General Data Protection Regulation | Article 32 | Security of processing Security of processing where the credentials reach personal data. |
Sources
- MITRE ATLAS MITRE · framework
Related terms
How to cite
Axiom Verity (2026). Exposed AI credentials and secrets. Reference Library, R-065. https://axiom-verity.com/risks/exposed-ai-credentials-and-secrets. Reviewed 2026-11-10.
Found an error or a better source? Report a correction.