jbruinaud / WebGoatNet

WebGoat .Net for demos
0 stars 0 forks source link

CX Reflected_XSS_All_Clients @ App_Code/DB/MySqlDbProvider.cs [master] #212

Open jbruinaud opened 4 years ago

jbruinaud commented 4 years ago

Reflected_XSS_All_Clients issue exists @ App_Code/DB/MySqlDbProvider.cs in branch master

Method GetSecurityQuestionAndAnswer at line 319 of App_Code\DB\MySqlDbProvider.cs gets user input for the row element. This element’s value then flows through the code without being properly sanitized or validated and is eventually displayed to the user in method ButtonCheckEmail_Click at line 27 of Content\ForgotPassword.aspx.cs. This may enable a Cross-Site-Scripting attack.

Severity: High

CWE:79

Checkmarx

Lines: 337 338


Code (Line #337):

                    qAndA[0] = row[0].ToString();

Code (Line #338):

                    qAndA[1] = row[1].ToString();