Medium, CVSS 6.8npmAmendedPublished
Veramo is Vulnerable to SQL Injection in Veramo Data Store ORM
GHSA-38cw-85xc-xr9x
- Affected
- npm @veramo/data-store < 6.0.2
- Fixed in
- 6.0.2· Vendor fix available
- Issue
- An SQL injection vulnerability exists in the @veramo/data-store package that allows any authenticated user to execute arbitrary SQL queries against the database. The vulnerability is caused by insufficient validation of the column parameter in the order array of query requests. Details packages/data-store/src/data-store-orm.ts (lines 416-434) The vulnerability exists in the decorateQB() function which processes query ordering parameters: Root Cause: 1. The item.column value from user input is passed directly as the alias parameter to addSelect() without any sanitization or validation 2. While TypeScript defines allowed column types (e.g., TCredentialColumns = 'context' | 'type' | ...), this is only compile-time checking 3. At runtime, the function accepts FindArgs<any, allowing arbitrary strings to bypass type restrictions 4. TypeORM inserts the alias directly into the SQL query, enabling SQL injection Affected Endpoints: All endpoints are located in…
Recommended action: Upgrade to 6.0.2 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.