-
Notifications
You must be signed in to change notification settings - Fork 2
Demo vulnerabilities outside the diff #53
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
base: test/vulns-outside-30_08_24_18_44
Are you sure you want to change the base?
Demo vulnerabilities outside the diff #53
Conversation
⛔ Snyk checks have failed. 1 issues have been found so far.
✅ security/snyk check is complete. No issues have been found. (View Details) ✅ license/snyk check is complete. No issues have been found. (View Details) ⛔ code/snyk check is complete. 1 issues have been found. (View Details) 💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
const sqlQuery = | ||
"SELECT email FROM credentials WHERE " + | ||
"email = ? AND " + | ||
"email = '" + req.body.email + "' AND " + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SQL Injection
Unsanitized input from the HTTP request body
flows into query
, where it is used in an SQL query. This may result in an SQL Injection vulnerability.
Line 32 | CWE-89 | Priority score 755 | Learn more about this vulnerability
Data flow: 15 steps
Step 1 - 5
"email = '" + req.body.email + "' AND " + |
Step 6 - 8
utils.js#L31
Step 9
utils.js#L30
Step 10 - 11
sql_injection.js#L4
Step 12
sql_injection.js#L6
Step 13
sql_injection.js#L9
Step 14 - 15
db.query(query, args, (err, result) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
World
hello world |
const sqlQuery = | ||
"SELECT email FROM credentials WHERE " + | ||
"email = ? AND " + | ||
"email = '" + req.body.email + "' AND " + | ||
"password = ?"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not
No description provided.