GHSA-v8fg-2rw7-q452: SQL Injection

Published Aug 3, 2026
·
Updated

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.

Affected Software

1 affected componentFixes available
npm/sequelize<6.37.4
6.37.4

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/sequelize to a version that resolves this vulnerability.

    Fixed in 6.37.4

Event History

Aug 3, 2026
Advisory Published
via GitHub·08:29 PM
Data Sourced
via GitHub·08:29 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of GHSA-v8fg-2rw7-q452?

The severity of GHSA-v8fg-2rw7-q452 is critical with a score of 9.8.

2

What type of vulnerability is GHSA-v8fg-2rw7-q452?

GHSA-v8fg-2rw7-q452 is an SQL Injection vulnerability.

3

How do I fix GHSA-v8fg-2rw7-q452?

To fix GHSA-v8fg-2rw7-q452, update Sequelize to version 6.37.4 or later.

4

What conditions trigger the vulnerability in GHSA-v8fg-2rw7-q452?

The vulnerability in GHSA-v8fg-2rw7-q452 is triggered when the dialect is set to 'oracle' and the `escape` function processes strings starting with `TO_TIMESTAMP` or `TO_DATE`.

5

In which version of Sequelize was GHSA-v8fg-2rw7-q452 confirmed?

GHSA-v8fg-2rw7-q452 was confirmed on Sequelize version 6.37.3.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203