tsaekaoOrg / nodegoat

Apache License 2.0
0 stars 0 forks source link

Improper Neutralization of Special Elements in Data Query Logic ('SQL Injection') [VID:4] #16

Open veracode-workflow-app[bot] opened 5 months ago

veracode-workflow-app[bot] commented 5 months ago

https://github.com/tsaekaoOrg/nodegoat/blob/1489ef89375ec079c565378a428682b440d73d28//app/routes/memos.js#L6-L16

Filename: memos.js

Line: 11

CWE: 943 (Improper Neutralization of Special Elements in Data Query Logic ('SQL Injection'))

This NoSQL API call contains an injection flaw. In the call or reference to mongodb.Collection.insert, the application executes an operation designed to manipulate data in the database, but part of that query is constructed from untrusted data. An attacker could exploit this flaw to modify arbitrary data inside the database or replace a query value to bypass authentication or access unauthorized data. Avoid passing user-generated data to queries outside of data fields. Ensure that query values are validated to authorize the requesting user before accessing the data. References: CWE/nDon't know how to fix this? Don't know why this was reported?
Get Assistance from Veracode