cxronen / OpenRoom

Other
0 stars 0 forks source link

CX Insecure_Randomness @ createaccount.php [master] #91

Open rronen04 opened 3 years ago

rronen04 commented 3 years ago

Insecure_Randomness issue exists @ createaccount.php in branch master

Method rand_str at line 13 of createaccount.php uses a weak method rand to produce random values. These values might be used as personal identifiers, session tokens or cryptographic input; however, due to their insufficient randomness, an attacker may be able to derive their value.

Severity: Medium

CWE:330

Checkmarx

Training Recommended Fix

Lines: 19 13


Code (Line #19):

            $r = $chars{rand(0, $chars_length)};

Code (Line #13):

        $string = $chars{rand(0, $chars_length)};

cxronen commented 3 years ago

Issue still exists.