Failure to sanitize quotes which can lead to sql injection in squel
Key facts
- Attack vector
- —
- Privileges required
- —
- User interaction
- —
- Attack complexity
- —
- Impact type
- SQL injection
- Confidentiality · integrity · availability
- —
- Fix status
- No fix listed
No CVSS vector from any source. Fix status from GitHub. Impact type from CWE-89.
Summary
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | squel (npm) | up to 5.13.0 | — | No fix listed | GHSA-4qhx-g9wp-g9m6 |
- squel (npm) Vendor— Affected up to 5.13.0 Fixed in — No fix listed GHSA-4qhx-g9wp-g9m6
Remediation
No fixed version listed by the sources yet.
Timeline
- 2026-10-03 Threatist record created from GHSA-4qhx-g9wp-g9m6
References
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences