A Perl Library Flaw Makes Passwords Easier to Crack

TL;DR: The Crypt-SaltedHash library for Perl used a weak method to generate random "salts," a key part of password security. This makes the salts predictable, allowing attackers to more easily crack hashed passwords on systems using this library.
Key facts
- Category
- Cybersecurity
- Impact
- High
- Published
- Source
- Ubuntu Security Notices
Full summary
A flaw in the popular Crypt-SaltedHash Perl library makes password hashes predictable, putting user accounts at a higher risk of compromise.
A significant security vulnerability has been discovered in Crypt-SaltedHash, a Perl library used for hashing passwords. The library was found to be using a cryptographically weak pseudo-random number generator to create its "salts." In password security, a salt is a unique, random piece of data added to each password before it is hashed and stored. This process ensures that even identical passwords result in different hashes, making it much harder for attackers to use pre-computed tables of common password hashes, known as rainbow tables, to crack them. However, the use of a weak generator means the salts created by this library are not truly random. Instead, they can be predicted by an attacker, which effectively negates the protection that salting is meant to provide.
This flaw severely weakens the security of any system relying on Crypt-SaltedHash for password protection. When an attacker can predict the salt, they can specifically tailor their attacks, dramatically reducing the time and resources needed to crack passwords. This puts user accounts and sensitive data at a much higher risk of being compromised. The vulnerability affects developers, security teams, and IT administrators who manage applications or systems built with Perl that use this specific library for authentication or data protection. It serves as a critical reminder that the strength of a cryptographic system is only as strong as its weakest link, and using a proper source of randomness is fundamental for any security-related function.
This type of vulnerability highlights a common but dangerous mistake in software development: implementing cryptographic functions without using components designed for security. Standard random number generators are often sufficient for tasks like simulations or games, but they lack the unpredictability required for creating cryptographic keys, salts, or initialization vectors. Security-sensitive applications must always use a cryptographically secure pseudo-random number generator (CSPRNG), which is specifically designed to be unpredictable. Developers should always prioritize the use of well-vetted, standard cryptographic libraries and ensure all components, especially sources of randomness, meet modern security standards to avoid introducing such critical flaws into their systems.
Why it matters
This flaw makes passwords stored using this library significantly easier for attackers to crack, undermining a fundamental security protection.
Business impact
Systems relying on this library for user authentication are at a higher risk of account takeovers. A successful attack could lead to a data breach, reputational damage, and loss of customer trust.
⚡ Action needed
Update the Crypt-SaltedHash library to the latest patched version.
Action checklist
- 1Identify all systems and applications using the Perl Crypt-SaltedHash library.
- 2Update the library to the latest patched version immediately.
- 3Review authentication logs for any signs of suspicious activity or brute-force attempts.
- 4Consider forcing a password reset for all users if your system was exposed.
Tags
Related on Notifire
Related stories
Primary source: Ubuntu Security Notices