Lesson 04 · Everyone

Why sharing a password with an agent is risky, and what to do instead

about 6 minutes

The quickest way to let an AI agent log in somewhere for you is to give it your password. It is also the option that gives away the most and is hardest to take back. This lesson explains what actually happens to a password once an agent has it, why that is different from an agent having permission to do one job, and the safer options, roughly from best to acceptable.

What a password really grants

A password is not permission to do a task. It is the ability to be you on that service. Whoever holds it gets the access it unlocks until the password changes, subject to the service’s other authentication and access controls.

Security people call this kind of secret a bearer credential: it works for whoever bears it, with no further proof needed. Most of the risk in this lesson follows from that one property.

When you give an agent your password, three things are lost at once:

  • Scope. You wanted “download this month’s statement”. You granted “everything my account can do”, including changing bank details or deleting records.
  • Attribution. The service sees you logging in. Its logs cannot tell whether a change was made by you or by the agent.
  • Easy revocation. The only way to take the access back is to change the password, which breaks every other place you use it.

Where the password goes

People often picture handing a password to an agent like handing a key to a contractor. In practice it is more like photocopying the key and leaving copies in several rooms.

It enters the model’s working memory. Anything pasted into a chat, or returned to the agent by a tool, becomes part of the text the model reads on every later step. It can be repeated back, summarised or included in output by mistake. OWASP’s 2025 list of risks for AI applications names sensitive information disclosure, explicitly including security credentials, as one of its top ten, and recommends limiting access to sensitive data on least-privilege lines [5].

It ends up in records. Chat histories, agent transcripts, debugging logs and support tickets all tend to keep what passed through them.

It can be talked out of the agent. If the agent also reads outside content, such as emails or web pages, a hidden instruction in that content can ask it to send the password somewhere. Researchers have shown this kind of indirect prompt injection working against real AI systems [4]. Simon Willison’s “lethal trifecta” describes the risky combination: private data (here, your password), untrusted content, and any way to send information out [6].

It may unlock other accounts. Password reuse is common. A study presented at NDSS 2014 found 42 to 51 per cent of users reusing the same password across multiple sites [2]. A Google-led study of stolen credentials, presented at ACM CCS 2017, found that 7 to 25 per cent of passwords exposed in breaches matched the victim’s Google account [3]. A password leaked through an agent is rarely a problem for just one site.

A worked example

Tom manages the office of a property management agency. Each month someone downloads statements from a supplier’s portal and files them. Tom asks an agent to do it.

Version 1: the password in the prompt. Tom types, “Log in to the supplier portal with and the password Harbour2019!, then download March statements.” The password now sits in the chat history. It is also the password Tom uses for two other work systems. The agent’s browser tool can also read the supplier’s “messages” page, where anyone can post a support message. Every leg of the lethal trifecta is present.

Version 2: a better arrangement. Tom checks whether the portal offers an “integration” or API access. It does, with read-only access to statements. He connects the agent through that, so the agent never sees a password and can only read statements. Where no such option exists, the agency creates a separate portal account for the agent with the lowest role the portal offers, stores its login in a password manager, and requires Tom to approve each login.

What to do instead

From strongest to weakest, these are the options worth trying before you ever paste a password.

1. Delegated access with limited scope. Many services let you connect another app through a “Connect” or “Sign in with” screen that asks what you want to allow. This is usually built on OAuth, an industry standard that lets an app get limited access to a service on your behalf without receiving your password [7]. You pick what it can do (for example, “read invoices”), and you can usually revoke it from the service’s settings without changing your password.

2. A separate identity for the agent. If the service has user roles, give the agent its own account with the smallest role that does the job. Google’s published approach to securing agents argues for distinct agent identities and permissions that are limited, can be inspected and can be revoked [9]. You get scope, attribution and clean revocation back.

3. A password manager that fills without revealing. Some password managers can fill a login for an agent without handing the password to it. The pass privacy policy describes its own design this way: an approved login is filled in your browser and the agent does not receive the stored password, but software that can read or control that page, including an agent with a browser tool, may still be able to read the filled login [10]. That caveat applies to any tool working this way: filling keeps the password out of the agent’s memory and logs, not out of the page.

4. Approval on each use. Whatever method you use, require a person to approve sensitive logins until you are confident in how the agent behaves.

5. Passkeys, where available, for your own accounts. A passkey is a login based on a cryptographic key pair rather than a typed secret. Under the W3C Web Authentication standard, a passkey is scoped to the website that created it, which is what makes it resistant to phishing [8]. Agents generally can’t “copy” a passkey the way they can copy a password, which is another reason to keep human accounts on passkeys and give agents their own, separate access.

Throughout, keep passwords unique. NIST’s current digital identity guidelines require services to allow password managers and autofill, partly because password managers help people choose stronger passwords [1].

Option Agent sees the password? Scope limited? Easy to revoke?
Paste password into chat Yes No No (change password)
Store password in agent’s config Yes No No
Fill-without-reveal password manager No (but may see the filled page) Only by the manager’s rules Yes, in the manager
Separate low-privilege account Only if shared directly Yes, by role Yes, disable the account
OAuth / integration token No Yes, by scope Yes, revoke the grant

Key takeaways

A password is a bearer credential that lets whoever holds it act fully as you, so giving one to an agent trades a narrow task for unlimited, unattributed and hard-to-revoke access. Once shared, a password tends to persist in the agent’s context, transcripts and logs, and an agent that also reads outside content can be manipulated into sending it on. Because passwords are widely reused, one leaked through an agent can expose other accounts too. Prefer delegated, scoped access such as OAuth integrations, or a separate low-privilege account for the agent, and if a login must be filled, use a method that keeps the stored password out of the agent while remembering that anything able to read the page can still read what was filled.

How primitive approaches this. Beyond filling logins, the pass privacy policy states that for each connected agent it keeps the permissions you approve, the purpose given, “approval and expiry times, and an audit receipt of each use”; that audit receipts “never contain the password or other secret”; and that “You can revoke an agent’s access at any time” [10].

Sources and further reading

  1. Temoshok, D., Fenton, J., Choong, Y.-Y., Lefkovitz, N., Regenscheid, A., Galluzzo, R., & Richer, J. (2025). Digital Identity Guidelines: Authentication and Authenticator Management (NIST SP 800-63B-4). NIST. https://pages.nist.gov/800-63-4/sp800-63b.html (publication page: https://csrc.nist.gov/pubs/sp/800/63/b/4/final)
  2. Das, A., Bonneau, J., Caesar, M., Borisov, N., & Wang, X. (2014). The Tangled Web of Password Reuse. Network and Distributed System Security Symposium (NDSS 2014). https://www.ndss-symposium.org/ndss2014/programme/tangled-web-password-reuse/
  3. Thomas, K., Li, F., Zand, A., Barrett, J., Ranieri, J., Invernizzi, L., et al. (2017). Data Breaches, Phishing, or Malware? Understanding the Risks of Stolen Credentials. Proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security (CCS ’17), 1421–1434. https://doi.org/10.1145/3133956.3134067 (summary: https://research.google/pubs/data-breaches-phishing-or-malware-understanding-the-risks-of-stolen-credentials/)
  4. Greshake, K., Abdelnabi, S., Mishra, S., Endres, C., Holz, T., & Fritz, M. (2023). Not what you’ve signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection. AISec ’23, 79–90. https://doi.org/10.1145/3605764.3623985 (preprint: https://arxiv.org/abs/2302.12173)
  5. OWASP Gen AI Security Project. (2025). LLM02:2025 Sensitive Information Disclosure. https://genai.owasp.org/llmrisk/llm022025-sensitive-information-disclosure/
  6. Willison, S. (2025, 16 June). The lethal trifecta for AI agents: private data, untrusted content, and external communication. https://simonwillison.net/2025/Jun/16/the-lethal-trifecta/
  7. Hardt, D. (Ed.). (2012). The OAuth 2.0 Authorization Framework (RFC 6749). IETF. https://www.rfc-editor.org/rfc/rfc6749
  8. W3C. (n.d.). Web Authentication: An API for accessing Public Key Credentials, Level 3. https://www.w3.org/TR/webauthn-3/
  9. Díaz, S., Kern, C., & Olive, K. (2025). Google’s Approach for Secure AI Agents: An Introduction. Google. https://research.google/pubs/an-introduction-to-googles-approach-for-secure-ai-agents/
  10. Primitive AI (PRIMITIVE AI LABS PTY LIMITED). (2026, 25 October). Primitive Pass Privacy Policy, section 03 (“AI agent access”). https://pass.primitiveai.com.au/privacy.html (primitive’s own statements; effective 25 October 2026)