SQL Injection via escapeName() in all Drizzle ORM SQL dialects
Exploitation and risk
Source statusCISA KEV lists vulnerabilities known to be exploited. FIRST EPSS estimates the likelihood of exploitation in the next 30 days. An unavailable score does not mean zero risk.
Which CVEs have scores here?
This view includes predictions for CVE identifiers explicitly listed in public NuGet advisories. Microsoft release pages have their own prediction coverage. Check source status for the scope and latest checks.
No exploitation or prediction data is available here for these CVEs. This does not mean they are safe or unlikely to be exploited.
cve-program · CVE-2026-39356
PublishedDrizzle 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.
- Source published
- 7 Apr 2026 19:58:46 UTC
- Source modified
- 8 Apr 2026 14:33:54 UTC
- Saved here
- 23 Oct 2026 15:48:27 UTC
- Source terms
- CVE Program Terms of Use
Original source record · Cite this exact observation · Complete original publisher JSON
Source: cve-program · CVE Program Terms of Use. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.
CVSS 3.1 · 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
euvd · EUVD-2026-19909
PublishedDrizzle 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.
Additional publisher context
EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON.
Original publisher date fields
datePublished: Apr 7, 2026, 7:58:46 PM
dateUpdated: Apr 8, 2026, 2:33:54 PM
- Source published
- Apr 7, 2026, 7:58:46 PM (timezone not stated)
- Source modified
- Apr 8, 2026, 2:33:54 PM (timezone not stated)
- Saved here
- 24 Nov 2026 01:42:15 UTC
- Source terms
- ENISA EUVD · source terms and attribution apply
Original source record · Cite this exact observation · Complete original publisher JSON
Source: euvd · ENISA EUVD · source terms and attribution apply. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.
EUVD CVSS 3.1 · 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
nvd · CVE-2026-39356
PublishedDrizzle 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.
Additional publisher context
NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON.
Source analysis status: Analyzed
Weakness classifications: CWE-89
Original publisher date fields
published: 2026-04-07T20:16:29.610
lastModified: 2026-07-20T20:10:00.110
19 source CPE criteria · context only
- cpe:2.3:a:drizzle:drizzle:*:*:*:*:*:node.js:*:*
- cpe:2.3:a:drizzle:drizzle:1.0.0:beta1:*:*:*:node.js:*:*
- 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: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:*:*
The original JSON retains the logical configuration operators, exclusions and version bounds.
- Source published
- 7 Apr 2026 20:16:29 UTC
- Source modified
- 20 Jul 2026 20:10:00 UTC
- Saved here
- 25 Oct 2026 09:17:18 UTC
- Source terms
- NIST NVD usage terms; underlying source attribution retained
Original source record · Cite this exact observation · Complete original publisher JSON
Source: nvd · NIST NVD usage terms; underlying source attribution retained. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.
CVSS 3.1 · [email protected] · Secondary · 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
osv · GHSA-gpj5-g38j-94v9
Published### Summary 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. ### Affected components The issue affects the identifier escaping logic used by the PostgreSQL, MySQL, SQLite, SingleStore, and Gel dialects. ### Impact This issue only affects applications that pass untrusted runtime input into identifier or alias construction. Common examples include dynamic sorting, dynamic report builders, and CTE or alias names derived from request parameters. Depending on the database dialect, query context, and database permissions, successful exploitation may enable blind or direct data disclosure, schema enumeration, query manipulation, privilege escalation, or destructive operations. Applications that use only static schema objects, or that strictly map user input through an allowlist of known column or alias names, are not affected. ### Details In affected versions, `escapeName()` wrapped the identifier but did not escape the quote delimiter inside the identifier value: - PostgreSQL / SQLite / Gel: `"` was not doubled to `""` - MySQL / SingleStore: `` ` `` was not doubled to `` `` `` Because of this, crafted input containing the dialect-specific identifier delimiter could break out of the quoted identifier and be interpreted as SQL syntax. A representative vulnerable pattern is dynamic sorting using untrusted input: ```ts const sortField = req.query.sort || 'id'; const rows = await db .select() .from(users) .orderBy(sql.identifier(sortField));
- Source published
- 8 Apr 2026 00:14:58 UTC
- Source modified
- 8 Apr 2026 00:41:21 UTC
- Saved here
- 24 Oct 2026 13:17:17 UTC
- Source terms
- GitHub Advisory Database · CC-BY-4.0
Original source record · Cite this exact observation · Complete original publisher JSON
Source: osv · GitHub Advisory Database · CC-BY-4.0. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.
CVSS_V3 · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Publisher rating · HIGH