Conversation
| app.get('/', (req, res) => res.send('Hello World!')) | ||
| app.get('/foo/:id', (req, res) => { | ||
| res.send('Hello world!') | ||
| eval('console.log("something", ' + req.params.id + ')') |
Check failure
Code scanning / CodeQL
Code injection
There was a problem hiding this comment.
Micro-Learning Topic: Code injection (Detected by phrase)
Matched on "Code injection"
Code injection happens when an application insecurely accepts input that is subsequently used in a dynamic code evaluation call. If insufficient validation or sanitisation is performed on the input, specially crafted inputs may be able to alter the syntax of the evaluated code and thus alter execution. In a worst case scenario, an attacker could run arbitrary code in the server context and thus perform almost any action on the application server.
Try a challenge in Secure Code Warrior
Helpful references
- OWASP Command Injection - OWASP community page with comprehensive information about Code Injection, and links to various OWASP resources to help detect or prevent it.
- SEI CERT Oracle Coding Standard for Java - Prevent Code Injection - Carnegie Mellon University Software Engineering Institute guidance on preventing code injection vulnerabilities in Java.
There was a problem hiding this comment.
Micro-Learning Topic: SQL injection (Detected by phrase)
Matched on "SQL injection"
This is probably one of the two most exploited vulnerabilities in web applications and has led to a number of high profile company breaches. It occurs when an application fails to sanitize or validate input before using it to dynamically construct a statement. An attacker that exploits this vulnerability will be able to gain access to the underlying database and view or modify data without permission.
Try a challenge in Secure Code Warrior
Helpful references
- PHP SQL Injection Page - A detailed page on SQL injection in the online PHP manual.
- OWASP SQL Injection Prevention Cheat Sheet - This article is focused on providing clear, simple, actionable guidance for preventing SQL Injection flaws in your applications.
- OWASP SQL Injection - OWASP community page with comprehensive information about SQL injection, and links to various OWASP resources to help detect or prevent it.
- OWASP Query Parameterization Cheat Sheet - A derivative work of the OWASP SQL Injection Prevention Cheat Sheet focused on SQL query parameterization.
- Preventing SQL Injection Attacks With Python - A tutorial on crafting parameterized queries, SQL composition and safe query execution in Python.
|
CWE-22 Check |
Micro-Learning Topic: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (CWE 22)Matched on "CWE-22"The software uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as ".." that can resolve to a location that is outside of that directory. Try a challenge in Secure Code WarriorHelpful references
|
No description provided.