VYPR
High severity7.5NVD Advisory· Published Apr 7, 2026· Updated Apr 15, 2026

CVE-2026-39356

CVE-2026-39356

Description

Drizzle is a modern TypeScript ORM. Prior to 0.45.2 and 1.0.0-beta.20, Drizzle ORM improperly escaped quoted SQL identifiers in its dialect-specific escapeName() implementations. In affected versions, embedded identifier delimiters were not escaped before the identifier was wrapped in quotes or backticks. As a result, applications that pass attacker-controlled input to APIs that construct SQL identifiers or aliases, such as sql.identifier(), .as(), may allow an attacker to terminate the quoted identifier and inject SQL. This vulnerability is fixed in 0.45.2 and 1.0.0-beta.20.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Drizzle ORM before 0.45.2 and 1.0.0-beta.20 fails to escape embedded identifier delimiters in escapeName(), enabling SQL injection via attacker-controlled identifiers or aliases.

Overview

Drizzle ORM versions prior to 0.45.2 and 1.0.0-beta.20 contain a SQL injection vulnerability in the escapeName() function used by PostgreSQL, MySQL, SQLite, SingleStore, and Gel dialects. The function wraps identifiers in quotes or backticks but does not escape the delimiter character (double quote for PostgreSQL/SQLite/Gel, backtick ` `` for MySQL/SingleStore) if it appears inside the identifier value. This omission allows an attacker to prematurely terminate the quoted identifier and inject arbitrary SQL syntax [2].

Exploitation

An attacker can trigger the vulnerability by providing untrusted input to APIs that construct SQL identifiers or aliases, such as sql.identifier() or .as(). A common exploitation pattern involves dynamic sorting where user-controlled column names are passed directly into sql.identifier(), e.g., req.query.sort used in an orderBy clause. No authentication bypass is required; the attacker only needs the ability to supply a string value to a vulnerable query-building path [2].

Impact

Successful exploitation can lead to blind or direct data disclosure, schema enumeration, query manipulation, privilege escalation, or destructive operations, depending on database dialect, query context, and database permissions. Applications that only use static schema objects or enforce an allowlist of known column/alias names are not affected [1][2].

Mitigation

The vulnerability is fixed in Drizzle ORM versions 0.45.2 and 1.0.0-beta.20. Users are advised to upgrade immediately. As a workaround, input passed to identifier-construction APIs should be validated against an allowlist of expected values [1][2].

AI Insight generated on May 18, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
drizzle-ormnpm
< 0.45.20.45.2
drizzle-ormnpm
>= 1.0.0-beta.2, < 1.0.0-beta.201.0.0-beta.20

Affected products

20
  • Drizzle/Drizzle20 versions
    cpe:2.3:a:drizzle:drizzle:1.0.0:beta11:*:*:*:node.js:*:*+ 19 more
    • cpe:2.3:a:drizzle:drizzle:1.0.0:beta11:*:*:*:node.js:*:*
    • cpe:2.3:a:drizzle:drizzle:1.0.0:beta12:*:*:*:node.js:*:*
    • cpe:2.3:a:drizzle:drizzle:1.0.0:beta13:*:*:*:node.js:*:*
    • cpe:2.3:a:drizzle:drizzle:1.0.0:beta14:*:*:*:node.js:*:*
    • cpe:2.3:a:drizzle:drizzle:1.0.0:beta15:*:*:*:node.js:*:*
    • cpe:2.3:a:drizzle:drizzle:1.0.0:beta16:*:*:*:node.js:*:*
    • cpe:2.3:a:drizzle:drizzle:1.0.0:beta17:*:*:*:node.js:*:*
    • cpe:2.3:a:drizzle:drizzle:1.0.0:beta18:*:*:*:node.js:*:*
    • cpe:2.3:a:drizzle:drizzle:1.0.0:beta19:*:*:*:node.js:*:*
    • cpe:2.3:a:drizzle:drizzle:1.0.0:beta1:*:*:*:node.js:*:*
    • cpe:2.3:a:drizzle:drizzle:1.0.0:beta2:*:*:*:node.js:*:*
    • cpe:2.3:a:drizzle:drizzle:1.0.0:beta3:*:*:*:node.js:*:*
    • cpe:2.3:a:drizzle:drizzle:1.0.0:beta4:*:*:*:node.js:*:*
    • cpe:2.3:a:drizzle:drizzle:1.0.0:beta5:*:*:*:node.js:*:*
    • cpe:2.3:a:drizzle:drizzle:1.0.0:beta6:*:*:*:node.js:*:*
    • cpe:2.3:a:drizzle:drizzle:1.0.0:beta7:*:*:*:node.js:*:*
    • cpe:2.3:a:drizzle:drizzle:1.0.0:beta8:*:*:*:node.js:*:*
    • cpe:2.3:a:drizzle:drizzle:1.0.0:beta9:*:*:*:node.js:*:*
    • cpe:2.3:a:drizzle:drizzle:*:*:*:*:*:node.js:*:*range: <0.45.2
    • (no CPE)range: <0.45.2, <1.0.0-beta.20

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

3

News mentions

0

No linked articles in our index yet.