jbruinaud / WebGoatNet

WebGoat .Net for demos
0 stars 0 forks source link

CX Reflected_XSS_All_Clients @ Content/StoredXSS.aspx.cs [master] #208

Open jbruinaud opened 4 years ago

jbruinaud commented 4 years ago

Reflected_XSS_All_Clients issue exists @ Content/StoredXSS.aspx.cs in branch master

Method LoadComments at line 42 of Content\StoredXSS.aspx.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 LoadComments at line 42 of Content\StoredXSS.aspx.cs. This may enable a Cross-Site-Scripting attack.

Severity: High

CWE:79

Checkmarx

Lines: 48 49


Code (Line #48):

                comments += "<strong>Email:</strong>" + row["email"] + "<span style='font-size: x-small;color: #E47911;'> (Email Address Verified!) </span><br/>";

Code (Line #49):

                comments += "<strong>Comment:</strong><br/>" + row["comment"] + "<br/><hr/>";