What happened
hashPassword in server/services/userManagementService/utils.ts hashes passwords with bcrypt at cost factor 5.
Why this is a problem: bcrypt's cost factor is the only thing that makes offline brute-forcing of a leaked users.password column expensive, and it scales exponentially — each +1 doubles the work per guess. OWASP's minimum recommendation is 10; at cost 5 an attacker who obtains the password column (SQL injection, stolen backup, exposed replica) can run a dictionary attack roughly 32× faster than against the OWASP floor, putting every weak-to-moderate password within practical cracking range.
Agreed resolution
Rather than raising the bcrypt cost factor — which would churn the hash format now and again later — move straight to Argon2id, per OWASP's current recommendation: a minimum of 19 MiB of memory, 2 iterations, and 1 degree of parallelism. (Discussed in #901.)
Note that no migration is possible: re-hashing requires the plaintext password, which is only ever in memory for the instant of a login. Existing bcrypt hashes must therefore keep verifying indefinitely, and are upgraded opportunistically after a successful password check.
Version/commit
No response
Affected browser(s)
No response
Relevant logs/errors
Anything else
References:
Screenshots
No response
Checklist
What happened
hashPasswordinserver/services/userManagementService/utils.tshashes passwords with bcrypt at cost factor 5.Why this is a problem: bcrypt's cost factor is the only thing that makes offline brute-forcing of a leaked
users.passwordcolumn expensive, and it scales exponentially — each +1 doubles the work per guess. OWASP's minimum recommendation is 10; at cost 5 an attacker who obtains the password column (SQL injection, stolen backup, exposed replica) can run a dictionary attack roughly 32× faster than against the OWASP floor, putting every weak-to-moderate password within practical cracking range.Agreed resolution
Rather than raising the bcrypt cost factor — which would churn the hash format now and again later — move straight to Argon2id, per OWASP's current recommendation: a minimum of 19 MiB of memory, 2 iterations, and 1 degree of parallelism. (Discussed in #901.)
Note that no migration is possible: re-hashing requires the plaintext password, which is only ever in memory for the instant of a login. Existing bcrypt hashes must therefore keep verifying indefinitely, and are upgraded opportunistically after a successful password check.
Version/commit
No response
Affected browser(s)
No response
Relevant logs/errors
Anything else
References:
Screenshots
No response
Checklist