Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code Security Finding: NoSQL Injection (CWE-943, High Severity) in user-dao.js:104 #9

Open
2 tasks
joshn-whitesource-app bot opened this issue Feb 7, 2024 · 0 comments
Labels
Mend: code security findings Code security findings detected by Mend

Comments

@joshn-whitesource-app
Copy link

Code Security Finding

This finding was first detected on 2024-02-07 07:19pm GMT and is still present in the last scan performed on 2024-02-07 07:19pm GMT:

SeverityVulnerability TypeCWEFileData Flows
HighNoSQL Injection

CWE-943

user-dao.js:104

1
Vulnerable Code

_id: parseInt(userId)
}, callback);
};
this.getUserByUserName = (userName, callback) => {
usersCol.findOne({

1 Data Flow/s detected

app.post("/signup", sessionHandler.handleSignup);

this.handleSignup = (req, res, next) => {

userName,

if (validateSignup(userName, firstName, lastName, password, verify, email, errors)) {

const validateSignup = (userName, firstName, lastName, password, verify, email, errors) => {

if (validateSignup(userName, firstName, lastName, password, verify, email, errors)) {

userDAO.getUserByUserName(userName, (err, user) => {

this.getUserByUserName = (userName, callback) => {

userName: userName

usersCol.findOne({

🏴 Suppress Finding
  • ... as False Alarm
  • ... as Acceptable Risk
@joshn-whitesource-app joshn-whitesource-app bot added the Mend: code security findings Code security findings detected by Mend label Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mend: code security findings Code security findings detected by Mend
Projects
None yet
Development

No branches or pull requests

0 participants