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

Weak Salt Implementation #6449

Closed
gulivindala opened this issue Feb 12, 2023 · 1 comment
Closed

Weak Salt Implementation #6449

gulivindala opened this issue Feb 12, 2023 · 1 comment

Comments

@gulivindala
Copy link

gulivindala commented Feb 12, 2023

On what page in the application did you find this issue?

return hash('sha256', $password . $this->getPersonId());

On what type of server is this running? Dedicated / Shared hosting? Linux / Windows?

Windows/xampp

What browser (and version) are you running?

Firefox

What version of PHP is the server running?

7.4.27

What version of SQL Server are you running?

7.4.27

What version of ChurchCRM are you running?

4.5.3

Weak Salt Implementation

The following report outlines a vulnerability found in the password storage system. The vulnerability arises from the use of a weak salt in the hashing algorithm, which could allow attackers to crack passwords more easily.

Vulnerable Code:

hash('sha256', $password . $this->getPersonId());

Vulnerability Explanation:
The salt used in the hashing algorithm is generated by the $this->getPersonId() method. However, the method returns an integer value, which is not random or unique for each password. This makes the salt predictable and weak, and could allow attackers to use precomputed hash tables or dictionary attacks to crack the hashed passwords.

Impact:
The vulnerability could allow an attacker to crack passwords more easily, which could result in unauthorized access to user accounts and sensitive information.

Recommendation:
To address this vulnerability, it is recommended to use a more secure and unpredictable salt for each password, such as a random value generated for each password. This will make it more difficult for attackers to crack hashed passwords using precomputed hash tables or dictionary attacks.

WhatsApp Image 2023-02-12 at 8 07 43 PM
WhatsApp Image 2023-02-12 at 8 07 53 PM

@MrClever
Copy link
Collaborator

Known issue #3042.

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

2 participants