Skip to content

chore(deps): update dependency drizzle-orm to ^0.45.0 [security]#5298

Open
renovate[bot] wants to merge 1 commit into
developfrom
renovate/npm-drizzle-orm-vulnerability
Open

chore(deps): update dependency drizzle-orm to ^0.45.0 [security]#5298
renovate[bot] wants to merge 1 commit into
developfrom
renovate/npm-drizzle-orm-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
drizzle-orm (source) ^0.44.2^0.45.0 age confidence

Drizzle ORM has SQL injection via improperly escaped SQL identifiers

CVE-2026-39356 / GHSA-gpj5-g38j-94v9

More information

Details

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:

const sortField = req.query.sort || 'id';

const rows = await db
  .select()
  .from(users)
  .orderBy(sql.identifier(sortField));

#### Severity
- CVSS Score: 7.5 / 10 (High)
- Vector String: `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`

#### References
- [https://github.com/drizzle-team/drizzle-orm/security/advisories/GHSA-gpj5-g38j-94v9](https://redirect.github.com/drizzle-team/drizzle-orm/security/advisories/GHSA-gpj5-g38j-94v9)
- [https://nvd.nist.gov/vuln/detail/CVE-2026-39356](https://nvd.nist.gov/vuln/detail/CVE-2026-39356)
- [https://github.com/advisories/GHSA-gpj5-g38j-94v9](https://redirect.github.com/advisories/GHSA-gpj5-g38j-94v9)

This data is provided by the [GitHub Advisory Database](https://redirect.github.com/advisories/GHSA-gpj5-g38j-94v9) ([CC-BY 4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)).
</details>

---

### Release Notes

<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)

[Compare Source](https://redirect.github.com/drizzle-team/drizzle-orm/compare/0.45.1...0.45.2)

- Fixed `sql.identifier()`, `sql.as()` escaping issues. Previously all the values passed to this functions were not properly escaped
  causing a possible SQL Injection (CWE-89) vulnerability

Thanks to [@&#8203;EthanKim88](https://redirect.github.com/EthanKim88), [@&#8203;0x90sh](https://redirect.github.com/0x90sh) and [@&#8203;wgoodall01](https://redirect.github.com/wgoodall01) for reaching out to us with a reproduction and suggested fix

### [`v0.45.1`](https://redirect.github.com/drizzle-team/drizzle-orm/releases/tag/0.45.1)

[Compare Source](https://redirect.github.com/drizzle-team/drizzle-orm/compare/0.45.0...0.45.1)

- Fixed pg-native Pool detection in node-postgres transactions breaking in environments with forbidden `require()` ([#&#8203;5107](https://redirect.github.com/drizzle-team/drizzle-orm/issues/5107))

### [`v0.45.0`](https://redirect.github.com/drizzle-team/drizzle-orm/releases/tag/0.45.0)

[Compare Source](https://redirect.github.com/drizzle-team/drizzle-orm/compare/0.44.7...0.45.0)

- Fixed pg-native Pool detection in node-postgres transactions
- Allowed subqueries in select fields
- Updated typo algorythm => algorithm
- Fixed `$onUpdate` not handling `SQL` values (fixes [#&#8203;2388](https://redirect.github.com/drizzle-team/drizzle-orm/issues/2388), tests implemented by [L-Mario564](https://redirect.github.com/L-Mario564) in [#&#8203;2911](https://redirect.github.com/drizzle-team/drizzle-orm/pull/2911))
- Fixed `pg` mappers not handling `Date` instances in `bun-sql:postgresql` driver responses for `date`, `timestamp` types (fixes [#&#8203;4493](https://redirect.github.com/drizzle-team/drizzle-orm/issues/4493))

### [`v0.44.7`](https://redirect.github.com/drizzle-team/drizzle-orm/releases/tag/0.44.7)

[Compare Source](https://redirect.github.com/drizzle-team/drizzle-orm/compare/0.44.6...0.44.7)

- fix durable sqlite transaction return value [#&#8203;3746](https://redirect.github.com/drizzle-team/drizzle-orm/issues/3746) - thanks [@&#8203;joaocstro](https://redirect.github.com/joaocstro)

### [`v0.44.6`](https://redirect.github.com/drizzle-team/drizzle-orm/releases/tag/0.44.6)

[Compare Source](https://redirect.github.com/drizzle-team/drizzle-orm/compare/0.44.5...0.44.6)

- feat: add $replicas reference [#&#8203;4874](https://redirect.github.com/drizzle-team/drizzle-orm/issues/4874)

### [`v0.44.5`](https://redirect.github.com/drizzle-team/drizzle-orm/releases/tag/0.44.5)

[Compare Source](https://redirect.github.com/drizzle-team/drizzle-orm/compare/0.44.4...0.44.5)

- Fixed invalid usage of `.one()` in `durable-sqlite` session
- Fixed spread operator related crash in sqlite `blob` columns
- Better browser support for sqlite `blob` columns
- Improved sqlite `blob` mapping

### [`v0.44.4`](https://redirect.github.com/drizzle-team/drizzle-orm/releases/tag/0.44.4)

[Compare Source](https://redirect.github.com/drizzle-team/drizzle-orm/compare/0.44.3...0.44.4)

- Fix wrong DrizzleQueryError export. thanks [@&#8203;nathankleyn](https://redirect.github.com/nathankleyn)

### [`v0.44.3`](https://redirect.github.com/drizzle-team/drizzle-orm/releases/tag/0.44.3)

[Compare Source](https://redirect.github.com/drizzle-team/drizzle-orm/compare/0.44.2...0.44.3)

- Fixed types of `$client` for clients created by drizzle function

```ts
await db.$client.[...]
  • Added the updated_at column to the neon_auth.users_sync table definition.

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@changeset-bot

changeset-bot Bot commented Apr 8, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 2c83ed5

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

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@renovate renovate Bot temporarily deployed to Svelte UNDP Design April 8, 2026 04:53 Inactive
@renovate renovate Bot temporarily deployed to Svelte UNDP Components April 8, 2026 04:53 Inactive
@renovate renovate Bot force-pushed the renovate/npm-drizzle-orm-vulnerability branch from f1be832 to 1856545 Compare April 11, 2026 00:40
@renovate renovate Bot temporarily deployed to Svelte UNDP Design April 11, 2026 00:41 Inactive
@renovate renovate Bot temporarily deployed to Svelte UNDP Components April 11, 2026 00:41 Inactive
@renovate renovate Bot force-pushed the renovate/npm-drizzle-orm-vulnerability branch from 1856545 to c306bca Compare April 11, 2026 05:16
@renovate renovate Bot temporarily deployed to Svelte UNDP Design April 11, 2026 05:17 Inactive
@renovate renovate Bot temporarily deployed to Svelte UNDP Components April 11, 2026 05:17 Inactive
@renovate renovate Bot force-pushed the renovate/npm-drizzle-orm-vulnerability branch from c306bca to 2dc0fac Compare April 14, 2026 05:45
@renovate renovate Bot temporarily deployed to Svelte UNDP Design April 14, 2026 05:45 Inactive
@renovate renovate Bot temporarily deployed to Svelte UNDP Components April 14, 2026 05:45 Inactive
@renovate renovate Bot changed the title chore(deps): update dependency drizzle-orm to ^0.45.0 [security] chore(deps): update dependency drizzle-orm to ^0.45.0 [security] - autoclosed Apr 27, 2026
@renovate renovate Bot closed this Apr 27, 2026
@renovate renovate Bot deleted the renovate/npm-drizzle-orm-vulnerability branch April 27, 2026 21:08
@renovate renovate Bot changed the title chore(deps): update dependency drizzle-orm to ^0.45.0 [security] - autoclosed chore(deps): update dependency drizzle-orm to ^0.45.0 [security] Apr 28, 2026
@renovate renovate Bot reopened this Apr 28, 2026
@renovate renovate Bot force-pushed the renovate/npm-drizzle-orm-vulnerability branch from 2dc0fac to cc65d2c Compare April 28, 2026 06:30
@renovate renovate Bot temporarily deployed to Svelte UNDP Components April 28, 2026 06:30 Inactive
@renovate renovate Bot temporarily deployed to Svelte UNDP Design April 28, 2026 06:30 Inactive
@renovate renovate Bot force-pushed the renovate/npm-drizzle-orm-vulnerability branch from cc65d2c to a54a728 Compare April 28, 2026 06:31
@renovate renovate Bot temporarily deployed to Svelte UNDP Components April 28, 2026 06:32 Inactive
@renovate renovate Bot temporarily deployed to Svelte UNDP Design April 28, 2026 06:32 Inactive
@renovate renovate Bot force-pushed the renovate/npm-drizzle-orm-vulnerability branch from a54a728 to e9df03f Compare May 6, 2026 04:26
@renovate renovate Bot temporarily deployed to Svelte UNDP Components May 6, 2026 04:26 Inactive
@renovate renovate Bot temporarily deployed to Svelte UNDP Design May 6, 2026 04:26 Inactive
@renovate renovate Bot force-pushed the renovate/npm-drizzle-orm-vulnerability branch from e9df03f to e68d9ea Compare May 15, 2026 04:40
@renovate renovate Bot temporarily deployed to Svelte UNDP Design May 15, 2026 04:40 Inactive
@renovate renovate Bot temporarily deployed to Svelte UNDP Components May 15, 2026 04:40 Inactive
@renovate renovate Bot force-pushed the renovate/npm-drizzle-orm-vulnerability branch from e68d9ea to 87fed8a Compare May 21, 2026 22:32
@renovate renovate Bot temporarily deployed to Svelte UNDP Design May 21, 2026 22:32 Inactive
@renovate renovate Bot temporarily deployed to Svelte UNDP Components May 21, 2026 22:32 Inactive
@renovate renovate Bot force-pushed the renovate/npm-drizzle-orm-vulnerability branch from 87fed8a to ac21321 Compare June 9, 2026 06:55
@renovate renovate Bot temporarily deployed to Svelte UNDP Design June 9, 2026 06:55 Inactive
@renovate renovate Bot temporarily deployed to Svelte UNDP Components June 9, 2026 06:55 Inactive
@renovate renovate Bot force-pushed the renovate/npm-drizzle-orm-vulnerability branch from ac21321 to bb22342 Compare June 12, 2026 11:08
@renovate renovate Bot temporarily deployed to Svelte UNDP Design June 12, 2026 11:09 Inactive
@renovate renovate Bot temporarily deployed to Svelte UNDP Components June 12, 2026 11:09 Inactive
@renovate renovate Bot force-pushed the renovate/npm-drizzle-orm-vulnerability branch from bb22342 to 499f1b9 Compare June 20, 2026 03:46
@renovate renovate Bot temporarily deployed to Svelte UNDP Components June 20, 2026 03:46 Inactive
@renovate renovate Bot temporarily deployed to Svelte UNDP Design June 20, 2026 03:46 Inactive
@renovate renovate Bot force-pushed the renovate/npm-drizzle-orm-vulnerability branch from 499f1b9 to 06f545c Compare June 24, 2026 21:40
@renovate renovate Bot temporarily deployed to Svelte UNDP Design June 24, 2026 21:41 Inactive
@renovate renovate Bot temporarily deployed to Svelte UNDP Components June 24, 2026 21:41 Inactive
@renovate renovate Bot force-pushed the renovate/npm-drizzle-orm-vulnerability branch from 06f545c to 2c83ed5 Compare June 25, 2026 01:54
@renovate renovate Bot temporarily deployed to Svelte UNDP Design June 25, 2026 01:54 Inactive
@renovate renovate Bot temporarily deployed to Svelte UNDP Components June 25, 2026 01:54 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants