Drizzle-ORM SQL Injection Vulnerability Exposed: High-Severity Flaw in Popular Database Toolkit
A high-severity SQL injection vulnerability has been identified in the widely used drizzle-orm database toolkit, posing a direct threat to application security. The flaw, tracked as GHSA-gpj5-g38j-94v9, affects all versions prior to 0.45.2 and stems from improperly escaped SQL identifiers, creating a pathway for attackers to inject malicious SQL code. This is not a theoretical risk; it is a confirmed, exploitable vulnerability that could allow unauthorized data access, manipulation, or deletion in any application relying on the compromised library.
The vulnerability resides within the core of drizzle-orm, a popular Object-Relational Mapper (ORM) for TypeScript and JavaScript developers. The specific failure in escaping SQL identifiers means that user-supplied input, if passed to certain ORM methods, could be interpreted as part of the SQL command structure itself. The fix requires an immediate upgrade to drizzle-orm version 0.45.2 or later. The recommended action is to run the update command (`bun update drizzle-orm`) and subsequently verify compatibility with associated tooling like drizzle-kit to prevent integration issues.
This disclosure triggers urgent security reviews for countless projects. Developers must treat this as a priority patch, as SQL injection remains a top-tier web application risk. The associated GitHub Security Advisory provides technical details, and internal security documentation has flagged this issue with a 'C2' priority, indicating significant required action. Failure to patch leaves backend APIs and data layers exposed, with potential fallout ranging from data breaches to complete system compromise depending on the application's context and the attacker's intent.