Executive brief
Sequelize, a popular tool for managing database connections in Node.js applications, contains a security flaw when used with Oracle databases. This vulnerability allows an attacker to bypass security filters and execute unauthorized commands directly on the database. If exploited, this could lead to the theft of sensitive customer data, unauthorized modification of records, or full control over the database environment.
Technical details
A SQL injection vulnerability exists in Sequelize's Oracle dialect implementation within `sql-string.js`. The `escape` function fails to sanitize single quotes if a string value begins with `TO_TIMESTAMP` or `TO_DATE`, returning the raw string instead of an escaped version. An attacker can exploit this by providing a crafted input that starts with one of these functions followed by malicious SQL syntax (e.g., using the `||` operator). This allows for arbitrary SQL expression injection without authentication. The issue is confirmed in version 6.37.3 and addressed in version 6.37.4.
Affected products
- Sequelize sequelize < 6.37.4
Timeline
- 2026-07-29: patched: Fix released in version 6.37.4
- 2026-08-03: advisory: GitHub Advisory published