Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Password hash is accepted instead of the plaintext password #32

Open
sigprof opened this issue Oct 25, 2024 · 0 comments
Open

Password hash is accepted instead of the plaintext password #32

sigprof opened this issue Oct 25, 2024 · 0 comments

Comments

@sigprof
Copy link

sigprof commented Oct 25, 2024

In iRedAdmin 2.6 it is possible to login by entering the password hash value into the login form instead of the corresponding plaintext password. This defeats any protection normally provided by password hashing (usually a leaked password hash does not give access immediately, because finding the matching plaintext password should be expensive, but with this implementation the password hash becomes equivalent to the plaintext password).

Looks like this code is the culprit — it accepts a plaintext match without the prefix even if the value stored in the database is actually a password hash:

iRedAdmin/libs/iredpwd.py

Lines 516 to 521 in b537e71

if challenge_password in [
plain_password,
"{PLAIN}" + plain_password,
"{plain}" + plain_password,
]:
return True

This kind of plaintext password matching probably should be behind some configuration option, so that the default configuration is secure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant