ITADN

chore(deps): update dependency drizzle-orm to v0.45.2 [security]

#161Pull Requestrenovate[bot] 创建于 2026-04-08
R
renovate[bot]commented
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [drizzle-orm](https://orm.drizzle.team) ([source](https://redirect.github.com/drizzle-team/drizzle-orm)) | [`0.45.1` → `0.45.2`](https://renovatebot.com/diffs/npm/drizzle-orm/0.45.1/0.45.2) | ![age](https://developer.mend.io/api/mc/badges/age/npm/drizzle-orm/0.45.2?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/drizzle-orm/0.45.1/0.45.2?slim=true) | ### GitHub Vulnerability Alerts #### [CVE-2026-39356](https://redirect.github.com/drizzle-team/drizzle-orm/security/advisories/GHSA-gpj5-g38j-94v9) ### 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)); --- ### 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 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/fuma-nama/fuma-comment). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xMDIuMTEiLCJ1cGRhdGVkSW5WZXIiOiI0My4xMDIuMTEiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbXX0=-->
合并状态:未合并 1 条评论