Custodela / NodeGoat

The OWASP NodeGoat project provides an environment to learn how OWASP Top 10 security risks apply to web applications developed using Node.js and how to effectively address them.
https://www.owasp.org/index.php/Projects/OWASP_Node_js_Goat_Project
Apache License 2.0
0 stars 0 forks source link

CX Stored_XSS @ app/data/contributions-dao.js [master] #9

Open kmcdon83 opened 6 years ago

kmcdon83 commented 6 years ago

Stored_XSS issue exists @ app/data/contributions-dao.js in branch master

Method function at line 60 of app\data\contributions-dao.js gets data from the database, for the contributions 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 contributionsDAO.getByUserId at line 12 of app\routes\contributions.js. This may enable a Stored Cross-Site-Scripting attack.

Severity: High CWE:79 Vulnerability details and guidance Internal Guidance Lines: 71 60


Code (Line #71):

                userDAO.getUserById(userId, function(err, user) {

Code (Line #60):

            function(err, contributions) {

kmcdon83 commented 6 years ago

Issue still exists.

kmcdon83 commented 6 years ago

Issue still exists.