LLM-Generated Passwords Expose Security Risks with Predictability and Weakness
## Cybersecurity: Analysis of LLM-Generated Passwords
Cybersecurity: Analysis of LLM-Generated Passwords
Recent research indicates that passwords generated by large language models (LLMs), despite appearing complex, are highly predictable, frequently repeated, and considerably weaker than those created by traditional cryptographic password generators.
Secure password generators rely on cryptographically secure pseudorandom number generators (CSPRNGs) to produce characters from a uniform, unpredictable distribution. This ensures that each position in the password is difficult to guess. Conversely, LLMs predict the next token based on learned probabilities, favoring likely patterns over uniform randomness, which is not conducive to secure password generation.
Testing of modern models such as Claude, GPT, and Gemini revealed that passwords, even when visually diverse, exhibit narrow, biased character distributions. This predictability can be exploited by attackers. For example, an analysis of Claude Opus 4.6 demonstrated that in 50 password generation attempts, only 30 unique passwords were produced, with one 16-character string appearing 18 times. Furthermore, many passwords shared common prefixes, structures, and character sets.
Standard password strength checkers, like KeePass, often rate AI-generated passwords as strong, estimating high entropy. However, real entropy calculations that consider biased distributions show significantly lower entropy. For instance, LLM-generated passwords expected to have about 98 bits of entropy actually possess approximately 27 bits, making them vulnerable to brute-force attacks in short time frames.
This ensures that each position in the password is difficult to guess.
Additionally, searches for characteristic substrings of these passwords across various platforms revealed their presence in real-world codebases and configuration files, including sensitive locations like database credentials and API keys.
Recommendations for Users and Developers
Users are advised not to use chatbots for password generation. Instead, they should utilize dedicated password managers or system generators backed by CSPRNGs and consider adopting passwordless methods such as WebAuthn. Developers should treat any password or secret generated by LLMs as untrusted, rotate such credentials, and standardize the use of secure generators within their development pipelines.
AI developers and agent builders should disable or discourage direct password creation by LLMs, enforce the use of secure randomness tools, and document these practices to prevent the deployment of insecure LLM-generated secrets.
Based on reporting by GBHackers.
