GHSA-r75m-26cq-mjxc CVE-2024-29886
Serverpod improved security for stored password hashes
- Severity
- 5.3 / 10
- Medium · CVSS 3.1
- Exploit chance (EPSS)
- 0.26%
- Chance of exploitation in the next 30 days. Higher than 18.01% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-916 Use of Password Hash With Insufficient Computational Effort
- Fix
1.2.6- Upgrade serverpod_auth_server to this version or later
Description
Description
Improved security for stored password hashes
Serverpod now uses the OWASP, source, recommended Argon2Id password hash algorithm to store password hashes for the email authentication module.
Starting from Serverpod 1.2.6 all users that either creates an account or authenticates with the server will have their password stored using the safer algorithm. No changes are required from the developer to start storing passwords using the safer algorithm.
Why did we change how passwords are stored?
An issue was identified with the old password hash algorithm that made it susceptible to rainbow attacks if the database was compromised.
It is strongly recommended to migrate your existing password hashes.
Migrate existing password hashes
The email authentication module provides a helper method to migrate all the existing legacy password hashes in the database. Simply call Emails.migrateLegacyPasswordHashes(...) with a session instance as an argument to migrate the password hashes.
The method is implemented as an idempotent operation and will yield the same result regardless of how many times it is called.
We recommend either implementing a web server route that can be called remotely or by calling the method as part of starting the server.
Following is example code for implementing a web server route.
<details><summary><h4>Web server route code</h4></summary>
import 'dart:io';
import 'package:serverpod/serverpod.dart';
import 'package:serverpod_auth_server/module.dart' as auth;
class MigratePasswordsRoute extends Route {
@override
Future<bool> handleCall(Session session, HttpRequest request) async {
request.response.writeln(
'Migrating legacy passwords, check the server logs for progress updates.',
);
_migratePasswords(session);
return true;
}
}
Future<void> _migratePasswords(Session session) async {
session.log('Starting to migrate passwords.');
var totalMigratedPasswords = 0;
while (true) {
try {
var entriesMigrated = await auth.Emails.migrateLegacyPasswordHashes(
session,
// Process 100 database entries at a time
batchSize: 100,
// Stop after 500 entries have been migrated
maxMigratedEntries: 500,
);
totalMigratedPasswords += entriesMigrated;
session.log(
'Migrated $entriesMigrated password entries, total $totalMigratedPasswords.',
);
if (entriesMigrated == 0) break;
// Delay to avoid overloading the database
await Future.delayed(Duration(seconds: 1));
} catch (e) {
session.log('Error migrating passwords: $e');
}
}
session.log('Finished migrating passwords.');
}
</details>
How we migrate existing password hashes
Since password hashes can’t be recalculated without knowledge of the plain text password, the method in the email authentication module applies the new algorithm to the already stored password hashes.
When the affected users later authenticate, their password hash will be calculated using both algorithms in tandem. If the authentication is accepted, the stored password hash will be updated to only use the new algorithm so that further authentication only needs to run the new algorithm.
Impact
All versions of serverpod_auth_server pre 1.2.6
Patches
Upgrading to version 1.2.6 resolves this issue.
Affected versions
Pub
| Package | Vulnerable | Fixed in |
|---|---|---|
| serverpod_auth_server | < 1.2.6 |
1.2.6 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
serverpod_auth_server Pub → 1.2.6
- dart
dart pub add serverpod_auth_server:^1.2.6
Severity breakdown
CVSS 3.1 5.3
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- Low
- Integrity
- None
- Availability
- None
Weakness
CWE-916: Use of Password Hash With Insufficient Computational Effort
The product generates a hash for a password, but it uses a scheme that does not provide a sufficient level of computational effort that would make password cracking attacks infeasible or expensive.
How to prevent it
- Architecture and Design: Use an adaptive hash function that can be configured to change the amount of computational effort needed to compute the hash, such as the number of iterations ("stretching") or the amount of memory required. Some hash functions perform salting automatically. These functions can significantly increase the overhead for a brute force attack compared to intentionally-fast functions such as MD5. For example, rainbow table attacks can become infeasible due to the high computing overhead. Finally, since computing power gets faster and cheaper over time, the technique can be reconfigured to increase the workload without forcing an entire replacement of the algorithm in use. Some hash functions that have one or more of these desired properties include bcrypt [REF-291], scrypt [REF-292], and PBKDF2 [REF-293]. While there is active debate about which of these is the most effective, they are all stronger than using salts with hash functions with very little computing overhead. Note that using these functions can have an impact on performance, so they require special consideration to avoid denial-of-service attacks. However, their configurability provides finer control over how much CPU and memory is used, so it could be adjusted to suit the environment's needs.
- Implementation, Architecture and Design: When using industry-approved techniques, use them correctly. Don't cut corners by skipping resource-intensive steps (CWE-325). These steps are often essential for preventing common attacks.
References
Advisories
Packages
Other links
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| EEF-CVE-2026-65629 Weak PBKDF2 parameters for password-encrypted private-key export in jose | Not rated yet | Same weakness, CWE-916 |
| GHSA-r6w9-259g-gwrv Vikunja: Plaintext storage of password-reset/email-confirm tokens in database enables account takeover on DB read access | High | Same weakness, CWE-916 |
| GHSA-q6mq-ch85-c8mm Payload: Password hashes use insufficient PBKDF2 iterations | Medium | Same weakness, CWE-916 |
| EEF-CVE-2026-94206 Cloak PBKDF2 field ignores the configured iteration count and runs only :size rounds | Not rated yet | Same weakness, CWE-916 |
| PYSEC-2026-3963 openssl_encrypt versions before 1.4.9 contain a weak key derivation vulnerability in the D-Bus CryptoService.EncryptFile handler that uses unstretched SHA-256… | High | Same weakness, CWE-916 |
| PYSEC-2026-3959 openssl_encrypt versions before 1.4.9 derive the remote-pepper wrap key using unsalted HKDF-SHA256 or bare SHA-256 of the password, allowing identical keys… | High | Same weakness, CWE-916 |
| PYSEC-2026-3976 openssl_encrypt versions before 1.4.6 contain a key derivation flaw in sequential XOR composition mode where the last stage cancels out during key generation. | Medium | Same weakness, CWE-916 |
| GHSA-69x8-hrgq-fjj8 LiteLLM: Password hash exposure and pass-the-hash authentication bypass | High | Same weakness, CWE-916 |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor