Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessProvide attacker-controlled input to sql.identifier()
-
ExploitEmbedded delimiter bypasses quote escaping
-
ExecutionTerminate quoted identifier and inject SQL
-
ImpactExtract sensitive database information
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Persistence The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Drizzle ORM versions prior to 0.45.2 and 1.0.0-beta.20. Attacker must pass controlled input to sql.identifier(), .as(), or similar identifier-construction APIs. No authentication or user interaction required; exploitation occurs during query construction if application accepts untrusted input for identifiers. |
| Impact | Real-world risk is elevated for applications with exploitable code patterns. The CVSS vector (AV:N/AC:L/PR:N/UI:N) indicates network-accessible exploitation with low complexity and no authentication required, making this trivially exploitable if vulnerable code exists. However, exploitability depends entirely on whether the application passes unsanitized user input to identifier construction APIs-many applications use static identifiers or validate input, reducing attack surface. The High confidentiality impact (C:H) with no integrity or availability impact reflects read-only SQL injection potential (SELECT queries), though attacker creativity may enable broader impact depending on database permissions. No EPSS score provided, but GitHub advisory publication increases likelihood of reconnaissance and proof-of-concept development. No KEV listing or confirmed active exploitation. The SSVC decision framework would classify this as medium priority: exploitation status is POC-ready (technical details public), technical impact is significant (database exposure), but automatable exploitation requires specific vulnerable code patterns. Organizations should prioritize if they use Drizzle ORM with dynamic identifier construction from user input. |
| Exploit ScenarioDerived | An attacker identifies a web application using Drizzle ORM where a search filter allows users to specify a custom column name for sorting results. The application constructs a query using .as(userInput) to create a dynamic alias. The attacker submits payload 'col`; SELECT password FROM users--' which terminates the quoted identifier and injects a UNION-based SQL injection, exfiltrating password hashes from the database. With network accessibility, low attack complexity, and no authentication required per the CVSS vector, exploitation is straightforward once vulnerable code paths are identified through reconnaissance or code review. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Apr 07, 2026
SQL injection in Drizzle ORM (TypeScript) allows unauthenticated remote attackers to extract database contents via improperly escaped SQL identifiers in versions prior to 0.45.2 and 1.0.0-beta.20. Applications passing user-controlled input to sql.identifier() or .as() methods are vulnerable to identifier termination and arbitrary SQL injection. CVSS 7.5 (High) with network attack vector and low complexity. EPSS data not available; no public exploit identified at time of analysis, though the GitHub security advisory provides technical details that could enable exploitation.
RemediationAI
Immediately upgrade Drizzle ORM to version 0.45.2 or later for stable releases, or version 1.0.0-beta.20 or later for beta track deployments. Update package.json dependencies and run npm update or yarn upgrade to install the patched version. As an interim mitigation for environments unable to upgrade immediately, implement strict input validation and sanitization before any user-controlled data reaches sql.identifier() or .as() API calls-whitelist allowed identifier names against a known-good set and reject any input containing SQL metacharacters (quotes, backticks, semicolons, dashes). Review application code for all usages of dynamic identifier construction and assess whether untrusted input can reach these code paths. Consider static analysis tooling to identify vulnerable patterns. Consult the GitHub security advisory at https://github.com/drizzle-team/drizzle-orm/security/advisories/GHSA-gpj5-g38j-94v9 for additional technical details and vendor guidance.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in npm, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Drizzle ORM is a TypeScript object-relational mapping library supporting multiple SQL dialects (PostgreSQL, MySQL, SQLite). The vulnerability exists in dialect-specific escapeName() implementations responsible for safely quoting SQL identifiers (table names, column names, aliases). The flaw (CWE-89: SQL Injection) stems from failure to escape embedded identifier delimiters (quotes, backticks) before wrapping identifiers. For example, if an attacker supplies input like 'users`--' to an .as() alias operation, the backtick character terminates the quoted identifier prematurely, allowing subsequent SQL code injection. This affects any application code path where external input flows into sql.identifier() or .as() API calls without prior validation. The CPE identifies drizzle-team:drizzle-orm as the affected product across all versions prior to the fixed releases.
Know when Drizzle Orm gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Primary rating from Vendor (GitHub_M) · only source for this CVE.
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
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.
Executive ViewAI
Drizzle ORM versions prior to 0.45.2 and 1.0.0-beta.20 contain a critical SQL injection vulnerability in identifier handling that allows unauthenticated attackers to extract sensitive database contents. Organizations using Drizzle ORM in production applications risk unauthorized data exfiltration and potential database compromise if user input flows through sql.identifier() or .as() methods without additional sanitization.
If upgrade is not immediately feasible: (1) Implement strict input validation and whitelisting on all user inputs before passing to sql.identifier() or .as() methods-allow only alphanumeric characters and underscores; (2) Apply principle of least privilege to database service accounts used by Drizzle ORM applications to restrict data exposure scope; (3) Deploy Web Application Firewall (WAF) rules to detect and block SQL injection patterns in application requests; (4) Monitor database query logs for anomalous identifier patterns and unexpected column/table references. These controls reduce but do not eliminate risk-vendor patch application is mandatory for full remediation.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.
EUVD-2026-19909
GHSA-gpj5-g38j-94v9
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB