Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sequelize: SQL Injection with sequelize.query

I'm using Sequelize with PostgreSQL for the first time. It's also my first time using an SQL database in a long time.

I have been researching how to improve the performance and security of some SQL Queries. I came across the sequelize.query() method and started using it for this purpose.

Is this way of making raw queries in Sequelize vulnerable to SQL Injection?

like image 819
Muhammad Hamza Shujaat Avatar asked Sep 25 '19 06:09

Muhammad Hamza Shujaat


1 Answers

Although you can avoid them, you can also issue queries vulnerable to SQL Injection.

If you use exclusively queries that use Replacements or Bind Parameters for all the user entered values, you should be safe.

like image 155
Tudor Constantin Avatar answered Sep 29 '22 05:09

Tudor Constantin