Reflected_XSS_All_Clients issue exists @ WebGoat/Content/UploadPathManipulation.aspx.cs in branch master
Method btnUpload_Click at line 18 of WebGoat\Content\UploadPathManipulation.aspx.cs gets user input for the FileName 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 btnUpload_Click at line 18 of WebGoat\Content\UploadPathManipulation.aspx.cs. This may enable a Cross-Site-Scripting attack.
labelUpload.Text = "<div class='success' style='text-align:center'>The file " + FileUpload1.FileName + " has been saved in to the WebGoatCoins/uploads directory</div>";
Reflected_XSS_All_Clients issue exists @ WebGoat/Content/UploadPathManipulation.aspx.cs in branch master
Method btnUpload_Click at line 18 of WebGoat\Content\UploadPathManipulation.aspx.cs gets user input for the FileName 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 btnUpload_Click at line 18 of WebGoat\Content\UploadPathManipulation.aspx.cs. This may enable a Cross-Site-Scripting attack.
Severity: High
CWE:79
Vulnerability details and guidance
Checkmarx
Lines: 26
Code (Line #26):