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

Bypass authentication through loose comparison (==) #462

Open
peng-hui opened this issue May 21, 2020 · 0 comments
Open

Bypass authentication through loose comparison (==) #462

peng-hui opened this issue May 21, 2020 · 0 comments

Comments

@peng-hui
Copy link

Hi, I'd like to report a potential authentication bypass problem using loose comparison.

In monstra/admin/index.php:38, the password checking is currently using loose comparison (==) instead of strict. However, the password in monstra is computed usingmd5 functions in monstra/engine/Security.php:98, which suffers from magic hash problem. If the hash value starts from 0e, which will be treated as 0 during the comparison. An attacker can bypass the authentication using a crafted password with similar hash value.

This problem also appears in other parts of monstra. For example, the plugin box has a similar issue.

This can be easily fixed via strict comparison(===).

Reference to magic hash

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