logo

GHSA-4qhx-g9wp-g9m6 squel

Package

Manager: npm
Name: squel
Vulnerable Version: >=0 <=5.13.0

Severity

Level: Critical

CVSS v3.1: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N/E:U/RL:O/RC:C

CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N

EPSS: N/A pctlN/A

Details

Failure to sanitize quotes which can lead to sql injection in squel 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.

Metadata

Created: 2019-06-14T16:09:01Z
Modified: 2021-09-16T21:00:23Z
Source: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2019/06/GHSA-4qhx-g9wp-g9m6/GHSA-4qhx-g9wp-g9m6.json
CWE IDs: ["CWE-74", "CWE-89"]
Alternative ID: N/A
Finding: F106
Auto approve: 1