You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
constsortField=req.query.sort||'id';constrows=awaitdb.select().from(users).orderBy(sql.identifier(sortField));---
### ReleaseNotes<details><summary>drizzle-team/drizzle-orm(drizzle-orm)</summary>
### [`v0.45.2`](https://redirect.github.com/drizzle-team/drizzle-orm/releases/tag/0.45.2)[CompareSource](https://redirect.github.com/drizzle-team/drizzle-orm/compare/0.45.1...0.45.2)-Fixed`sql.identifier()`,`sql.as()`escapingissues.PreviouslyallthevaluespassedtothisfunctionswerenotproperlyescapedcausingapossibleSQLInjection(CWE-89)vulnerabilityThanksto[@​EthanKim88](https://redirect.github.com/EthanKim88),[@​0x90sh](https://redirect.github.com/0x90sh)and[@​wgoodall01](https://redirect.github.com/wgoodall01)forreachingouttouswithareproductionandsuggestedfix</details>---
### Configuration📅**Schedule**: Branchcreation-""intimezoneEurope/Amsterdam,Automerge-Between12:00AMand03:59AM,onlyonMonday(*0-3**1)intimezoneEurope/Amsterdam.🚦**Automerge**: Enabled.♻**Rebasing**: WheneverPR is behindbasebranch,oryouticktherebase/retrycheckbox.🔕**Ignore**: ClosethisPRandyouwon't be reminded about this update again.
----[]<!--rebase-check-->Ifyouwanttorebase/retrythisPR,checkthisbox---ThisPRwasgeneratedby[MendRenovate](https://mend.io/renovate/).Viewthe[repositoryjoblog](https://developer.mend.io/github/ncs-northware/northware).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xMDIuMTEiLCJ1cGRhdGVkSW5WZXIiOiI0My4xMDIuMTEiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyIsInNlY3VyaXR5Il19-->
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
This PR has been flagged for autoclosing. However, it is being skipped due to the branch being already modified. Please close/delete it manually or report a bug if you think this is in error.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apps/cockpitAnything related to Northware CockpitdependenciesPull requests that update a dependency filepackages/uiAnything related to the @northware/ui packagesecurityTracking einer Security Vulnerability
0 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.45.1→0.45.2GitHub Vulnerability Alerts
CVE-2026-39356
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:"was not doubled to""`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: