It is tempting. You need a password quickly, the chat window is already open, so you type: “Generate a secure 16-character password with upper and lowercase letters, numbers and special characters.” A second later you get something like G7$kL9#mQ2&xP4!w. Looks great. Please don’t use it.
That exact password is the problem. In a test by the security company Irregular, Claude gave out this string 18 times in 50 independent sessions. A password that other people also get is not a secret.
Why an LLM can’t do random
A Large Language Model is built to predict the most likely next token. A good password needs every character picked uniformly at random, so no character is more likely than any other. These two goals are opposites. The output looks random to us humans, but the model follows the same probabilities every time, so the same patterns keep showing up.
What the research found
Irregular published their research in February 2026 under the fitting title “Vibe Password Generation: Predictable by Design”. They asked current models for passwords 50 times each and looked at the results:
- Claude Opus 4.6: only 30 unique passwords out of 50. The most common one appeared 18 times (36%). Estimated strength: about 27 bits instead of the expected 98 bits.
- GPT-5.2: almost every password started with a “v”, and about half continued with a “Q”. Their analysis put the whole password at roughly 20 bits instead of 120.
- Gemini 3 Flash: almost half of the passwords started with “K” or “k”, usually followed by “#”, “P” or “9”.
- Characters almost never repeated within a password. That sounds good, but a truly random password does repeat characters sometimes. Avoiding it is just another pattern an attacker can use.
- Claude avoided the
*character, most likely because it clashes with Markdown formatting.
To put the bits in perspective: every missing bit halves the work for an attacker. 27 bits instead of 98 is not “a bit weaker”, it is a difference of about 71 bits. That makes it roughly 2 000 000 000 000 000 000 000 (2×1021) times easier to guess.
The sneaky part: coding agents
Most of us would not ask a chatbot for our banking password anyway. The bigger risk is the passwords you never see. Coding agents such as Claude Code, Codex, Gemini CLI or Cursor write .env files, docker-compose.yml files and database seeds, and they sometimes just type a password in themselves instead of calling a proper tool like openssl rand.
Irregular also noticed that the wording matters: “generate a password” sometimes made the agent use a secure tool, while “suggest a password” more often led to a password written by the model itself.
So when an agent sets up your stack, check the credentials it created. I now add this line to my project instructions (CLAUDE.md, AGENTS.md or similar):
Never write passwords, secrets or API keys yourself. Always generate them with a
cryptographically secure tool, e.g. `openssl rand -base64 32` or Python's `secrets` module.
✅ What to use instead
For your personal accounts: use the generator in your password manager (Bitwarden, 1Password, KeePassXC, or the one built into your browser). It uses a proper random source and saves the password right away.
On the command line:
# OpenSSL (Linux, macOS, Git Bash on Windows)
openssl rand -base64 32
# Python
python3 -c "import secrets; print(secrets.token_urlsafe(32))"
Asking an LLM how to generate a secure password is perfectly fine. It will often give you exactly these commands. Just don’t let it be the random generator.
Sources
- Irregular – Vibe Password Generation: Predictable by Design
- Security Now! #1066 show notes (PDF) – where I first heard about it. Steve Gibson’s short version: “What you get will look wonderfully strong, but the LLM is quite likely to give the same password to others.”
