src/db/orders.js:8Oct 8, 1:15 PM
A new orders query was built by concatenating the id into the SQL string.
scar-002 · scar
A query was assembled by joining user input into the SQL string, which allows SQL injection.
1db.query("SELECT * FROM users WHERE id = " + id)1Use placeholders: db.query("SELECT * FROM users WHERE id = ?", [id])/(SELECT|INSERT|UPDATE|DELETE)\b.*["'\x60]\s*\+\s*[A-Za-z_]/iA new orders query was built by concatenating the id into the SQL string.