๐Ÿ” CVE Alert

CVE-2026-76848

HIGH 7.5

TypeORM 0.2.21 through 1.1.0 SQL Injection via SelectQueryBuilder.distinctOn

CVSS Score
7.5
EPSS Score
0.0%
EPSS Percentile
0th

TypeORM's SelectQueryBuilder.distinctOn accepts an array of strings and stores it on the expression map without validation. For PostgreSQL-family drivers, createSelectDistinctExpression in src/query-builder/SelectQueryBuilder.ts joins that array and interpolates the result into the generated statement as SELECT DISTINCT ON (values), with no escaping, quoting, identifier validation or allowlist, and without routing the values through replacePropertyNames or the driver's escape helper. Because the interpolation point is a parenthesized SQL expression list rather than an identifier-only position, a supplied element may carry arbitrary expressions, including correlated subqueries. An application that forwards a client-controlled value into distinctOn, for instance to let a caller choose a deduplication column, allows that client to read data anywhere the application's database role can reach through boolean or time-based inference, independently of the entity being queried. validateOrderByCondition, the allowlist check guarding the orderBy family in the same class, is not applied to this path.

CWE CWE-89
Vendor typeorm
Product typeorm
Published Aug 24, 2026
Stay Ahead of the Next One

Get instant alerts for typeorm typeorm

Be the first to know when new high vulnerabilities affecting typeorm typeorm are published โ€” delivered to Slack, Telegram or Discord.

Get Free Alerts โ†’ Free ยท No credit card ยท 60 sec setup

CVSS v3 Breakdown

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

Affected Versions

typeorm / typeorm
0.2.21 โ‰ค 1.1.0

References

NVD โ†— CVE.org โ†— EPSS Data โ†—
github.com: https://github.com/typeorm/typeorm github.com: https://github.com/typeorm/typeorm/blob/1.1.0/src/query-builder/SelectQueryBuilder.ts vulncheck.com: https://www.vulncheck.com/advisories/typeorm-through-sql-injection-via-selectquerybuilder-distincton

Credits

Muhammad Sobirov