CVE-2026-69240: Sequelize: SQL Injection (Oracle DB)
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 TOTIMESTAMP or TODATE.
javascript } else if (dialect === 'oracle' && typeof val === 'string') { if (val.startsWith('TOTIMESTAMP') || val.startsWith('TODATE')) { return val; } val = val.replace(/'/g, "''"); }
PoC Suppose the application has the following code:
javascript var result = await models.Student.findOne({ where: { firstName: req.query.firstName } });
An attacker can inject arbitrary sql expressions.
http://host/path?firstName=TODATE('0','Y')||'' OR 1=1--
The resulted SQL will be:
SQL SELECT ... WHERE "Student"."firstName" = TODATE('0','Y')||'' OR 1=1-- ORDER BY "Student"."id" OFFSET 0 ROWS FETCH NEXT 1 ROWS ONLY;
Impact Data theft and tampering.
Other sources
Sequelize is a Node.js ORM tool. Prior to 6.37.4, SQL injection is possible with strings only if dialect is set to oracle. The escape function defined in sql-string.js does not escape quotes if the value starts with TOTIMESTAMP or TODATE. In the Oracle dialect, when val is a string and starts with TOTIMESTAMP or TODATE, escape returns val directly instead of replacing single quotes. An attacker can inject arbitrary SQL expressions through an application value that reaches this escape path. This issue is fixed in version 6.37.4.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
npm/sequelizeto a version that resolves this vulnerability.Fixed in 6.37.4 - Upgrade
Upgrade
Sequelizeto a version that resolves this vulnerability.Fixed in 6.37.4
Event History
Frequently Asked Questions
What is the severity of CVE-2026-69240?
CVE-2026-69240 has a critical severity rating of 9.8.
How do I fix CVE-2026-69240?
To fix CVE-2026-69240, upgrade Sequelize to version 6.37.4 or later.
What type of vulnerability is CVE-2026-69240?
CVE-2026-69240 is a SQL Injection vulnerability specifically affecting Oracle DB when using Sequelize.
Which versions of Sequelize are affected by CVE-2026-69240?
CVE-2026-69240 affects Sequelize version 6.37.3 and earlier.
How can CVE-2026-69240 be exploited?
CVE-2026-69240 can be exploited through unescaped strings leading to SQL Injection when the dialect is set to 'oracle'.