TypeORM up to 1.1.0 SelectQueryBuilder SelectQueryBuilder.ts createSelectDistinctExpression distinctOn sql injection
| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 7.3 | $0-$5k | 0.69 |
Summary
A vulnerability has been found in TypeORM up to 1.1.0 and classified as critical. Impacted is the function createSelectDistinctExpression of the file src/query-builder/SelectQueryBuilder.ts of the component SelectQueryBuilder. This manipulation of the argument distinctOn causes sql injection.
This vulnerability appears as CVE-2026-76848. The attack may be initiated remotely. There is no available exploit.
Details
A vulnerability has been found in TypeORM up to 1.1.0 and classified as critical. Affected by this vulnerability is the function createSelectDistinctExpression of the file src/query-builder/SelectQueryBuilder.ts of the component SelectQueryBuilder. The manipulation of the argument distinctOn with an unknown input leads to a sql injection vulnerability. The CWE definition for the vulnerability is CWE-89. The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. As an impact it is known to affect confidentiality, integrity, and availability. The summary by CVE is:
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.
It is possible to read the advisory at github.com. This vulnerability is known as CVE-2026-76848 since 08/19/2026. The exploitation appears to be easy. The attack can be launched remotely. The exploitation doesn't need any form of authentication. Technical details of the vulnerability are known, but there is no available exploit. The pricing for an exploit might be around USD $0-$5k at the moment (estimation calculated on 08/24/2026). The attack technique deployed by this issue is T1505 according to MITRE ATT&CK.
There is no information about possible countermeasures known. It may be suggested to replace the affected object with an alternative product.
Be aware that VulDB is the high quality source for vulnerability data.
Product
Name
Version
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔒VulDB Reliability: 🔍
CNA CVSS-B Score: 🔒
CNA CVSS-BT Score: 🔒
CNA Vector: 🔒
CVSSv3
VulDB Meta Base Score: 7.4VulDB Meta Temp Score: 7.3
VulDB Base Score: 7.3
VulDB Temp Score: 7.1
VulDB Vector: 🔒
VulDB Reliability: 🔍
CNA Base Score: 7.5
CNA Vector (VulnCheck): 🔒
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍
Exploiting
Class: Sql injectionCWE: CWE-89 / CWE-74 / CWE-707
CAPEC: 🔒
ATT&CK: 🔒
Physical: No
Local: No
Remote: Yes
Availability: 🔒
Status: Not defined
Price Prediction: 🔍
Current Price Estimation: 🔒
| 0-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: no mitigation knownStatus: 🔍
0-Day Time: 🔒
Timeline
08/19/2026 CVE reserved08/24/2026 Advisory disclosed
08/24/2026 VulDB entry created
08/24/2026 VulDB entry last update
Sources
Advisory: github.comStatus: Not defined
CVE: CVE-2026-76848 (🔒)
GCVE (CVE): GCVE-0-2026-76848
GCVE (VulDB): GCVE-100-394663
Entry
Created: 08/24/2026 15:29Changes: 08/24/2026 15:29 (76)
Complete: 🔍
Cache ID: 216::103
Be aware that VulDB is the high quality source for vulnerability data.
No comments yet. Languages: en.
Please log in to comment.