Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1336 CNY

100%

CVE-2026-76848— TypeORM 0.2.21 through 1.1.0 SQL Injection via SelectQueryBuilder.distinctOn

Quick assessment

Affected
typeorm typeorm
Exploitation
Public or AI PoC available; prioritize validation
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

TypeORM 的 方法接受一个字符串数组,并将其直接存储到表达式映射中,而未进行任何验证。对于基于 PostgreSQL 的驱动程序, 中的 函数会将该数组拼接,并将其插值生成到 SQL 语句中,形式为 ,但在此过程中没有任何转义、引号包裹、标识符验证或白名单机制,同时也未通过 或驱动程序的转义辅助函数进行处理。由于插值点是一个包含 SQL 表达式列表的括号结构(而非仅限标识符的位置),传入的数组元素可以包含任意表达式,包括相关子查询。如果应用程序将客户端可控的值传递给 (例如,允许调用者选择去重列),则攻击者可

CVSS 7.5 · High EPSS 0.36% · P29

Affected Version Matrix 1

VendorProduct Version RangeStatus
typeorm typeorm 0.2.21≤ 1.1.0 affected
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-76848

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
TypeORM 0.2.21 through 1.1.0 SQL Injection via SelectQueryBuilder.distinctOn
Source: CVE Program / CVE List V5
Vulnerability Description
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.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Source: CVE Program / CVE List V5
Vulnerability Type
SQL命令中使用的特殊元素转义处理不恰当(SQL注入)
Source: CVE Program / CVE List V5

Affected Products

Vendor Product Affected Versions CPE Subscribe
typeorm typeorm 0.2.21 ~ 1.1.0 -

II. Public POCs for CVE-2026-76848

# POC Description Source Link Shenlong Link
AI-Generated POC Premium
Qwen3.6-35B-A3B · 9676 chars
Pro+ exclusive includes:
Vulnerability reproduction recording (real sandbox build + trigger, exclusive)
In-depth vulnerability mechanism
Trigger conditions & impact
Full executable POC code
Exploit chain & mitigation
POC zip download
100+ AI POC generations per month

III. Intelligence Information for CVE-2026-76848

登录查看更多情报信息。

Vendor Advisories for CVE-2026-76848 (1)

IV. Related Vulnerabilities

V. Comments for CVE-2026-76848

No comments yet


Leave a comment