Deeds101 / CYBR8420-project

3 stars 5 forks source link

Code Review #3 #37

Open Atmcalpine opened 10 months ago

Atmcalpine commented 10 months ago

Code Review for the following files:

Cojajomaco commented 10 months ago

Post/Contact.php has two CWEs listed in the automated code review output using Snyk.

CWE-89 https://cwe.mitre.org/data/definitions/89.html Unsanitized input from an HTTP parameter flows into mysqli_query, where it is used in an SQL query. This may result in an SQL Injection vulnerability.

CWE-601 https://cwe.mitre.org/data/definitions/601.html Unsanitized input from an HTTP header flows into header, where it is used as an URL to redirect the user. This may result in an Open Redirect vulnerability.

These both reference unsanitized inputs; I need to verify that "mysql_query" function doesn't sanitize input. I also need validate the criticality of the HTTP input flow to see if it can be exploited.

SMTP.php has one listed CWE from the automated code review output using Snyk.

CWE-916 https://cwe.mitre.org/data/definitions/916.html MD5 hash (used in md5) is insecure. Consider changing it to a secure hashing algorithm.

MD5 is an outdated hashing function for security; I need to verify its usage in the code to see if this concern is legitimate. If so, it should be relatively simple to swap to a different hashing function if supported.

Cojajomaco commented 10 months ago

I'm going to find an alternate code scanning program (due to a lack of secure coding knowledge) to verify these results.