{"id":"GHSA-gpj5-g38j-94v9","revision":null,"records":[{"revision":"f62dd26ad3954d2bb76c0f7ea0687bed","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-39356","aliases":[],"title":"SQL Injection via escapeName() in all Drizzle ORM SQL dialects","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.","state":0,"publishedAt":"2026-04-07T19:58:46.348+00:00","modifiedAt":"2026-04-08T14:33:54.466+00:00","affected":[{"ecosystem":"Vendor product","name":"drizzle-orm","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"drizzle-team\",\n                    \"product\": \"drizzle-orm\",\n                    \"versions\": [\n                        {\n                            \"version\": \"< 0.45.2\",\n                            \"status\": \"affected\"\n                        },\n                        {\n                            \"version\": \">= 1.0.0-beta.2, < 1.0.0-beta.20\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"severity":"HIGH"}],"references":["https://github.com/drizzle-team/drizzle-orm/security/advisories/GHSA-gpj5-g38j-94v9"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-39356","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-39356","identifiers":["CVE-2026-39356"]},"retained":false,"historicalAffected":[]},{"revision":"552325cd257744bca70566964de11050","observedAt":"2026-11-24T01:42:15.432+00:00","statement":{"source":"euvd","id":"EUVD-2026-19909","aliases":["CVE-2026-39356","GHSA-gpj5-g38j-94v9"],"title":"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…","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.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"severity":null}],"references":["https://github.com/drizzle-team/drizzle-orm/security/advisories/GHSA-gpj5-g38j-94v9"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-19909","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Apr 7, 2026, 7:58:46 PM","dateUpdated":"Apr 8, 2026, 2:33:54 PM"},"relatedAdvisories":[],"note":"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."},"key":"euvd:EUVD-2026-19909","identifiers":["EUVD-2026-19909","CVE-2026-39356","GHSA-gpj5-g38j-94v9"]},"retained":false,"historicalAffected":[]},{"revision":"81cb693056884cd28a67b4533ace3fe7","observedAt":"2026-10-25T09:17:18.747+00:00","statement":{"source":"nvd","id":"CVE-2026-39356","aliases":[],"title":"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…","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.","state":0,"publishedAt":"2026-04-07T20:16:29.61+00:00","modifiedAt":"2026-07-20T20:10:00.11+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"severity":"HIGH"}],"references":["https://github.com/drizzle-team/drizzle-orm/security/advisories/GHSA-gpj5-g38j-94v9"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-39356","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Analyzed","weaknesses":["CWE-89"],"productCriteria":["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:*:*"],"sourceDates":{"published":"2026-04-07T20:16:29.610","lastModified":"2026-07-20T20:10:00.110"},"relatedAdvisories":[],"note":"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."},"key":"nvd:CVE-2026-39356","identifiers":["CVE-2026-39356"]},"retained":false,"historicalAffected":[]},{"revision":"9de2d322beba42d497a56dacd0b404a2","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-gpj5-g38j-94v9","aliases":["CVE-2026-39356"],"title":"Drizzle ORM has SQL injection via improperly escaped SQL identifiers","description":"### Summary\n\nDrizzle 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.\n\nAs 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.\n\n### Affected components\n\nThe issue affects the identifier escaping logic used by the PostgreSQL, MySQL, SQLite, SingleStore, and Gel dialects.\n\n### Impact\n\nThis 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.\n\nDepending 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.\n\nApplications that use only static schema objects, or that strictly map user input through an allowlist of known column or alias names, are not affected.\n\n### Details\n\nIn affected versions, `escapeName()` wrapped the identifier but did not escape the quote delimiter inside the identifier value:\n\n- PostgreSQL / SQLite / Gel: `\"` was not doubled to `\"\"`\n- MySQL / SingleStore: `` ` `` was not doubled to `` `` ``\n\nBecause of this, crafted input containing the dialect-specific identifier delimiter could break out of the quoted identifier and be interpreted as SQL syntax.\n\nA representative vulnerable pattern is dynamic sorting using untrusted input:\n\n```ts\nconst sortField = req.query.sort || 'id';\n\nconst rows = await db\n  .select()\n  .from(users)\n  .orderBy(sql.identifier(sortField));","state":0,"publishedAt":"2026-04-08T00:14:58+00:00","modifiedAt":"2026-04-08T00:41:21.252804+00:00","affected":[{"ecosystem":"npm","name":"drizzle-orm","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"0.45.2"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"drizzle-orm","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"1.0.0-beta.2"},{"kind":"fixed","version":"1.0.0-beta.20"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/drizzle-team/drizzle-orm/security/advisories/GHSA-gpj5-g38j-94v9","https://nvd.nist.gov/vuln/detail/CVE-2026-39356","https://github.com/drizzle-team/drizzle-orm"],"sourceUrl":"https://github.com/advisories/GHSA-gpj5-g38j-94v9","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-gpj5-g38j-94v9","identifiers":["GHSA-gpj5-g38j-94v9","CVE-2026-39356"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-24T12:25:34.5336315+00:00","complete":true,"records":1792,"lastAttemptAt":"2026-11-24T12:25:34.5336315+00:00","lastSuccessAt":"2026-11-24T12:25:34.7050132+00:00","error":null,"lastVerifiedAt":"2026-11-24T12:25:34.7050135+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-f6e4a7f93ed9acd6fcb1f804a4567f7b9b16730ac126110af8d6d24176317946-2ae43d33679e7db56ab1b459a4a26f489723a98eec44cb48e7b9bc15fd8c4513","complete":true,"records":431119,"lastAttemptAt":"2026-11-24T12:25:34.0435863+00:00","lastSuccessAt":"2026-11-24T12:25:33.8929077+00:00","error":null,"lastVerifiedAt":"2026-11-24T12:25:34.0435863+00:00","snapshotPublishedAt":"2026-11-24T11:31:46+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-0041dd74f0f74a56936efb9a3230e9b6","complete":false,"records":13935,"lastAttemptAt":"2026-11-24T12:35:26.4116826+00:00","lastSuccessAt":"2026-11-24T12:35:26.406+00:00","error":"326 identifier lookups failed; latest failures include AccessDenied (HTTP 403). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-24T12:35:26.406+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13515,"expectedIdentifiers":13982,"failedIdentifiers":326},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-24T12:25:34.5336315+00:00","complete":true,"records":1131,"lastAttemptAt":"2026-11-24T12:25:34.5336315+00:00","lastSuccessAt":"2026-11-24T12:25:34.7058109+00:00","error":null,"lastVerifiedAt":"2026-11-24T12:25:34.7058137+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-af8ced7ee5fc4e4d8e650974b0ea48bf","complete":false,"records":13947,"lastAttemptAt":"2026-11-24T12:26:14.9732632+00:00","lastSuccessAt":"2026-11-24T12:26:14.959+00:00","error":null,"lastVerifiedAt":"2026-11-24T12:26:14.959+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13482,"expectedIdentifiers":13982,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-c86437892ddabdeaf17409463a17578b1e71dd185d64061100dd57629858f6d6","complete":true,"records":10074,"lastAttemptAt":"2026-11-24T12:25:34.3950091+00:00","lastSuccessAt":"2026-11-23T22:27:19.6557603+00:00","error":null,"lastVerifiedAt":"2026-11-24T12:25:34.3950091+00:00","snapshotPublishedAt":"2026-11-23T21:33:52+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-6ba2352decd0c95d34a1b50f642582aa34659ce946f552488f0a5cea4e0cc09a","complete":true,"records":2020,"lastAttemptAt":"2026-11-24T12:25:34.1932135+00:00","lastSuccessAt":"2026-11-20T15:46:15.4249619+00:00","error":null,"lastVerifiedAt":"2026-11-24T12:25:34.1932135+00:00","snapshotPublishedAt":"2026-11-20T14:48:20+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-3afd4dd07a6bf352a6a53c4438150c464a2527017b95ca94804134ea15f1eba9","complete":true,"records":3220,"lastAttemptAt":"2026-11-24T12:25:34.4958379+00:00","lastSuccessAt":"2026-11-24T10:25:37.8779609+00:00","error":null,"lastVerifiedAt":"2026-11-24T12:25:34.4958379+00:00","snapshotPublishedAt":"2026-11-24T09:33:40+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-b3f815f4b80e6ee7009a469e05600427b49c4c540d96b9bae57af39cb7a4c7df","complete":true,"records":232959,"lastAttemptAt":"2026-11-24T12:25:34.2909692+00:00","lastSuccessAt":"2026-11-24T08:27:06.9384925+00:00","error":null,"lastVerifiedAt":"2026-11-24T12:25:34.2909692+00:00","snapshotPublishedAt":"2026-11-24T07:33:55+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}