Custodela / WebGoat.Net

OWASP's official repository for WebGoat (ASP.NET version)
0 stars 0 forks source link

CX Stored_XSS @ WebSite/BusinessLogic/Data/OrderRepository.cs [master] #6

Open kmcdon83 opened 6 years ago

kmcdon83 commented 6 years ago

Stored_XSS issue exists @ WebSite/BusinessLogic/Data/OrderRepository.cs in branch master

Method GetAllOrdersByCustomerId at line 65 of WebSite\BusinessLogic\Data\OrderRepository.cs gets data from the database, for the ToList 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 Page_Load at line 15 of WebSite\Checkout\Receipts.aspx.cs. This may enable a Stored Cross-Site-Scripting attack.

Severity: High CWE:79 Vulnerability details and guidance Lines: 67


Code (Line #67):

            return _context.Orders.Where(o => o.CustomerId == CustomerId).OrderByDescending(o => o.OrderDate).ToList();

kmcdon83 commented 6 years ago

Issue still exists.