NodeJS/squel/5.8.0


SQL query string builder

https://www.npmjs.com/package/squel
UNKNOWN

1 Security Vulnerabilities

Failure to sanitize quotes which can lead to sql injection in squel

Published date: 2019-06-14T16:09:01Z
Links:

All versions of squel are vulnerable to sql injection.

The squel package does not properly escape user provided input when provided using the setFields method. This could lead to sql injection if the query was then executed.

Proof of concept demonstrating the injection of a single quote into a generated sql statement from user provided input. ```

console.log(squel.insert().into('buh').setFields({foo: bar'baz}).toString()); INSERT INTO buh (foo) VALUES ('bar'baz') ```

Recommendation

There is no fix at this time and the issue has been reported publicly. Consider using another query builder that provides strong guarantees for input sanitization to prevent sql injection attacks.

Affected versions: ["1.0.0", "1.0.1", "1.0.2", "1.0.3", "1.0.5", "1.0.6", "1.0.7", "1.1.0", "1.1.1", "1.1.2", "1.1.3", "1.2.0", "1.2.1", "2.0.0", "3.0.0", "3.0.1", "3.1.0", "3.1.1", "3.1.2", "3.2.0", "3.3.0", "3.4.0", "3.4.1", "3.4.2", "3.5.0", "3.6.0", "3.6.1", "3.7.0", "3.8.1", "3.9.0", "3.9.1", "3.10.0", "4.0.0", "4.1.0", "4.1.1", "4.2.0", "4.2.2", "4.2.3", "4.2.4", "4.3.0", "4.3.1", "4.3.2", "4.3.3", "4.4.0", "4.4.1", "4.4.2", "5.0.0", "5.0.1", "5.0.2", "5.0.3", "5.0.4", "5.1.0", "5.2.0", "5.2.1", "5.3.0", "5.3.1", "5.3.2", "5.3.3", "5.3.4", "5.4.0", "5.4.1", "5.4.2", "5.4.3", "5.5.0", "5.5.1", "5.6.0", "5.7.0", "5.8.0", "5.9.0", "5.9.1", "5.10.0", "5.10.1", "5.11.0", "5.11.1", "5.12.0", "5.12.1", "5.12.2", "5.13.0"]
Secure versions: []

78 Other Versions

Version License Security Released
5.13.0 UNKNOWN 1 2019-06-18 - 21:31 almost 5 years
5.12.2 UNKNOWN 1 2018-07-09 - 12:16 over 5 years
5.12.1 UNKNOWN 1 2018-03-20 - 18:22 about 6 years
5.12.0 UNKNOWN 1 2017-09-27 - 12:07 over 6 years
5.11.1 UNKNOWN 1 2017-07-17 - 13:14 over 6 years
5.11.0 UNKNOWN 1 2017-07-17 - 12:59 over 6 years
5.10.1 UNKNOWN 1 2017-07-17 - 09:34 over 6 years
5.10.0 UNKNOWN 1 2017-05-17 - 08:51 almost 7 years
5.9.1 UNKNOWN 1 2017-04-21 - 10:39 almost 7 years
5.9.0 UNKNOWN 1 2017-04-13 - 09:40 almost 7 years
5.8.0 UNKNOWN 1 2017-02-28 - 00:42 about 7 years
5.7.0 UNKNOWN 1 2017-02-06 - 11:13 about 7 years
5.6.0 UNKNOWN 1 2017-01-07 - 13:51 about 7 years
5.5.1 UNKNOWN 1 2016-12-24 - 20:57 over 7 years
5.5.0 UNKNOWN 1 2016-10-15 - 10:00 over 7 years
5.4.3 UNKNOWN 1 2016-09-15 - 05:46 over 7 years
5.4.2 UNKNOWN 1 2016-08-27 - 12:19 over 7 years
5.4.1 UNKNOWN 1 2016-08-27 - 12:06 over 7 years
5.4.0 UNKNOWN 1 2016-08-27 - 11:53 over 7 years
5.3.4 UNKNOWN 1 2016-08-26 - 02:48 over 7 years
5.3.3 UNKNOWN 1 2016-07-12 - 03:25 over 7 years
5.3.2 UNKNOWN 1 2016-06-13 - 04:51 almost 8 years
5.3.1 UNKNOWN 1 2016-06-05 - 09:23 almost 8 years
5.3.0 UNKNOWN 1 2016-06-05 - 09:00 almost 8 years
5.2.1 UNKNOWN 1 2016-05-19 - 01:11 almost 8 years
5.2.0 UNKNOWN 1 2016-05-18 - 11:11 almost 8 years
5.1.0 UNKNOWN 1 2016-05-14 - 10:17 almost 8 years
5.0.4 UNKNOWN 1 2016-04-17 - 00:26 almost 8 years
5.0.3 UNKNOWN 1 2016-04-13 - 06:38 almost 8 years
5.0.2 UNKNOWN 1 2016-04-11 - 02:18 almost 8 years
5.0.1 UNKNOWN 1 2016-04-06 - 01:38 almost 8 years
5.0.0 UNKNOWN 1 2016-03-29 - 11:17 about 8 years
4.4.2 UNKNOWN 1 2016-03-23 - 16:16 about 8 years
4.4.1 UNKNOWN 1 2016-03-20 - 02:50 about 8 years
4.4.0 UNKNOWN 1 2016-03-19 - 08:39 about 8 years
4.3.3 UNKNOWN 1 2016-02-29 - 15:02 about 8 years
4.3.2 UNKNOWN 1 2016-02-24 - 09:59 about 8 years
4.3.1 UNKNOWN 1 2016-02-19 - 07:19 about 8 years
4.3.0 UNKNOWN 1 2016-02-18 - 03:25 about 8 years
4.2.4 UNKNOWN 1 2016-02-17 - 04:37 about 8 years
4.2.3 UNKNOWN 1 2016-01-20 - 08:15 about 8 years
4.2.2 UNKNOWN 1 2015-11-13 - 12:28 over 8 years
4.2.0 UNKNOWN 1 2015-09-09 - 04:30 over 8 years
4.1.1 UNKNOWN 1 2015-09-01 - 06:46 over 8 years
4.1.0 UNKNOWN 1 2015-08-18 - 22:14 over 8 years
4.0.0 UNKNOWN 1 2015-05-24 - 01:27 almost 9 years
3.10.0 UNKNOWN 1 2014-11-24 - 03:41 over 9 years
3.9.1 UNKNOWN 1 2014-10-28 - 05:57 over 9 years
3.9.0 UNKNOWN 1 2014-10-28 - 04:26 over 9 years
3.8.1 UNKNOWN 1 2014-08-30 - 08:44 over 9 years
3.7.0 UNKNOWN 1 2014-08-11 - 08:22 over 9 years
3.6.1 UNKNOWN 1 2014-07-30 - 07:05 over 9 years
3.6.0 UNKNOWN 1 2014-07-24 - 09:50 over 9 years
3.5.0 UNKNOWN 1 2014-07-19 - 03:57 over 9 years
3.4.2 UNKNOWN 1 2014-07-02 - 09:59 over 9 years
3.4.1 UNKNOWN 1 2014-05-17 - 06:21 almost 10 years
3.4.0 UNKNOWN 1 2014-05-17 - 06:19 almost 10 years
3.3.0 UNKNOWN 1 2014-05-16 - 05:05 almost 10 years
3.2.0 UNKNOWN 1 2014-05-09 - 09:17 almost 10 years
3.1.2 UNKNOWN 1 2014-05-09 - 08:26 almost 10 years
3.1.1 UNKNOWN 1 2014-03-21 - 04:45 about 10 years
3.1.0 UNKNOWN 1 2014-03-21 - 03:45 about 10 years
3.0.1 UNKNOWN 1 2014-03-20 - 04:22 about 10 years
3.0.0 UNKNOWN 1 2014-03-19 - 10:55 about 10 years
2.0.0 UNKNOWN 1 2013-12-16 - 11:42 over 10 years
1.2.1 UNKNOWN 1 2013-10-07 - 11:15 over 10 years
1.2.0 UNKNOWN 1 2013-10-01 - 21:41 over 10 years
1.1.3 UNKNOWN 1 2013-06-10 - 09:44 almost 11 years
1.1.2 UNKNOWN 1 2013-06-03 - 13:46 almost 11 years
1.1.1 UNKNOWN 1 2013-04-09 - 10:48 almost 11 years
1.1.0 UNKNOWN 1 2013-03-28 - 03:35 about 11 years
1.0.7 UNKNOWN 1 2013-03-08 - 11:57 about 11 years
1.0.6 UNKNOWN 1 2013-01-04 - 15:35 about 11 years
1.0.5 UNKNOWN 1 2012-11-03 - 05:06 over 11 years
1.0.3 UNKNOWN 1 2012-01-27 - 15:06 about 12 years
1.0.2 UNKNOWN 1 2012-01-19 - 23:07 about 12 years
1.0.1 UNKNOWN 1 2011-12-20 - 17:23 over 12 years
1.0.0 UNKNOWN 1 2011-12-20 - 17:20 over 12 years