jbruinaud / WebGoatNet

WebGoat .Net for demos
0 stars 0 forks source link

CX Stored_XSS @ App_Code/DB/SqliteDbProvider.cs [master] #221

Open jbruinaud opened 4 years ago

jbruinaud commented 4 years ago

Stored_XSS issue exists @ App_Code/DB/SqliteDbProvider.cs in branch master

Method GetEmailByCustomerNumber at line 503 of App_Code\DB\SqliteDbProvider.cs gets data from the database, for the ExecuteScalar element. This element’s value then flows through the code without being properly filtered or encoded and is eventually displayed to the user in method btnFind_Click at line 23 of Content\SQLInjectionDiscovery.aspx.cs. This may enable a Stored Cross-Site-Scripting attack.

Severity: High

CWE:79

Checkmarx

Lines: 513


Code (Line #513):

                    output = (string)cmd.ExecuteScalar();